From 8e780a67c39a57ce7e9a07c52dcb7ae0aef6da35 Mon Sep 17 00:00:00 2001 From: Riken Shah Date: Mon, 10 May 2021 20:04:56 +0000 Subject: [PATCH] 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. --- frontend_tests/puppeteer_tests/message-basics.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend_tests/puppeteer_tests/message-basics.ts b/frontend_tests/puppeteer_tests/message-basics.ts index 727898c300..b92e8ddf1a 100644 --- a/frontend_tests/puppeteer_tests/message-basics.ts +++ b/frontend_tests/puppeteer_tests/message-basics.ts @@ -368,6 +368,7 @@ async function test_stream_search_filters_stream_list(page: Page): Promise 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(