2021-07-07 14:04:39 +02:00
|
|
|
const TIMEOUT = 30000 // increase timeout for funnel viz as sometimes github actions can be slow
|
|
|
|
|
2021-11-05 10:55:18 +01:00
|
|
|
describe.skip('Funnels', () => {
|
2020-05-22 18:34:48 +02:00
|
|
|
beforeEach(() => {
|
2021-06-09 16:58:34 +02:00
|
|
|
// :TRICKY: Race condition populating the first dropdown in funnel
|
|
|
|
cy.get('[data-test-filters-loading]').should('not.exist')
|
2020-08-24 23:02:13 +02:00
|
|
|
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
|
|
|
})
|
|
|
|
|
2021-03-06 11:37:55 +01:00
|
|
|
it('Add only events to funnel', () => {
|
2021-07-15 02:14:43 +02:00
|
|
|
cy.get('[data-attr=add-action-event-button]').first().click()
|
2021-03-06 11:37:55 +01:00
|
|
|
|
2021-07-02 00:58:15 +02:00
|
|
|
cy.get('[data-attr=save-funnel-button]').click() // `save-funnel-button` is actually calculate, keeping around to avoid losing data
|
2021-03-06 11:37:55 +01:00
|
|
|
|
2021-07-22 20:40:49 +02:00
|
|
|
cy.get('[data-attr=funnel-bar-graph]', { timeout: TIMEOUT }).should('exist')
|
2021-03-06 11:37:55 +01:00
|
|
|
})
|
|
|
|
|
2021-02-25 16:41:25 +01:00
|
|
|
it('Add 1 action to funnel and navigate to persons', () => {
|
2021-07-15 02:14:43 +02:00
|
|
|
cy.get('[data-attr=add-action-event-button]').first().click()
|
2020-08-24 23:02:13 +02:00
|
|
|
cy.get('[data-attr=trend-element-subject-0]').click()
|
2021-07-22 20:40:49 +02:00
|
|
|
cy.get('[data-attr=taxonomic-tab-actions]').click()
|
2020-11-24 18:28:44 +01:00
|
|
|
|
2021-02-08 18:34:27 +01:00
|
|
|
cy.wait(200)
|
2021-12-14 15:34:01 +01:00
|
|
|
cy.contains('Hogflix homepage view').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
|
|
|
|
2021-07-22 20:40:49 +02:00
|
|
|
cy.get('[data-attr=funnel-bar-graph]', { timeout: TIMEOUT }).should('exist')
|
2021-02-25 16:41:25 +01:00
|
|
|
|
|
|
|
cy.get('[data-attr="funnel-person"] a')
|
|
|
|
.filter(':contains("@")')
|
|
|
|
.first()
|
|
|
|
.then(($match) => {
|
|
|
|
const email = $match.text()
|
|
|
|
|
|
|
|
cy.wrap($match).click()
|
|
|
|
|
|
|
|
cy.url().should('include', '/person/')
|
|
|
|
cy.contains(email).should('exist')
|
|
|
|
})
|
2020-05-22 18:34:48 +02:00
|
|
|
})
|
|
|
|
|
2020-08-24 23:02:13 +02:00
|
|
|
it('Apply date filter to funnel', () => {
|
2021-07-15 02:14:43 +02:00
|
|
|
cy.get('[data-attr=add-action-event-button]').first().click()
|
2020-05-22 18:34:48 +02:00
|
|
|
cy.get('[data-attr=trend-element-subject-0]').click()
|
2021-07-22 20:40:49 +02:00
|
|
|
cy.get('[data-attr=taxonomic-tab-actions]').click()
|
2021-12-14 15:34:01 +01:00
|
|
|
cy.contains('Hogflix homepage view').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()
|
|
|
|
|
2021-07-22 20:40:49 +02:00
|
|
|
cy.get('[data-attr=funnel-bar-graph]', { timeout: TIMEOUT }).should('exist')
|
2020-05-22 18:34:48 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
it('Add 2 actions to funnel', () => {
|
2021-07-15 02:14:43 +02:00
|
|
|
cy.get('[data-attr=add-action-event-button]').first().click()
|
2020-05-22 18:34:48 +02:00
|
|
|
cy.get('[data-attr=trend-element-subject-0]').click()
|
2021-07-22 20:40:49 +02:00
|
|
|
cy.get('[data-attr=taxonomic-tab-actions]').click()
|
2021-12-14 15:34:01 +01:00
|
|
|
cy.contains('Hogflix homepage view').click()
|
2020-05-22 18:34:48 +02:00
|
|
|
|
2021-07-15 02:14:43 +02:00
|
|
|
cy.get('[data-attr=add-action-event-button]').first().click()
|
2020-05-22 18:34:48 +02:00
|
|
|
cy.get('[data-attr=trend-element-subject-1]').click()
|
2021-07-22 20:40:49 +02:00
|
|
|
cy.get('[data-attr=taxonomic-tab-actions]').click()
|
2021-12-14 15:34:01 +01:00
|
|
|
cy.contains('Hogflix paid').click()
|
2020-05-22 18:34:48 +02:00
|
|
|
|
|
|
|
cy.get('[data-attr=save-funnel-button]').click()
|
|
|
|
|
2021-07-22 20:40:49 +02:00
|
|
|
cy.get('[data-attr=funnel-bar-graph]', { timeout: TIMEOUT }).should('exist')
|
2020-05-22 18:34:48 +02:00
|
|
|
})
|
|
|
|
})
|