mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-30 03:26:38 +01:00
777d9a871f
* Closes #1108 Allows filtering of retention table * Adds logic to parse properties(filters) from the URL and including the filters while making api request for data * Adds PropertyFilters component to the rentention table scene * Adds props that are passed on to the RetentionTable component so that the properties prop is populated * Fixes failing tests since the person_id wasn't added to the event objects * Fixes type error for json loads * Adds frontend and backend test * Removes print statement
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
describe('People', () => {
|
|
beforeEach(() => {
|
|
cy.get('[data-attr=menu-item-people]').click()
|
|
})
|
|
|
|
it('People loaded', () => {
|
|
cy.get('h1').should('contain', 'Users')
|
|
})
|
|
|
|
it('Go to new cohort from people screen', () => {
|
|
cy.get('[data-attr=create-cohort]').click()
|
|
cy.get('span').should('contain', 'New Cohort')
|
|
})
|
|
|
|
it('All people route works', () => {
|
|
cy.get('[data-attr=menu-item-cohorts]').click()
|
|
cy.get('[data-attr=menu-item-all-people]').click()
|
|
|
|
cy.get('h1').should('contain', 'Users')
|
|
})
|
|
|
|
it('Retention route works', () => {
|
|
cy.get('[data-attr=menu-item-retention]').click()
|
|
|
|
cy.get('h1').should('contain', 'Retention')
|
|
})
|
|
|
|
it('Apply 1 overall filter', () => {
|
|
cy.get('[data-attr=menu-item-retention]').click()
|
|
cy.get('[data-attr=new-prop-filter-RetentionTable]').click()
|
|
cy.get('[data-attr=prop-filter-person-0]').click()
|
|
cy.get('[data-attr=prop-val]').click()
|
|
cy.get('[data-attr=prop-val-0]').click()
|
|
cy.get('[data-attr=retention-table').should('exist')
|
|
})
|
|
})
|