Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
puppeteer: Add missing `{visible: true}` options.
Aman Agrawal619a11a84487
diff --git a/web/e2e-tests/drafts.test.ts b/web/e2e-tests/drafts.test.tsindex 8d2fc0b2d88..fb6c7a4b958 100644--- a/web/e2e-tests/drafts.test.ts+++ b/web/e2e-tests/drafts.test.ts@@ -9,7 +9,7 @@ async function wait_for_drafts_to_disappear(page: Page): Promise<void> {}async function wait_for_drafts_to_appear(page: Page): Promise<void> {- await page.waitForSelector("#draft_overlay.show");+ await page.waitForSelector("#draft_overlay.show", {visible: true});}async function get_drafts_count(page: Page): Promise<number> {diff --git a/web/e2e-tests/realm-playground.test.ts b/web/e2e-tests/realm-playground.test.tsindex f9ce396f2bb..7bb7de6a2c6 100644--- a/web/e2e-tests/realm-playground.test.ts+++ b/web/e2e-tests/realm-playground.test.ts@@ -33,7 +33,7 @@ async function _add_playground_and_return_status(page: Page, payload: Playground});// Wait for the request to complete by checking when the button is re-enabled.- await page.waitForSelector("button#submit_playground_button:not([disabled])");+ await page.waitForSelector("button#submit_playground_button:not([disabled])", {visible: true});// We return the success/failure status message back to the caller.await page.waitForSelector(admin_playground_status_selector, {visible: true});diff --git a/web/e2e-tests/subscribe_toggle.test.ts b/web/e2e-tests/subscribe_toggle.test.tsindex 46887348883..c574c892fa1 100644--- a/web/e2e-tests/subscribe_toggle.test.ts+++ b/web/e2e-tests/subscribe_toggle.test.ts@@ -16,6 +16,7 @@ async function test_subscription_button(page: Page): Promise<void> {`xpath///*[${common.has_class_x("stream-info-title")}]//*[${common.has_class_x("sub_unsub_button",)} and normalize-space()="Unsubscribe"]`,+ {visible: true},);return await page.waitForSelector(subscribed_selector, {visible: true});}@@ -25,6 +26,7 @@ async function test_subscription_button(page: Page): Promise<void> {`xpath///*[${common.has_class_x("stream-info-title")}]//*[${common.has_class_x("sub_unsub_button",)} and normalize-space()="Subscribe"]`,+ {visible: true},);return await page.waitForSelector(unsubscribed_selector, {visible: true});}diff --git a/web/e2e-tests/user-deactivation.test.ts b/web/e2e-tests/user-deactivation.test.tsindex afcbf4ddd03..1375734d531 100644--- a/web/e2e-tests/user-deactivation.test.ts+++ b/web/e2e-tests/user-deactivation.test.ts@@ -47,7 +47,7 @@ async function test_deactivate_user(page: Page): Promise<void> {// Wait for the presence-data fetch in `settings_users.populate_users`// to complete and the table to re-render.await page.waitForSelector(cordelia_user_row + " .loading-placeholder", {hidden: true});- await page.waitForSelector(cordelia_user_row + " .zulip-icon-user-x");+ await page.waitForSelector(cordelia_user_row + " .zulip-icon-user-x", {visible: true});await page.click(cordelia_user_row + " .deactivate");await common.wait_for_micromodal_to_open(page);@@ -68,14 +68,14 @@ async function test_deactivate_user(page: Page): Promise<void> {async function test_reactivate_user(page: Page): Promise<void> {let cordelia_user_row = await user_row(page, common.fullname.cordelia);await page.waitForSelector(cordelia_user_row + ".deactivated_user");- await page.waitForSelector(cordelia_user_row + " .zulip-icon-user-plus");+ await page.waitForSelector(cordelia_user_row + " .zulip-icon-user-plus", {visible: true});await page.click(cordelia_user_row + " .reactivate");await test_reactivation_confirmation_modal(page, common.fullname.cordelia);await page.waitForSelector(cordelia_user_row + ":not(.deactivated_user)", {visible: true});cordelia_user_row = await user_row(page, common.fullname.cordelia);- await page.waitForSelector(cordelia_user_row + " .zulip-icon-user-x");+ await page.waitForSelector(cordelia_user_row + " .zulip-icon-user-x", {visible: true});}async function test_deactivated_users_section(page: Page): Promise<void> {@@ -129,12 +129,12 @@ async function test_bot_deactivation_and_reactivation(page: Page): Promise<void>await common.wait_for_micromodal_to_close(page);await page.waitForSelector(default_bot_user_row + ".deactivated_user", {visible: true});- await page.waitForSelector(default_bot_user_row + " .zulip-icon-user-plus");+ await page.waitForSelector(default_bot_user_row + " .zulip-icon-user-plus", {visible: true});await page.click(default_bot_user_row + " .reactivate");await test_reactivation_confirmation_modal(page, "Zulip Default Bot");await page.waitForSelector(default_bot_user_row + ":not(.deactivated_user)", {visible: true});- await page.waitForSelector(default_bot_user_row + " .zulip-icon-user-x");+ await page.waitForSelector(default_bot_user_row + " .zulip-icon-user-x", {visible: true});}async function user_deactivation_test(page: Page): Promise<void> {