2020-05-19 20:48:10 +02:00
|
|
|
describe('Trends actions & events', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
// given
|
|
|
|
cy.visit('/')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Add a pageview action filter', () => {
|
|
|
|
// when
|
|
|
|
cy.contains('Add action/event').click()
|
|
|
|
cy.get('[data-attr=trend-element-subject-1]').click()
|
|
|
|
cy.contains('Pageviews').click()
|
|
|
|
|
|
|
|
// then
|
|
|
|
cy.get('[data-attr=trend-line-graph]').should('exist')
|
|
|
|
})
|
|
|
|
|
2020-05-22 18:34:48 +02:00
|
|
|
it('DAU on 1 element', () => {
|
|
|
|
cy.get('[data-attr=math-selector-0]').click()
|
2020-07-21 16:18:11 +02:00
|
|
|
cy.get('[data-attr=math-dau-0]').click()
|
2020-05-22 18:34:48 +02:00
|
|
|
cy.get('[data-attr=trend-line-graph]').should('exist')
|
|
|
|
})
|
|
|
|
|
2020-07-21 16:18:11 +02:00
|
|
|
it('Show property select dynamically', () => {
|
|
|
|
cy.get('[data-attr=math-property-selector-0]').should('not.exist')
|
|
|
|
cy.get('[data-attr=math-selector-0]').click()
|
|
|
|
cy.get('[data-attr=math-avg-0]').click()
|
|
|
|
cy.get('[data-attr=math-property-selector-0]').should('exist')
|
|
|
|
})
|
|
|
|
|
2020-05-22 18:34:48 +02:00
|
|
|
it('Apply specific filter on default pageview event', () => {
|
|
|
|
cy.get('[data-attr=show-prop-filter-0]').click()
|
|
|
|
cy.get('[data-attr=new-prop-filter-0-\\$pageview-filter]').click()
|
|
|
|
cy.get('[data-attr=prop-filter-event-1]').click()
|
|
|
|
cy.get('[data-attr=prop-val]').click()
|
|
|
|
cy.get('[data-attr=prop-val-0]').click()
|
|
|
|
cy.get('[data-attr=trend-line-graph]').should('exist')
|
|
|
|
})
|
|
|
|
|
2020-05-19 20:48:10 +02:00
|
|
|
it('Apply 1 overall filter', () => {
|
|
|
|
cy.get('[data-attr=new-prop-filter-trends-filters]').click()
|
2020-05-20 18:03:19 +02:00
|
|
|
cy.get('[data-attr=prop-filter-event-1]').click()
|
2020-05-19 20:48:10 +02:00
|
|
|
cy.get('[data-attr=prop-val]').click()
|
2020-05-20 18:03:19 +02:00
|
|
|
cy.get('[data-attr=prop-val-0]').click()
|
2020-05-19 20:48:10 +02:00
|
|
|
|
|
|
|
cy.get('[data-attr=trend-line-graph]').should('exist')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Apply interval filter', () => {
|
|
|
|
cy.get('[data-attr=interval-filter]').click()
|
|
|
|
cy.contains('Weekly').click()
|
|
|
|
|
|
|
|
cy.get('[data-attr=trend-line-graph]').should('exist')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Apply chart filter', () => {
|
|
|
|
cy.get('[data-attr=chart-filter]').click()
|
|
|
|
cy.contains('Pie').click()
|
|
|
|
|
|
|
|
cy.get('[data-attr=trend-pie-graph]').should('exist')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Apply table filter', () => {
|
|
|
|
cy.get('[data-attr=chart-filter]').click()
|
|
|
|
cy.contains('Table').click()
|
|
|
|
|
|
|
|
cy.get('[data-attr=trend-table-graph]').should('exist')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Apply date filter', () => {
|
|
|
|
cy.get('[data-attr=date-filter]').click()
|
|
|
|
cy.contains('Last 30 days').click()
|
|
|
|
|
|
|
|
cy.get('[data-attr=trend-line-graph]').should('exist')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Apply volume filter', () => {
|
|
|
|
cy.get('[data-attr=shownas-filter]').click()
|
|
|
|
cy.get('[data-attr=shownas-volume-option]').click()
|
|
|
|
|
|
|
|
cy.get('[data-attr=trend-line-graph]').should('exist')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Apply stickiness filter', () => {
|
|
|
|
cy.get('[data-attr=shownas-filter]').click()
|
|
|
|
cy.get('[data-attr=shownas-stickiness-option]').click()
|
|
|
|
|
|
|
|
cy.get('[data-attr=trend-line-graph]').should('exist')
|
|
|
|
})
|
|
|
|
|
2020-05-22 18:34:48 +02:00
|
|
|
it('Apply property breakdown', () => {
|
|
|
|
cy.get('[data-attr=add-breakdown-button]').click()
|
|
|
|
cy.get('[data-attr=prop-breakdown-select]').click()
|
|
|
|
cy.get('[data-attr=prop-breakdown-3]').click()
|
|
|
|
|
|
|
|
cy.get('[data-attr=trend-line-graph]').should('exist')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Apply all users cohort breakdown', () => {
|
|
|
|
cy.get('[data-attr=add-breakdown-button]').click()
|
|
|
|
cy.contains('Cohort').click()
|
|
|
|
cy.get('[data-attr=cohort-breakdown-select]').click()
|
|
|
|
cy.get('[data-attr=cohort-breakdown-all-users]').click()
|
|
|
|
|
|
|
|
cy.get('[data-attr=trend-line-graph]').should('exist')
|
|
|
|
})
|
|
|
|
|
2020-05-19 20:48:10 +02:00
|
|
|
it('Save to dashboard', () => {
|
|
|
|
cy.get('[data-attr=save-to-dashboard-button]').click()
|
|
|
|
cy.contains('Add panel to dashboard').click()
|
2020-06-25 19:53:13 +02:00
|
|
|
cy.wait(700) // not ideal but toast has a delay render
|
2020-05-19 20:48:10 +02:00
|
|
|
cy.get('[data-attr=success-toast]').should('exist')
|
|
|
|
})
|
|
|
|
})
|