We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46dc0fc commit 806022aCopy full SHA for 806022a
test/e2e/logout.test.ts
@@ -46,9 +46,13 @@ describe("logout", () => {
46
47
await page.hover(logoutButton)
48
49
- await Promise.all([page.waitForNavigation(), page.click(logoutButton)])
50
-
51
- const currentUrl = await page.url()
+ await page.click(logoutButton)
+ // it takes a second to navigate
+ // and since page.url comes back immediately
52
+ // we need this waitForNavigation, otherwise it will check
53
+ // before navigation has finished and fail
54
+ await page.waitForNavigation({ url: `${CODE_SERVER_ADDRESS}/login` })
55
+ const currentUrl = page.url()
56
expect(currentUrl).toBe(`${CODE_SERVER_ADDRESS}/login`)
57
})
58
0 commit comments