From 0db7adccd6c05020ab2d67b07523726276d222c6 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev <haiodo@users.noreply.github.com> Date: Tue, 24 Dec 2024 14:48:18 +0700 Subject: [PATCH] UBERF-8993: Fix some flacky tests because of login (#7535) Signed-off-by: Andrey Sobolev <haiodo@gmail.com> --- tests/sanity/tests/model/login-page.ts | 8 -------- tests/sanity/tests/utils.ts | 3 +-- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/sanity/tests/model/login-page.ts b/tests/sanity/tests/model/login-page.ts index c32dd8fc26..96d07f13df 100644 --- a/tests/sanity/tests/model/login-page.ts +++ b/tests/sanity/tests/model/login-page.ts @@ -59,14 +59,6 @@ export class LoginPage { // ASSERTS - async checkingNeedReLogin (): Promise<void> { - if (await this.profileButton().isVisible()) { - await this.openProfileMenu() - await this.popupItemButton('Sign out').click() - await this.loginWithPassword().waitFor({ state: 'visible', timeout: 15000 }) - } - } - async checkIfErrorMessageIsShown (): Promise<void> { await expect(this.invalidPasswordMessage()).toContainText('Invalid password') } diff --git a/tests/sanity/tests/utils.ts b/tests/sanity/tests/utils.ts index 2e6816341a..f1615c2dbb 100644 --- a/tests/sanity/tests/utils.ts +++ b/tests/sanity/tests/utils.ts @@ -258,8 +258,7 @@ export async function createAccount (request: APIRequestContext, data: SignUpDat export async function reLogin (page: Page, data: TestData): Promise<void> { const loginPage: LoginPage = new LoginPage(page) - await loginPage.checkingNeedReLogin() - await (await page.goto(`${PlatformURI}`))?.finished() + await (await page.goto(`${PlatformURI}/login/login`))?.finished() await loginPage.login(data.userName, '1234') const swp = new SelectWorkspacePage(page) await swp.selectWorkspace(data.workspaceName)