mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-25 02:31:30 +01:00
2297b0f1cf
* Grab all events and properties even if job hasn't run yet * Use next on generator instead of list comprehension * Replace IndexError with StopIteration * Don't raise StopIteration at all * try delay Co-authored-by: Michael Matloka <dev@twixes.com>
50 lines
1.7 KiB
JavaScript
50 lines
1.7 KiB
JavaScript
describe('Funnels', () => {
|
|
beforeEach(() => {
|
|
cy.visit('/')
|
|
cy.get('[data-attr=insight-funnels-tab]').click()
|
|
cy.wait(200)
|
|
})
|
|
|
|
it('Add 1 action to funnel', () => {
|
|
cy.get('[data-attr=add-action-event-button]').click()
|
|
cy.get('[data-attr=trend-element-subject-0]').click()
|
|
|
|
cy.wait(200)
|
|
// Double click: https://www.cypress.io/blog/2019/01/22/when-can-the-test-click/
|
|
cy.contains('HogFlix homepage view').click().click()
|
|
|
|
cy.get('[data-attr=save-funnel-button]').click()
|
|
|
|
cy.get('[data-attr=funnel-viz]').should('exist')
|
|
})
|
|
|
|
it('Apply date filter to funnel', () => {
|
|
cy.get('[data-attr=add-action-event-button]').click()
|
|
cy.get('[data-attr=trend-element-subject-0]').click()
|
|
cy.contains('HogFlix homepage view').click().click()
|
|
cy.get('[data-attr=save-funnel-button]').click()
|
|
|
|
cy.get('[data-attr=date-filter]').click()
|
|
cy.contains('Last 30 days').click()
|
|
|
|
cy.get('[data-attr=date-filter]').click()
|
|
cy.contains('Last 30 days').click()
|
|
|
|
cy.get('[data-attr=funnel-viz]').should('exist')
|
|
})
|
|
|
|
it('Add 2 actions to funnel', () => {
|
|
cy.get('[data-attr=add-action-event-button]').click()
|
|
cy.get('[data-attr=trend-element-subject-0]').click()
|
|
cy.contains('HogFlix homepage view').click().click()
|
|
|
|
cy.get('[data-attr=add-action-event-button]').click()
|
|
cy.get('[data-attr=trend-element-subject-1]').click()
|
|
cy.contains('HogFlix paid').click().click()
|
|
|
|
cy.get('[data-attr=save-funnel-button]').click()
|
|
|
|
cy.get('[data-attr=funnel-viz]').should('exist')
|
|
})
|
|
})
|