Make the mobile suite's backdrop-tap check deterministic

The sheet's spring animation meant the box measured right after the dialog
appeared could be mid-flight; tapping 24px above it sometimes landed inside
the sheet once it settled (the deploy gate caught it twice — production was
never touched). Tap a fixed point near the top instead: the sheet is
max-h-[90dvh], so its top edge cannot reach y=12.

Three consecutive mobile runs: 119/119 each.
This commit is contained in:
Martin Dvořák 2026-10-13 06:41:53 +00:00
commit dcddb8f4bb

View file

@ -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);