From 9dcc94841a4bd1d28051215d3660414ca4c5ba30 Mon Sep 17 00:00:00 2001 From: Riken Shah Date: Sat, 22 May 2021 17:22:40 +0000 Subject: [PATCH] puppeteer_tests: Change `test_get_api_key` order to fix the flake. I tried different methods/strategies to find the reason for this flake. But sadly I couldn't find the actual reason for its failure. (Read https://chat.zulip.org/#narrow/stream/43-automated-testing/topic/upgrading.20puppeteer.20to.209.2E1.2E1) Somehow changing of test order i.e moving `test_get_api_key` after `test_change_password` seems to fix the flake. --- frontend_tests/puppeteer_tests/settings.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend_tests/puppeteer_tests/settings.ts b/frontend_tests/puppeteer_tests/settings.ts index 340aecb2c2..5f0fd369a0 100644 --- a/frontend_tests/puppeteer_tests/settings.ts +++ b/frontend_tests/puppeteer_tests/settings.ts @@ -62,7 +62,8 @@ async function test_change_password(page: Page): Promise { // 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"); + 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. @@ -384,8 +385,8 @@ async function settings_tests(page: Page): Promise { await common.log_in(page); await open_settings(page); await test_change_full_name(page); - await test_get_api_key(page); await test_change_password(page); + await test_get_api_key(page); await test_alert_words_section(page); await test_your_bots_section(page); await test_default_language_setting(page);