mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 18:07:17 +01:00
1a6207d791
* Upload static cohort using CSV, closes #2868 * fix tests * Fix tests * Fix e2e test * Avoid double inserts * Speed up query * Move to params * fix tests * Use JSON instead of protobuf * unused import * produce instead of produce_proto * Insert directly into clickhouse, no need for kafka * a few quick fixes * insert in batch to clickhouse * test SQLi since we can't really trust what we are inserting * Extra check for duplicates Co-authored-by: James Greenhill <fuziontech@gmail.com>
36 lines
1.3 KiB
JavaScript
36 lines
1.3 KiB
JavaScript
describe('Cohorts', () => {
|
|
beforeEach(() => {
|
|
cy.get('[data-attr=menu-item-people]').click() // TODO: Remove when releasing navigation-1775
|
|
cy.get('[data-attr=menu-item-cohorts]').click()
|
|
})
|
|
it('Cohorts new and list', () => {
|
|
// load an empty page
|
|
cy.get('h1').should('contain', 'Cohorts')
|
|
cy.title().should('equal', 'Cohorts • PostHog')
|
|
|
|
// go to create a new cohort
|
|
cy.get('[data-attr="create-cohort"]').click()
|
|
cy.get('[data-attr="cohort-choice-definition"]').click()
|
|
cy.get('[data-attr="cohort-name"]').type('Test Cohort')
|
|
|
|
// select "add filter" and "property"
|
|
cy.get('.ant-radio-group > :nth-child(2)').click()
|
|
cy.get('[data-attr="new-prop-filter-cohort_0"]').click()
|
|
|
|
// select the first property
|
|
cy.get('[data-attr=property-filter-dropdown]').click()
|
|
cy.get('[data-attr=prop-filter-person-0]').click({ force: true })
|
|
|
|
cy.get('[data-attr=prop-val]').click()
|
|
cy.get('[data-attr=prop-val-0]').click({ force: true })
|
|
|
|
// save
|
|
cy.get('[data-attr="save-cohort"]').click()
|
|
cy.get('[data-attr=success-toast]').should('exist')
|
|
|
|
// back to cohorts
|
|
cy.get('.ant-drawer-close').click({ force: true })
|
|
cy.get('.ant-table-tbody').contains('Test Cohort')
|
|
})
|
|
})
|