From f3beec9265d36a05787d1df8e7bff52ae9f572cb Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Tue, 11 Mar 2025 18:04:32 +0700 Subject: [PATCH] Improve WS tests stability (#8196) Signed-off-by: Andrey Sobolev --- ws-tests/sanity/tests/workspace/archive.spec.ts | 4 ++++ ws-tests/sanity/tests/workspace/create.spec.ts | 3 +++ ws-tests/sanity/tests/workspace/migrate.spec.ts | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/ws-tests/sanity/tests/workspace/archive.spec.ts b/ws-tests/sanity/tests/workspace/archive.spec.ts index 8a0b04623c..1d7e1c2d26 100644 --- a/ws-tests/sanity/tests/workspace/archive.spec.ts +++ b/ws-tests/sanity/tests/workspace/archive.spec.ts @@ -69,6 +69,10 @@ test.describe('Workspace Archive tests', () => { return url.pathname.startsWith('/login/selectWorkspace') || url.pathname.startsWith('/workbench/') }) + await loginPage2.page.waitForURL((url) => { + return url.pathname.startsWith('/login/selectWorkspace') || url.pathname.startsWith('/workbench/') + }) + const adminPage = new AdminPage(page2) await adminPage.gotoAdmin() diff --git a/ws-tests/sanity/tests/workspace/create.spec.ts b/ws-tests/sanity/tests/workspace/create.spec.ts index c10daee071..dd70fb22b8 100644 --- a/ws-tests/sanity/tests/workspace/create.spec.ts +++ b/ws-tests/sanity/tests/workspace/create.spec.ts @@ -190,6 +190,9 @@ test.describe('Workspace tests', () => { const signUpPage2 = new SignUpPage(page2) await signUpPage2.signUp(newUser2) + await page2.waitForURL((url) => { + return url.pathname.startsWith('/login/createWorkspace') + }) await page2.waitForURL((url) => { return url.pathname.startsWith('/login/createWorkspace') diff --git a/ws-tests/sanity/tests/workspace/migrate.spec.ts b/ws-tests/sanity/tests/workspace/migrate.spec.ts index d8b60adddb..e4a4e8ef25 100644 --- a/ws-tests/sanity/tests/workspace/migrate.spec.ts +++ b/ws-tests/sanity/tests/workspace/migrate.spec.ts @@ -71,6 +71,10 @@ test.describe('Workspace Migration tests', () => { return url.pathname.startsWith('/login/selectWorkspace') || url.pathname.startsWith('/workbench/') }) + await loginPage2.page.waitForURL((url) => { + return url.pathname.startsWith('/login/selectWorkspace') || url.pathname.startsWith('/workbench/') + }) + const adminPage = new AdminPage(page2) await adminPage.gotoAdmin()