diff --git a/tests/mobile-test.mjs b/tests/mobile-test.mjs index 3b28599..5c9e287 100644 --- a/tests/mobile-test.mjs +++ b/tests/mobile-test.mjs @@ -178,11 +178,13 @@ for (const locale of ["en", "cs"]) { await page.waitForTimeout(800); check("handle+header swipe closes the sheet", (await dialog.count()) === 0); - // backdrop tap + // backdrop tap — at a fixed point near the top: the sheet is max-h-[90dvh], + // so its top edge can never reach it, while a point measured mid-animation + // can end up inside the sheet once the spring settles. await page.locator("nav.tabbar").getByRole("button").click(); await dialog.waitFor({ timeout: 6000 }); - const sheetBox = await box(dialog); - await page.mouse.click(195, Math.max(8, sheetBox.y - 24)); + await page.waitForTimeout(700); + await page.mouse.click(195, 12); await page.waitForTimeout(800); check("backdrop tap closes", (await dialog.count()) === 0);