0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 18:26:15 +01:00
posthog/cypress/integration/people.js
Yakko Majuri 4cb64d0c74
Fix Cypress tests (#1635)
* added timeouts and waits to ensure flow of cypress tests

* removed unused test

* fixed trends elements tests

* testing a longer wait time - temp

* fix trends sessions and retetion filtering tests

* fix events filtering test

* removed wait

* trends sessions fix

* minor update

* fix live actions & sessions

* improve timeouts

* more timouts

* removed some waits

* added timeouts to trends tests

* modify config

* remove test on bug

* removed timeout from events table

* remove dashboards timeout

* change selector for sessions tab

* use data-attr
2020-09-18 09:26:12 -04:00

32 lines
1.0 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 tabs work', () => {
cy.get('.form-control').type('has:email').type('{enter}').should('have.value', 'has:email')
cy.wait(200)
cy.get('.ant-tabs-nav-list > :nth-child(2)').click()
cy.get('[data-row-key="100"] > :nth-child(2) > .ph-no-capture').should('contain', '@')
cy.get('.ant-tabs-nav-list > :nth-child(3)').click()
cy.wait(200)
cy.get('.ant-empty-img-simple').should('exist')
})
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')
})
})