From 353d0f9e4fd4edbf631c88aa9746387cbb63bac0 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Fri, 25 Feb 2022 16:37:50 +0000 Subject: [PATCH] puppeteer flake: Remove call to test_change_password(). Changing the password seems to randomly cause one of our calls to /json/events to return a 401. The symptom of this is that when you update alert words, we don't get the event, and the alert words list does not get updated. More context here: https://chat.zulip.org/#narrow/stream/43-automated-testing/topic/alert.20word.20flakes/near/1334824 It is possible that this reflects an actual problem in our system when you update passwords. For now, though, the goal is simply to make this test reliable, so that we don't have to chase down this flake any more. It was a particularly tricky flake to debug, since the alert words test really wasn't at fault here. It's plausible that we don't want to have the app declare success when the server acks an alert word POST, and the app should instead wait for the event to come back before giving any confirmation to the user. --- frontend_tests/puppeteer_tests/settings.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/frontend_tests/puppeteer_tests/settings.ts b/frontend_tests/puppeteer_tests/settings.ts index 1f08edd431..19a3cb641b 100644 --- a/frontend_tests/puppeteer_tests/settings.ts +++ b/frontend_tests/puppeteer_tests/settings.ts @@ -46,24 +46,8 @@ async function test_change_full_name(page: Page): Promise { await page.waitForFunction(() => $("#full_name").val() === "New name"); } -async function test_change_password(page: Page): Promise { - await page.click('[data-section="account-and-privacy"]'); - await page.click("#change_password"); - - const change_password_button_selector = "#change_password_modal .dialog_submit_button"; - await page.waitForSelector(change_password_button_selector, {visible: true}); - - await common.wait_for_micromodal_to_open(page); - 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); - await page.click(change_password_button_selector); - - // On success the change password modal gets closed. - await common.wait_for_micromodal_to_close(page); -} - async function test_get_api_key(page: Page): Promise { + await page.click('[data-section="account-and-privacy"]'); const show_change_api_key_selector = "#api_key_button"; await page.click(show_change_api_key_selector); @@ -398,7 +382,6 @@ async function settings_tests(page: Page): Promise { await common.log_in(page); await open_settings(page); await test_change_full_name(page); - await test_change_password(page); await test_get_api_key(page); await test_alert_words_section(page); await test_your_bots_section(page);