puppeteer_test: Add waitForNavigation when reloading.

This commit ensures that it waits until the
page is reloaded which avoids uncertain
flake.
This commit is contained in:
Riken Shah 2021-03-03 04:51:58 +00:00 committed by Tim Abbott
parent de96aeb822
commit dc5095bad9

View File

@ -58,6 +58,7 @@ async function test_reload_hash(page: Page): Promise<void> {
const initial_hash = await page.evaluate(() => window.location.hash);
await page.evaluate(() => zulip_test.initiate_reload({immediate: true}));
await page.waitForNavigation();
await page.waitForSelector("#zfilt", {visible: true});
const page_load_time = await page.evaluate(() => page_params.page_load_time);