mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-08 00:37:42 +00:00
UBERF-8993: Fix some flacky tests because of login (#7535)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
b5166df832
commit
0db7adccd6
@ -59,14 +59,6 @@ export class LoginPage {
|
|||||||
|
|
||||||
// ASSERTS
|
// 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> {
|
async checkIfErrorMessageIsShown (): Promise<void> {
|
||||||
await expect(this.invalidPasswordMessage()).toContainText('Invalid password')
|
await expect(this.invalidPasswordMessage()).toContainText('Invalid password')
|
||||||
}
|
}
|
||||||
|
@ -258,8 +258,7 @@ export async function createAccount (request: APIRequestContext, data: SignUpDat
|
|||||||
|
|
||||||
export async function reLogin (page: Page, data: TestData): Promise<void> {
|
export async function reLogin (page: Page, data: TestData): Promise<void> {
|
||||||
const loginPage: LoginPage = new LoginPage(page)
|
const loginPage: LoginPage = new LoginPage(page)
|
||||||
await loginPage.checkingNeedReLogin()
|
await (await page.goto(`${PlatformURI}/login/login`))?.finished()
|
||||||
await (await page.goto(`${PlatformURI}`))?.finished()
|
|
||||||
await loginPage.login(data.userName, '1234')
|
await loginPage.login(data.userName, '1234')
|
||||||
const swp = new SelectWorkspacePage(page)
|
const swp = new SelectWorkspacePage(page)
|
||||||
await swp.selectWorkspace(data.workspaceName)
|
await swp.selectWorkspace(data.workspaceName)
|
||||||
|
Loading…
Reference in New Issue
Block a user