modify logout logic in e2e
This commit is contained in:
parent
9edce2d3aa
commit
305acec19f
1 changed files with 3 additions and 8 deletions
|
|
@ -34,14 +34,9 @@ const logout = async (page) => {
|
||||||
name: 'Logout',
|
name: 'Logout',
|
||||||
exact: true,
|
exact: true,
|
||||||
})
|
})
|
||||||
if (await confirmLogout.isVisible()) {
|
await expect(confirmLogout).toBeVisible()
|
||||||
await Promise.all([
|
await confirmLogout.click()
|
||||||
page.waitForURL(/\/main\/(public|all)/),
|
await page.waitForURL(/\/main\/(public|all)/)
|
||||||
confirmLogout.click(),
|
|
||||||
])
|
|
||||||
} else {
|
|
||||||
await page.waitForURL(/\/main\/(public|all)/)
|
|
||||||
}
|
|
||||||
|
|
||||||
await expect(page.locator('#sidebar form.login-form')).toBeVisible()
|
await expect(page.locator('#sidebar form.login-form')).toBeVisible()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue