-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow user to go to settings before a product is set up (#21146)
* 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>
- Loading branch information
1 parent
bcf3f67
commit 06fdcb2
Showing
4 changed files
with
45 additions
and
6 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,35 @@ | ||
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') | ||
}) | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,10 +61,15 @@ beforeEach(() => { | |
email: '[email protected]', | ||
password: '12345678', | ||
}) | ||
cy.visit('/insights') | ||
cy.wait('@getInsights').then(() => { | ||
cy.get('.saved-insights tr').should('exist') | ||
}) | ||
|
||
if (Cypress.spec.name.includes('before-onboarding')) { | ||
cy.visit('/?no-preloaded-app-context=true') | ||
} else { | ||
cy.visit('/insights') | ||
cy.wait('@getInsights').then(() => { | ||
cy.get('.saved-insights tr').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