From 9eff1f070249627e0434aaefcf6743731875721b Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 23 Mar 2021 12:14:42 -0700 Subject: [PATCH] fix: add timeout to logout test --- test/e2e/logout.test.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/e2e/logout.test.ts b/test/e2e/logout.test.ts index 71110562..74df799a 100644 --- a/test/e2e/logout.test.ts +++ b/test/e2e/logout.test.ts @@ -47,11 +47,8 @@ describe("logout", () => { await page.hover(logoutButton) await page.click(logoutButton) - // it takes a second to navigate - // and since page.url comes back immediately - // we need this waitForNavigation, otherwise it will check - // before navigation has finished and fail - await page.waitForNavigation({ url: `${CODE_SERVER_ADDRESS}/login` }) + // it takes a couple seconds to navigate + await page.waitForTimeout(2000) const currentUrl = page.url() expect(currentUrl).toBe(`${CODE_SERVER_ADDRESS}/login`) })