From 17a2ec3328ea75ffddd6adf0735b9f4342034d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Tue, 4 Aug 2026 02:11:22 +0200 Subject: [PATCH] Give the trigger the same patience the click it replaced had `.click()` carries Playwright's 30 s actionability wait. The visibility check that replaced it ran on the default expect timeout, so the helper made the wait shorter than the code it stood in for, and a dashboard that was slow to paint failed on the trigger rather than on the menu. --- e2e/open-menu.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/e2e/open-menu.ts b/e2e/open-menu.ts index 5fe70144b..228a6f447 100644 --- a/e2e/open-menu.ts +++ b/e2e/open-menu.ts @@ -28,7 +28,11 @@ import { expect, type Locator, type Page } from "@playwright/test"; * nothing. */ export async function openMenu(page: Page, trigger: Locator): Promise { - await expect(trigger).toBeVisible(); + // A bare `.click()` carries Playwright's own 30 s actionability wait, so the + // visibility check that replaces it has to be at least as patient. Left on + // the default expect timeout this helper made the wait SHORTER than the code + // it replaced, and a slow dashboard failed here instead of at the menu. + await expect(trigger).toBeVisible({ timeout: 30_000 }); for (let attempt = 0; attempt < 5; attempt++) { await trigger.click();