0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-25 11:17:50 +01:00
posthog/cypress/e2e/projectHomepage.cy.ts
Michael Matloka d1c75ab747
fix(environments): Rejig use of insight/dashboard endpoints (#25469)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-16 16:23:48 +02:00

13 lines
497 B
TypeScript

describe('Project Homepage', () => {
beforeEach(() => {
cy.intercept('GET', /\/api\/environments\/\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)
})
})