From e7395398ca92e4a60e1bc0d48fdf2636eed73876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Wed, 26 Aug 2026 18:49:59 +0200 Subject: [PATCH] Anchor the a11y weight fixture on now The a11y matrix feeds the weight sub-page chart ten rows with absolute July dates. The range tabs are calendar-day windows anchored on now, so those rows aged out of the default window, the page rendered its empty state, and the .recharts-wrapper painted gate timed out on every shard and theme. Relative dates keep the fixture inside the window on any date, same as the charts-mobile spec already does. --- e2e/a11y.spec.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/e2e/a11y.spec.ts b/e2e/a11y.spec.ts index 5311a50d8..37b124f6d 100644 --- a/e2e/a11y.spec.ts +++ b/e2e/a11y.spec.ts @@ -60,11 +60,17 @@ const A11Y_WORKOUT_ID = "a11y-workout"; const A11Y_CONVERSATION_ID = "a11y-conversation"; const A11Y_DOCUMENT_ID = "a11y-document"; +// Ten daily rows ending half a day before now. The chart range tabs are +// calendar-day windows anchored on now (v1.37.29), so absolute-dated rows +// age out of the default window — the weight sub-page would render its +// empty state and the `.recharts-wrapper` painted gate would never fire. const fixedMeasurementRows = Array.from({ length: 10 }, (_, index) => ({ id: `a11y-measurement-${index}`, type: "WEIGHT", value: 78.5 + (index % 3) - 1, - measuredAt: `2026-07-${String(20 - index).padStart(2, "0")}T08:00:00.000Z`, + measuredAt: new Date( + Date.now() - 12 * 3_600_000 - index * 86_400_000, + ).toISOString(), source: "MANUAL", notes: null, }));