diff --git a/tests/e2e/login-flows.spec.ts b/tests/e2e/login-flows.spec.ts index 09a1fc8b..94460aeb 100644 --- a/tests/e2e/login-flows.spec.ts +++ b/tests/e2e/login-flows.spec.ts @@ -98,6 +98,11 @@ test.describe("Login and authentication flows", () => { (window as any).__bitvidTest__.logout(); }); + // Wait for state to settle + await page.waitForFunction(() => { + return (window as any).__bitvidTest__.getAppState().isLoggedIn === false; + }); + const loggedOut = await page.evaluate(() => { return (window as any).__bitvidTest__.getAppState(); });