2020-05-22 18:34:48 +02:00
|
|
|
describe('Events', () => {
|
|
|
|
beforeEach(() => {
|
2021-05-13 23:13:54 +02:00
|
|
|
// Before each should reset the column config to DEFAULT config
|
|
|
|
cy.getCookie('csrftoken').then((csrftoken) => {
|
|
|
|
cy.request({
|
|
|
|
url: '/api/user/',
|
|
|
|
body: { user: { events_column_config: { active: 'DEFAULT' } } },
|
|
|
|
method: 'PATCH',
|
|
|
|
headers: {
|
|
|
|
'X-CSRFToken': csrftoken.value,
|
|
|
|
},
|
|
|
|
})
|
|
|
|
})
|
2020-06-17 11:46:22 +02:00
|
|
|
cy.visit('/events')
|
2020-05-22 18:34:48 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
it('Events loaded', () => {
|
2020-08-22 18:03:12 +02:00
|
|
|
cy.get('[data-attr=events-table]').should('exist')
|
2020-05-22 18:34:48 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
it('Click on an event', () => {
|
2021-05-13 23:13:54 +02:00
|
|
|
cy.get('[data-attr=events-table] .event-row:nth-child(2) td:first-child').click()
|
2020-08-22 18:03:12 +02:00
|
|
|
cy.get('[data-attr=event-details]').should('exist')
|
2020-05-22 18:34:48 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
it('Apply 1 overall filter', () => {
|
|
|
|
cy.get('[data-attr=new-prop-filter-EventsTable]').click()
|
2021-07-22 20:40:49 +02:00
|
|
|
cy.get('[data-attr=taxonomic-filter-searchfield]').click()
|
|
|
|
cy.get('[data-attr=prop-filter-event_properties-0]').click({ force: true })
|
2020-05-22 18:34:48 +02:00
|
|
|
cy.get('[data-attr=prop-val]').click()
|
2020-10-23 15:52:59 +02:00
|
|
|
cy.get('[data-attr=prop-val-0]').click({ force: true })
|
2020-08-22 18:03:12 +02:00
|
|
|
cy.get('[data-attr=events-table]').should('exist')
|
2020-05-22 18:34:48 +02:00
|
|
|
})
|
|
|
|
})
|