Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
puppeteer: Wait for password strength checker before submitting.
Aman Agrawald36fafc7678a
diff --git a/web/e2e-tests/settings.test.ts b/web/e2e-tests/settings.test.tsindex fd18b16a8fa..a22086c67a2 100644--- a/web/e2e-tests/settings.test.ts+++ b/web/e2e-tests/settings.test.ts@@ -77,6 +77,12 @@ async function test_change_password(page: Page): Promise<void> {await page.type("#old_password", test_credentials.default_user.password);test_credentials.default_user.password = "new_password";await page.type("#new_password", test_credentials.default_user.password);++ // The password strength checker (zxcvbn) is imported asynchronously,+ // and submitting before it loads makes the handler bail out with an+ // internal error, leaving the modal open. The strength bar is hidden+ // until the module finishes loading, so wait for it to become visible.+ await page.waitForSelector("#pw_strength .bar", {visible: true});await page.click(change_password_button_selector);// On success the change password modal gets closed.