From 5411bb3e4cec66c4a5ddebe609614d0904126601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 26 Jun 2026 14:35:40 +0200 Subject: [PATCH] test(e2e): measure the date-field wrapper for the 44px target sweep The DateField/DateTimeField overlay input sits inside the wrapper's border (~42px); the 44px tap target is the wrapper. Measure the closest date-field wrapper so the sweep reflects the real affordance. --- e2e/settings-mobile-consistency.spec.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/e2e/settings-mobile-consistency.spec.ts b/e2e/settings-mobile-consistency.spec.ts index 7a40bd3c1..a75a456d0 100644 --- a/e2e/settings-mobile-consistency.spec.ts +++ b/e2e/settings-mobile-consistency.spec.ts @@ -48,7 +48,16 @@ test.describe("Settings mobile consistency (Pixel 5)", () => { ) .evaluateAll((els) => els.map((el) => { - const rect = el.getBoundingClientRect(); + // DateField / DateTimeField front an sr-only native input with a + // formatted overlay; the 44px tap target is the wrapper, while the + // overlay sits inside the wrapper's border (≈42px). Measure the + // wrapper for any input inside one so the target-size reflects the + // real affordance, not the inner content box. + const wrapper = el.closest( + '[data-slot="date-field"],[data-slot="date-time-field"]', + ); + const measured = wrapper ?? el; + const rect = measured.getBoundingClientRect(); const style = getComputedStyle(el); return { id: el.id || el.getAttribute("name") || "",