puppeteer_tests: Add missing waitFor call to avoid rare flake.

This commit fixes a rare flake where it accidentally clicks
on "Subscribe to more streams"  instead of "Verona"
(stream). This happens because `#stream_filters` list
was not completely updated, i.e. It still had "Venice" and
"Verona" on the list, when it searched for "ver".
When it decided to click on the "Verona", "Venice"
disappeared, which causes "Verona" to move up and
causing "Subscribe to more streams" to click.
This commit is contained in:
Riken Shah
2021-05-10 20:04:56 +00:00
committed by Tim Abbott
parent 13562222fa
commit 8e780a67c3

View File

@@ -368,6 +368,7 @@ async function test_stream_search_filters_stream_list(page: Page): Promise<void>
await page.click("#streams_header .sidebar-title");
await page.type(".stream-list-filter", "ver");
await page.waitForSelector(await get_stream_li(page, "Denmark"), {hidden: true});
await page.waitForSelector(await get_stream_li(page, "Venice"), {hidden: true});
await page.click(await get_stream_li(page, "Verona"));
await expect_verona_stream(page);
assert.strictEqual(