-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4264 from systeminit/fixup/amend-pesky-cypress-test
fixup: amended the way we measure success for workspace management cy…
- Loading branch information
Showing
1 changed file
with
24 additions
and
24 deletions.
There are no files selected for viewing
48 changes: 24 additions & 24 deletions
48
app/web/cypress/e2e/workspace-management/workspace-dashboard.cy.ts
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 |
---|---|---|
@@ -1,41 +1,41 @@ | ||
// @ts-check | ||
///<reference path="../global.d.ts"/> | ||
|
||
const SI_CYPRESS_MULTIPLIER = Cypress.env('VITE_SI_CYPRESS_MULTIPLIER') || import.meta.env.VITE_SI_CYPRESS_MULTIPLIER || 1; | ||
const AUTH0_USERNAME = Cypress.env('VITE_AUTH0_USERNAME') || import.meta.env.VITE_AUTH0_USERNAME; | ||
const AUTH0_PASSWORD = Cypress.env('VITE_AUTH0_PASSWORD') || import.meta.env.VITE_AUTH0_PASSWORD; | ||
const AUTH_PORTAL_URL = Cypress.env('VITE_AUTH_PORTAL_URL') || import.meta.env.VITE_AUTH_PORTAL_URL; | ||
const AUTH_API_URL = Cypress.env('VITE_AUTH_API_URL') || import.meta.env.VITE_AUTH_API_URL; | ||
const SI_WORKSPACE_ID = Cypress.env('VITE_SI_WORKSPACE_ID') || import.meta.env.VITE_SI_WORKSPACE_ID; | ||
const UUID = Cypress.env('VITE_UUID') || import.meta.env.VITE_UUID || "local"; | ||
|
||
describe("workspace", () => { | ||
beforeEach(() => { | ||
cy.visit("/"); | ||
}); | ||
Cypress._.times(SI_CYPRESS_MULTIPLIER, () => { | ||
describe("workspace", () => { | ||
beforeEach(() => { | ||
cy.visit("/"); | ||
}); | ||
|
||
it("dashboard_redirect", () => { | ||
it("dashboard_redirect", () => { | ||
|
||
cy.loginToAuth0(AUTH0_USERNAME, AUTH0_PASSWORD); | ||
cy.loginToAuth0(AUTH0_USERNAME, AUTH0_PASSWORD); | ||
|
||
// Go to the Synthetic User's Dashboard | ||
cy.visit(AUTH_PORTAL_URL + '/dashboard') | ||
cy.sendPosthogEvent(Cypress.currentTest.titlePath.join("/"), "test_uuid", UUID); | ||
// Go to the Synthetic User's Dashboard | ||
cy.visit(AUTH_PORTAL_URL + '/dashboard') | ||
cy.sendPosthogEvent(Cypress.currentTest.titlePath.join("/"), "test_uuid", UUID); | ||
|
||
cy.wait(5000); | ||
cy.wait(5000); | ||
|
||
// Find the URL for the synthetic workspace and go there | ||
cy.get('a[href="' + AUTH_API_URL + '/workspaces/' + SI_WORKSPACE_ID + '/go"]') | ||
.should('be.visible') | ||
.invoke('removeAttr', 'target') | ||
.click(); | ||
cy.on('uncaught:exception', (e) => { | ||
console.log(e); | ||
return false; | ||
}); | ||
// Find the URL for the synthetic workspace and go there | ||
cy.get('a[href="' + AUTH_API_URL + '/workspaces/' + SI_WORKSPACE_ID + '/go"]') | ||
.should('be.visible') | ||
.invoke('removeAttr', 'target') | ||
.click(); | ||
cy.on('uncaught:exception', (e) => { | ||
console.log(e); | ||
return false; | ||
}); | ||
|
||
cy.wait(5000); | ||
|
||
// Check that it loaded the workspace + prompted to create a new change set | ||
cy.contains('Create change set', { timeout: 10000 }).should('be.visible'); | ||
cy.appModelPageLoaded(); | ||
}); | ||
}); | ||
}); | ||
}); |