-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: early access management cancel button (#17857)
- Loading branch information
1 parent
dd43748
commit 45d5794
Showing
4 changed files
with
80 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
describe('Early Access Management', () => { | ||
beforeEach(() => { | ||
cy.visit('/early_access_features') | ||
}) | ||
|
||
it('Early access feature new and list', () => { | ||
// load an empty early access feature page | ||
cy.get('h1').should('contain', 'Early Access Management') | ||
cy.title().should('equal', 'Early Access Management • PostHog') | ||
cy.get('h2').should('contain', 'Create your first feature') | ||
cy.get('[data-attr="product-introduction-docs-link"]').should( | ||
'contain', | ||
'Learn more about Early access features' | ||
) | ||
|
||
// go to create a new feature | ||
cy.get('[data-attr="create-feature"]').click() | ||
|
||
// New Feature Release page | ||
cy.get('h1').should('contain', 'New Feature Release') | ||
|
||
// cancel new feature | ||
cy.get('[data-attr="cancel-feature"]').click() | ||
cy.get('h1').should('contain', 'Early Access Management') | ||
|
||
// set feature name & description | ||
cy.get('[data-attr="create-feature"]').click() | ||
cy.get('[data-attr="feature-name"]').type('Test Feature') | ||
cy.get('[data-attr="save-feature').should('contain.text', 'Save as draft') | ||
|
||
// save | ||
cy.get('[data-attr="save-feature"]').click() | ||
cy.get('[data-attr=success-toast]').contains('Early Access Feature saved').should('exist') | ||
|
||
// back to features | ||
cy.visit('/early_access_features') | ||
cy.get('tbody').contains('Test Feature') | ||
cy.get('h2').should('not.have.text', 'Create your first feature') | ||
|
||
// edit feature | ||
cy.get('a.Link').contains('.row-name', 'Test Feature').click() | ||
cy.get('[data-attr="edit-feature"]').click() | ||
cy.get('h1').should('contain', 'Test Feature') | ||
cy.get('[data-attr="save-feature"]').should('contain.text', 'Save') | ||
|
||
// delete feature | ||
cy.get('[data-attr="save-feature"]').click() | ||
cy.get('[data-attr="delete-feature"]').click() | ||
cy.get('h3').should('contain', 'Permanently delete feature?') | ||
cy.get('[data-attr="confirm-delete-feature"]').click() | ||
cy.get('[data-attr=info-toast]') | ||
.contains('Early access feature deleted. Remember to delete corresponding feature flag if necessary') | ||
.should('exist') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters