2021-11-25 15:39:49 +01:00
|
|
|
import { urls } from 'scenes/urls'
|
|
|
|
|
2020-09-07 16:23:13 +02:00
|
|
|
describe('Retention', () => {
|
2020-07-29 17:51:49 +02:00
|
|
|
beforeEach(() => {
|
2021-11-25 15:39:49 +01:00
|
|
|
cy.visit(urls.insightNew())
|
2020-07-29 17:51:49 +02:00
|
|
|
cy.get('[data-attr=insight-retention-tab]').click()
|
|
|
|
})
|
|
|
|
|
2021-02-25 16:41:25 +01:00
|
|
|
it('should apply filter and navigate to persons', () => {
|
2021-12-10 13:38:25 +01:00
|
|
|
// NOTE: First wait for results to load, try and make the test more
|
|
|
|
// stable. This is to try and avoid an issue where after selecting a
|
|
|
|
// filter property, the results section would be blank
|
|
|
|
cy.get('[data-attr=retention-table').should('exist')
|
2022-03-09 23:20:21 +01:00
|
|
|
// tests for new property group filters
|
|
|
|
// cy.get('[data-attr=insight-retention-add-filter-group]').click()
|
|
|
|
// cy.get('[data-attr=property-select-toggle-0]').click()
|
2022-05-25 04:56:38 +02:00
|
|
|
|
2023-11-14 15:38:36 +01:00
|
|
|
cy.get('[data-attr$=add-filter-group]').click()
|
2022-05-25 04:56:38 +02:00
|
|
|
cy.get('[data-attr=property-select-toggle-0]').click()
|
2021-07-22 20:40:49 +02:00
|
|
|
cy.get('[data-attr=taxonomic-filter-searchfield]').click()
|
|
|
|
cy.get('[data-attr=taxonomic-filter-searchfield]').type('is_demo')
|
|
|
|
cy.get('[data-attr=taxonomic-tab-person_properties]').click()
|
2021-12-10 13:38:25 +01:00
|
|
|
cy.get('[data-attr=prop-filter-person_properties-0]').click()
|
2020-07-29 17:51:49 +02:00
|
|
|
cy.get('[data-attr=prop-val]').click()
|
2021-12-10 13:38:25 +01:00
|
|
|
cy.get('[data-attr=prop-val-0]').click()
|
2020-07-29 17:51:49 +02:00
|
|
|
cy.get('[data-attr=retention-table').should('exist')
|
2021-02-25 16:41:25 +01:00
|
|
|
|
2022-01-03 15:26:54 +01:00
|
|
|
// cy.get('.percentage-cell').last().click()
|
2021-02-25 16:41:25 +01:00
|
|
|
|
2022-01-03 15:26:54 +01:00
|
|
|
// cy.get('[data-attr=retention-person-link]').its('length').should('eq', 1)
|
|
|
|
// cy.get('[data-attr=retention-person-link]').contains('smith.nunez@gmail.com')
|
2021-02-25 16:41:25 +01:00
|
|
|
|
2022-01-03 15:26:54 +01:00
|
|
|
// cy.get('[data-attr=retention-person-link]').click()
|
2021-02-25 16:41:25 +01:00
|
|
|
|
2022-01-03 15:26:54 +01:00
|
|
|
// cy.url().should('include', '/person/')
|
|
|
|
// cy.contains('smith.nunez@gmail.com').should('exist')
|
2020-07-29 17:51:49 +02:00
|
|
|
})
|
|
|
|
})
|