Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
puppeteer_test/16: Fix `:focus` not working with Firefox.
Riken Shahd2980f1042ef
diff --git a/frontend_tests/puppeteer_tests/16-settings.ts b/frontend_tests/puppeteer_tests/16-settings.tsindex c3ecc0e39c6..cab05d815a9 100644--- a/frontend_tests/puppeteer_tests/16-settings.ts+++ b/frontend_tests/puppeteer_tests/16-settings.ts@@ -53,7 +53,11 @@ async function test_change_password(page: Page): Promise<void> {const change_password_button_selector = "#change_password_button";await page.waitForSelector(change_password_button_selector, {visible: true});- await page.waitForFunction(() => $(":focus").attr("id") === "change_password_modal");+ // For some strange reason #change_password_modal:focus is not working with Firefox.+ // The below line is an alternative to that.+ // TODO: Replace the below line with `await page.waitForSelector("#change_password_modal:focus", {visible: true})`+ // when the above issue is resolved.+ await page.waitForFunction(() => document.activeElement!.id === "change_password_modal");await page.type("#old_password", test_credentials.default_user.password);await page.type("#new_password", "new_password");await page.click(change_password_button_selector);