0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 12:21:02 +01:00
posthog/cypress/integration/paths.js
Paul D'Ambra 33f2399981
Do not alter paths data when loading through d3js (#7026)
* d3-sankey alters the object passed into it. we must copy the object we pass to it

* save a path in a test

* don't rely on being able to query the toast when testing if paths saved
2021-11-10 16:58:39 +00:00

24 lines
679 B
JavaScript

describe('Paths', () => {
beforeEach(() => {
cy.visit('/insights/new')
cy.get('[data-attr=insight-path-tab]').click()
})
it('Paths loaded', () => {
cy.get('[data-attr=paths-viz]').should('exist')
})
it('Apply date filter', () => {
cy.get('[data-attr=date-filter]').click()
cy.contains('Last 30 days').click()
cy.get('[data-attr=paths-viz]').should('exist')
})
it('can save paths', () => {
cy.get('[data-attr="insight-edit-button"]').should('not.exist')
cy.get('[data-attr="insight-save-button"]').click()
cy.get('[data-attr="insight-edit-button"]').should('exist')
})
})