0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 09:14:46 +01:00
posthog/cypress/e2e/projectHomepage.cy.ts
Paul D'Ambra 8b32db086a
chore: upgrade cypress (#14402)
Problem
We're two major versions of Cypress behind. They claim the newer versions are faster

Changes
dependency updates
a few fixed tests for new syntax
2023-02-25 10:25:54 +00:00

13 lines
493 B
TypeScript

describe('Project Homepage', () => {
beforeEach(() => {
cy.intercept('GET', /\/api\/projects\/\d+\/dashboards\/\d+\//).as('getDashboard')
cy.clickNavMenu('projecthomepage')
})
it('Shows home dashboard on load', () => {
cy.wait('@getDashboard').its('response.statusCode').should('eq', 200)
cy.get(`@getDashboard.all`).should('have.length', 1) // Only loads once
cy.get('[data-attr=insight-card]').its('length').should('be.gte', 1)
})
})