fix(e2e,insights): the coach specs follow the drawer, and the status cards stop tearing hydration

The coach launcher deliberately opens the side drawer in place now —
the spec expected the old navigation and waited for a URL that never
comes; it asserts the drawer (bottom-sheet on the phone viewport) and
the nudge-dot lifecycle instead. The metric and slug status cards
rendered locale-dependent content in the hydration pass, which React
flagged as a mismatch (#418) on the dashboard and the mood page — they
ride the established mounted gate now, pinning the server branch for
the first paint. The midnight flake in the intake bucket tests is
pinned to a fixed clock: the fixtures minted UTC days while the route
buckets Berlin days, so runs between midnight and two failed.
This commit is contained in:
Marc-André Bombeck committed 2026-06-13 01:02:14 +02:00
1 parent a1511b33b3
commit 15c77597fc
9 files changed
+117 -14

No files matched your search

@@ -528,6 +528,25 @@ describe("v1.15.9 — schedule-anchored compliance buckets (BUG #1)", () => {
// engine's expected-dose count per day (not the count of logged intake
// rows). With partial adherence the per-day rate `taken / scheduled`
// genuinely reflects taken-of-expected — it is NOT pinned at ~100%.
//
// The clock is pinned to a fixed midday instant: the fixtures mint one
// event per UTC day, but the route buckets by the user's local
// (Europe/Berlin) day — with a live clock, a run between 00:00 and
// ~01:59 local (UTC date still "yesterday") left the local TODAY
// bucket with `scheduled = 1, taken = 0` and failed the full-adherence
// assertion. At 12:00 UTC the UTC day and the Berlin day coincide, so
// the per-UTC-day fixture math is exact. Only `Date` is faked — the
// route awaits real promises.
beforeEach(() => {
vi.useFakeTimers({
now: new Date("2026-06-10T12:00:00Z"),
toFake: ["Date"],
});
});
afterEach(() => {
vi.useRealTimers();
});
function activeDailyMed(createdAt: Date) {
return {
id: "m1",