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: Fix test flake in admin tests.

Dinesh77bea3de7aec
diff --git a/frontend_tests/puppeteer_tests/08-admin.js b/frontend_tests/puppeteer_tests/08-admin.js
index e370ea5f2bf..9cf1c5e8ed9 100644
--- a/frontend_tests/puppeteer_tests/08-admin.js
+++ b/frontend_tests/puppeteer_tests/08-admin.js
@@ -35,9 +35,12 @@ async function test_change_new_stream_notifications_setting(page) {
"#realm_notifications_stream_id_widget .dropdown-search > input[type=text]",
"verona",
);
- await page.click(
- "#realm_notifications_stream_id_widget .dropdown-list-body > li:nth-of-type(1)",
- );
+
+ const verona_in_dropdown =
+ "#realm_notifications_stream_id_widget .dropdown-list-body > li:nth-of-type(1)";
+ await page.waitForSelector(verona_in_dropdown, {visible: true});
+ await page.click(verona_in_dropdown);
+
await submit_notifications_stream_settings(page);
const disable_stream_notifications =