Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

puppeteer: Wait for navigation after clicking logout.

Aman Agrawal3a0fb2ff3896
diff --git a/web/e2e-tests/lib/common.ts b/web/e2e-tests/lib/common.ts
index c3845e23edb..08b2c4885d7 100644
--- a/web/e2e-tests/lib/common.ts
+++ b/web/e2e-tests/lib/common.ts
@@ -286,7 +286,7 @@ export async function log_out(page: Page): Promise<void> {
await page.waitForSelector(menu_selector, {visible: true});
await page.click(menu_selector);
await page.waitForSelector(logout_selector);
- await page.click(logout_selector);
+ await Promise.all([page.waitForNavigation(), page.click(logout_selector)]);
// Wait for a email input in login page so we know login
// page is loaded. Then check that we are at the login url.