Browse Source

test: skip restore

pull/7569/head
Pranav C 8 months ago
parent
commit
5abc3372f1
  1. 3
      tests/playwright/pages/SsoIdpPage/OpenIDLoginPage.ts
  2. 3
      tests/playwright/pages/SsoIdpPage/SAMLLoginPage.ts
  3. 2
      tests/playwright/setup/index.ts

3
tests/playwright/pages/SsoIdpPage/OpenIDLoginPage.ts

@ -13,8 +13,7 @@ export class OpenIDLoginPage extends BasePage {
async goto(title = 'test') { async goto(title = 'test') {
// reload page to get latest app info // reload page to get latest app info
await this.rootPage.reload(); await this.rootPage.reload();
await this.rootPage.waitForTimeout(1000); await this.rootPage.goto('/?skipRestore=true#/signin/');
await this.rootPage.goto('/#/signin/');
// click sign in with SAML // click sign in with SAML
await this.rootPage.locator(`button:has-text("Sign in with ${title}")`).click(); await this.rootPage.locator(`button:has-text("Sign in with ${title}")`).click();
} }

3
tests/playwright/pages/SsoIdpPage/SAMLLoginPage.ts

@ -14,8 +14,7 @@ export class SAMLLoginPage extends BasePage {
async goto(title = 'test') { async goto(title = 'test') {
// reload page to get latest app info // reload page to get latest app info
await this.rootPage.reload(); await this.rootPage.reload();
await this.rootPage.waitForTimeout(1000); await this.rootPage.goto('/?skipRestore=true#/signin/');
await this.rootPage.goto('/#/signin/');
// click sign in with SAML // click sign in with SAML
await this.rootPage.locator(`button:has-text("Sign in with ${title}")`).click(); await this.rootPage.locator(`button:has-text("Sign in with ${title}")`).click();
} }

2
tests/playwright/setup/index.ts

@ -412,7 +412,7 @@ const setup = async ({
} }
await page.addInitScript( await page.addInitScript(
async ({ token }) => { async ({ token }) => {
if (location.search?.match(/code=|short-token=/)) return; if (location.search?.match(/code=|short-token=|skipRestore/)) return;
try { try {
let initialLocalStorage = {}; let initialLocalStorage = {};
try { try {

Loading…
Cancel
Save