From 5abc3372f1f1884644e7e5d3f0e4c6bec8d9e3f3 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 7 Feb 2024 12:26:51 +0000 Subject: [PATCH] test: skip restore --- tests/playwright/pages/SsoIdpPage/OpenIDLoginPage.ts | 3 +-- tests/playwright/pages/SsoIdpPage/SAMLLoginPage.ts | 3 +-- tests/playwright/setup/index.ts | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/playwright/pages/SsoIdpPage/OpenIDLoginPage.ts b/tests/playwright/pages/SsoIdpPage/OpenIDLoginPage.ts index 93ce2bbec2..d964979ce9 100644 --- a/tests/playwright/pages/SsoIdpPage/OpenIDLoginPage.ts +++ b/tests/playwright/pages/SsoIdpPage/OpenIDLoginPage.ts @@ -13,8 +13,7 @@ export class OpenIDLoginPage extends BasePage { async goto(title = 'test') { // reload page to get latest app info await this.rootPage.reload(); - await this.rootPage.waitForTimeout(1000); - await this.rootPage.goto('/#/signin/'); + await this.rootPage.goto('/?skipRestore=true#/signin/'); // click sign in with SAML await this.rootPage.locator(`button:has-text("Sign in with ${title}")`).click(); } diff --git a/tests/playwright/pages/SsoIdpPage/SAMLLoginPage.ts b/tests/playwright/pages/SsoIdpPage/SAMLLoginPage.ts index fa6647808e..762c666ace 100644 --- a/tests/playwright/pages/SsoIdpPage/SAMLLoginPage.ts +++ b/tests/playwright/pages/SsoIdpPage/SAMLLoginPage.ts @@ -14,8 +14,7 @@ export class SAMLLoginPage extends BasePage { async goto(title = 'test') { // reload page to get latest app info await this.rootPage.reload(); - await this.rootPage.waitForTimeout(1000); - await this.rootPage.goto('/#/signin/'); + await this.rootPage.goto('/?skipRestore=true#/signin/'); // click sign in with SAML await this.rootPage.locator(`button:has-text("Sign in with ${title}")`).click(); } diff --git a/tests/playwright/setup/index.ts b/tests/playwright/setup/index.ts index 46a86f46e7..a4a23892eb 100644 --- a/tests/playwright/setup/index.ts +++ b/tests/playwright/setup/index.ts @@ -412,7 +412,7 @@ const setup = async ({ } await page.addInitScript( async ({ token }) => { - if (location.search?.match(/code=|short-token=/)) return; + if (location.search?.match(/code=|short-token=|skipRestore/)) return; try { let initialLocalStorage = {}; try {