mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-28 09:16:49 +01:00
06fdcb2051
* Allow user to go to settings before a product is set up * Add a new before onboarding login flow * Move user-enterprise json to follow other files * Update user-enterprise.json * Update user-before-onboarding.json * Update before-onboarding.cy.ts * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * Update before-onboarding.cy.ts * Update user-before-onboarding.json * Change how the team settings are set * Update before-onboarding.cy.ts * Update e2e.ts --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
describe('Before Onboarding', () => {
|
|
before(() => {
|
|
cy.request({
|
|
method: 'PATCH',
|
|
url: '/api/projects/1/',
|
|
body: { completed_snippet_onboarding: false },
|
|
headers: { Authorization: 'Bearer e2e_demo_api_key' },
|
|
})
|
|
})
|
|
|
|
after(() => {
|
|
cy.request({
|
|
method: 'PATCH',
|
|
url: '/api/projects/1/',
|
|
body: { completed_snippet_onboarding: true },
|
|
headers: { Authorization: 'Bearer e2e_demo_api_key' },
|
|
})
|
|
})
|
|
|
|
it('Navigate to /products when a product has not been set up', () => {
|
|
cy.visit('/project/1/data-management/events')
|
|
|
|
cy.get('[data-attr=top-bar-name] > span').contains('Products')
|
|
})
|
|
|
|
it('Navigate to a settings page even when a product has not been set up', () => {
|
|
cy.visit('/settings/user')
|
|
|
|
cy.get('[data-attr=top-bar-name] > span').contains('User')
|
|
|
|
cy.visit('/settings/organization')
|
|
|
|
cy.get('[data-attr=top-bar-name] > span').contains('Organization')
|
|
})
|
|
})
|