From fbb49bc560a31c851e62c7c03c400b9489d855a4 Mon Sep 17 00:00:00 2001 From: Simon Bernier St-Pierre Date: Sat, 1 Aug 2026 23:05:20 -0400 Subject: [PATCH] fix flaky e2e test --- .gitignore | 1 + e2e/tests/add-meal.spec.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a8e4a56..8740028 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /e2e/node_modules/ /e2e/test-results/ /e2e/playwright-report/ +/test-results/ diff --git a/e2e/tests/add-meal.spec.ts b/e2e/tests/add-meal.spec.ts index d1963c0..7119cbd 100644 --- a/e2e/tests/add-meal.spec.ts +++ b/e2e/tests/add-meal.spec.ts @@ -48,7 +48,7 @@ test("the add-meal picker closes when clicking outside", async ({ page }) => { const picker = page.locator(".meal-picker-backdrop"); await expect(picker).toBeVisible(); - // Click the backdrop itself (outside the modal card). - await picker.click({ position: { x: 5, y: 5 } }); + // Click the backdrop itself (outside the modal card), at the viewport corner. + await page.mouse.click(10, 10); await expect(picker).toHaveCount(0); });