Skip to content

Commit 9eff1f0

Browse files
committed
fix: add timeout to logout test
1 parent 090687d commit 9eff1f0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/e2e/logout.test.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,8 @@ describe("logout", () => {
4747
await page.hover(logoutButton)
4848

4949
await page.click(logoutButton)
50-
// it takes a second to navigate
51-
// 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` })
50+
// it takes a couple seconds to navigate
51+
await page.waitForTimeout(2000)
5552
const currentUrl = page.url()
5653
expect(currentUrl).toBe(`${CODE_SERVER_ADDRESS}/login`)
5754
})

0 commit comments

Comments
 (0)