puppeteer: Fix unsaved status selector waitFor timeout.

Added a stronger validation of waiting for text "Verona" to
appear but that didn't really seem to have worked though it
seemed like fixing the flake by passing ~600 runs.
So, change the puppeteer click to a click through evaluate
as we had experiences where page.click() didn't work sometimes.

Though this has passed 1000 runs on CI, I'm not very certain
if this fixed it as this test passed 1000 times with my previous
PR fixing the same flake.
This commit is contained in:
Dinesh
2020-09-05 15:49:56 +00:00
committed by Steve Howell
parent 7b62d31c32
commit 1f62ba5750

View File

@@ -38,8 +38,10 @@ async function test_change_new_stream_notifications_setting(page) {
const verona_in_dropdown =
"#realm_notifications_stream_id_widget .dropdown-list-body > li:nth-of-type(1)";
await common.wait_for_text(page, verona_in_dropdown, "Verona");
await page.waitForSelector(verona_in_dropdown, {visible: true});
await page.click(verona_in_dropdown);
await page.evaluate((selector) => $(selector).click(), verona_in_dropdown);
await submit_notifications_stream_settings(page);