mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 09:14:46 +01:00
1ae890fbe2
Co-authored-by: Mohit Gupta <mohitgupta3mail@gmail.com> Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com> Co-authored-by: Sam Winslow <sammywinslow@gmail.com>
35 lines
1.2 KiB
JavaScript
35 lines
1.2 KiB
JavaScript
describe('Events', () => {
|
|
beforeEach(() => {
|
|
// 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,
|
|
},
|
|
})
|
|
})
|
|
cy.visit('/events')
|
|
})
|
|
|
|
it('Events loaded', () => {
|
|
cy.get('[data-attr=events-table]').should('exist')
|
|
})
|
|
|
|
it('Click on an event', () => {
|
|
cy.get('[data-attr=events-table] .event-row:nth-child(2) td:first-child').click()
|
|
cy.get('[data-attr=event-details]').should('exist')
|
|
})
|
|
|
|
it('Apply 1 overall filter', () => {
|
|
cy.get('[data-attr=new-prop-filter-EventsTable]').click()
|
|
cy.get('[data-attr=property-filter-dropdown]').click()
|
|
cy.get('[data-attr=prop-filter-event-0]').click({ force: true })
|
|
cy.get('[data-attr=prop-val]').click()
|
|
cy.get('[data-attr=prop-val-0]').click({ force: true })
|
|
cy.get('[data-attr=events-table]').should('exist')
|
|
})
|
|
})
|