fix: add timeout to logout test
This commit is contained in:
parent
090687d057
commit
9eff1f0702
@ -47,11 +47,8 @@ describe("logout", () => {
|
|||||||
await page.hover(logoutButton)
|
await page.hover(logoutButton)
|
||||||
|
|
||||||
await page.click(logoutButton)
|
await page.click(logoutButton)
|
||||||
// it takes a second to navigate
|
// it takes a couple seconds to navigate
|
||||||
// and since page.url comes back immediately
|
await page.waitForTimeout(2000)
|
||||||
// we need this waitForNavigation, otherwise it will check
|
|
||||||
// before navigation has finished and fail
|
|
||||||
await page.waitForNavigation({ url: `${CODE_SERVER_ADDRESS}/login` })
|
|
||||||
const currentUrl = page.url()
|
const currentUrl = page.url()
|
||||||
expect(currentUrl).toBe(`${CODE_SERVER_ADDRESS}/login`)
|
expect(currentUrl).toBe(`${CODE_SERVER_ADDRESS}/login`)
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user