UBERF-8993: Fix some flacky tests because of login (#7535)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-12-24 14:48:18 +07:00 committed by GitHub
parent b5166df832
commit 0db7adccd6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 10 deletions

View File

@ -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')
}

View File

@ -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)