2020-05-22 18:34:48 +02:00
|
|
|
describe('Funnels', () => {
|
|
|
|
beforeEach(() => {
|
2020-08-24 23:02:13 +02:00
|
|
|
cy.visit('/')
|
|
|
|
cy.get('[data-attr=insight-funnels-tab]').click()
|
2020-09-18 15:26:12 +02:00
|
|
|
cy.wait(200)
|
2020-05-22 18:34:48 +02:00
|
|
|
})
|
|
|
|
|
2020-08-24 23:02:13 +02:00
|
|
|
it('Add 1 action to funnel', () => {
|
|
|
|
cy.get('[data-attr=add-action-event-button]').click()
|
|
|
|
cy.get('[data-attr=trend-element-subject-0]').click()
|
2020-11-24 18:28:44 +01:00
|
|
|
|
|
|
|
// Double click: https://www.cypress.io/blog/2019/01/22/when-can-the-test-click/
|
|
|
|
cy.contains('Pageviews').click().click()
|
2020-07-29 17:51:49 +02:00
|
|
|
|
2020-08-24 23:02:13 +02:00
|
|
|
cy.get('[data-attr=save-funnel-button]').click()
|
2020-07-29 17:51:49 +02:00
|
|
|
|
|
|
|
cy.get('[data-attr=funnel-viz]').should('exist')
|
2020-05-22 18:34:48 +02:00
|
|
|
})
|
|
|
|
|
2020-08-24 23:02:13 +02:00
|
|
|
it('Apply date filter to funnel', () => {
|
2020-05-22 18:34:48 +02:00
|
|
|
cy.get('[data-attr=add-action-event-button]').click()
|
|
|
|
cy.get('[data-attr=trend-element-subject-0]').click()
|
2020-11-24 18:28:44 +01:00
|
|
|
cy.contains('Pageviews').click().click()
|
2020-09-18 15:26:12 +02:00
|
|
|
cy.get('[data-attr=save-funnel-button]').click()
|
2020-05-22 18:34:48 +02:00
|
|
|
|
2020-08-24 23:02:13 +02:00
|
|
|
cy.get('[data-attr=date-filter]').click()
|
|
|
|
cy.contains('Last 30 days').click()
|
|
|
|
|
2020-09-01 15:19:15 +02:00
|
|
|
cy.get('[data-attr=date-filter]').click()
|
|
|
|
cy.contains('Last 30 days').click()
|
|
|
|
|
2020-05-22 18:34:48 +02:00
|
|
|
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()
|
2020-11-24 18:28:44 +01:00
|
|
|
cy.contains('Pageviews').click().click()
|
2020-05-22 18:34:48 +02:00
|
|
|
|
|
|
|
cy.get('[data-attr=add-action-event-button]').click()
|
|
|
|
cy.get('[data-attr=trend-element-subject-1]').click()
|
2020-11-24 18:28:44 +01:00
|
|
|
cy.contains('HogFlix homepage view').click().click()
|
2020-05-22 18:34:48 +02:00
|
|
|
|
|
|
|
cy.get('[data-attr=save-funnel-button]').click()
|
|
|
|
|
|
|
|
cy.get('[data-attr=funnel-viz]').should('exist')
|
|
|
|
})
|
|
|
|
})
|