0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-25 02:49:32 +01:00
posthog/cypress/integration/feature_flags.js
Michał Matłoka 93aebb9e7b
Update prettier to 2.0.x (#1143)
* Update prettier devDependency to 2.0.x

* Format with prettier 2.0.5

* Update yarn.lock
2020-07-03 14:37:07 +02:00

21 lines
999 B
JavaScript

describe('Feature Flags', () => {
beforeEach(() => {
cy.visit('/experiments/feature_flags')
})
it('Create feature flag', () => {
cy.get('h1').should('contain', 'Feature Flags')
cy.get('[data-attr=new-feature-flag]').click()
cy.get('[data-attr=feature-flag-name').type('beta feature').should('have.value', 'beta feature')
cy.get('[data-attr=feature-flag-key').should('have.value', 'beta-feature')
cy.get('[data-attr=feature-flag-switch').click()
cy.get('[data-attr=feature-flag-submit').click()
cy.get('[data-attr=feature-flag-table').should('contain', 'beta feature')
cy.get('[data-attr=feature-flag-table] tr:first-child td:first-child').click()
cy.get('[data-attr=feature-flag-name').type(' updated').should('have.value', 'beta feature updated')
cy.get('[data-attr=feature-flag-submit').click()
cy.get('[data-attr=feature-flag-table').should('contain', 'beta feature updated')
})
})