mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-28 18:26:15 +01:00
ba84454531
* Remove dark mode `KeyboardShortcut` color hack * Ensure that top bar is always compact at bottom of scene * Remove top bar renaming from Notebooks * Refactor the experiment scene to use `PageHeader` properly * Improve `EditableField` sizing * Add top bar renaming to actions and playlists * Sort KeyboardShortcut.scss * Fix missing warehouse mocks and strictly prevent toasts * Fix CompactList divider width * Fix missing early return * Fix random typos * Fix casing of buttons * Reorder definition view top bar buttons * Update Cypress test * Fix typo Co-authored-by: David Newell <d.newell1@outlook.com> * Update casing in E2E test too * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) --------- Co-authored-by: David Newell <d.newell1@outlook.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
56 lines
2.2 KiB
TypeScript
56 lines
2.2 KiB
TypeScript
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 features • 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')
|
|
})
|
|
})
|