Skip to content

Commit 28afb37

Browse files
committed
fix: wait for navigation in logout test
1 parent 5596f97 commit 28afb37

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/e2e/logout.test.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describe("logout", () => {
77
let context: BrowserContext
88

99
beforeAll(async () => {
10-
browser = await chromium.launch({ headless: false })
10+
browser = await chromium.launch()
1111
context = await browser.newContext({
1212
recordVideo: { dir: E2E_VIDEO_DIR },
1313
})
@@ -45,7 +45,8 @@ describe("logout", () => {
4545
expect(await page.isVisible(logoutButton))
4646

4747
await page.hover(logoutButton)
48-
await page.click(logoutButton)
48+
49+
await Promise.all([page.waitForNavigation(), page.click(logoutButton)])
4950

5051
const currentUrl = await page.url()
5152
expect(currentUrl).toBe(`${CODE_SERVER_ADDRESS}/login`)

0 commit comments

Comments
 (0)