From 11153eb2c889fbb1768c1b42010bcf2d6c6f5638 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Thu, 21 Nov 2024 19:45:34 +0530 Subject: [PATCH] settings: Wait for settings overlay to close. Since pressing `escape` key closes flatpickr and settings overlay at the same time, we need to wait for the settings to be not visible. If we don't wait for the settings overlay to close, the next test could think the settings overlay is already open and continue with its tests which can easily become flaky. --- web/e2e-tests/settings.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/web/e2e-tests/settings.test.ts b/web/e2e-tests/settings.test.ts index 9f70440e3b..4cbd7a2e31 100644 --- a/web/e2e-tests/settings.test.ts +++ b/web/e2e-tests/settings.test.ts @@ -42,6 +42,7 @@ async function close_settings_and_date_picker(page: Page): Promise { await page.keyboard.press("Escape"); await page.waitForSelector(".flatpickr-calendar", {hidden: true}); + await page.waitForSelector("#settings_overlay_container", {hidden: true}); } async function test_change_full_name(page: Page): Promise {