0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-29 03:04:16 +01:00
posthog/cypress/e2e/notebooks-insights.ts

19 lines
750 B
TypeScript
Raw Normal View History

import { insight, savedInsights } from '../productAnalytics'
describe('Notebooks', () => {
beforeEach(() => {
cy.clickNavMenu('notebooks')
cy.location('pathname').should('include', '/notebooks')
})
;['SQL', 'TRENDS', 'FUNNELS', 'RETENTION', 'PATHS', 'STICKINESS', 'LIFECYCLE'].forEach((insightType) => {
it(`Can add a ${insightType} insight`, () => {
savedInsights.createNewInsightOfType(insightType)
insight.editName(`${insightType} Insight`)
insight.save()
cy.get('[data-attr="notebooks-add-button"]').click()
cy.get('[data-attr="notebooks-select-button-create"]').click()
cy.get('.ErrorBoundary').should('not.exist')
})
})
})