2020-05-19 20:48:10 +02:00
|
|
|
describe('Trends sessions', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
// given
|
|
|
|
cy.visit('/')
|
|
|
|
cy.contains('Sessions').click()
|
|
|
|
})
|
|
|
|
|
2020-06-19 19:08:53 +02:00
|
|
|
it('Navigate from distributed sessions to /trends', () => {
|
|
|
|
cy.get('[data-attr=sessions-filter]').click()
|
|
|
|
cy.get('[data-attr=sessions-filter-distribution]').click()
|
|
|
|
cy.get('[data-attr=trend-table-graph]').should('exist')
|
|
|
|
cy.contains('Actions & Events').click()
|
|
|
|
cy.get('[data-attr=trend-line-graph] canvas').should('exist')
|
|
|
|
})
|
|
|
|
|
2020-05-19 20:48:10 +02:00
|
|
|
it('Sessions exists', () => {
|
|
|
|
// then
|
|
|
|
cy.get('[data-attr=trend-line-graph]').should('exist')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Apply 1 overall filter', () => {
|
|
|
|
cy.get('[data-attr=new-prop-filter-trends-sessions]').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 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('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')
|
|
|
|
})
|
|
|
|
})
|