Merge pull request 'fix(test): fige l'horloge dans le spec vue-mobile-jour de layout.cy.ts' (#115) from fix/layout-spec-freeze-clock into main
All checks were successful
CI / lint (push) Successful in 3m52s
CI / build (push) Successful in 3m52s
CI / intent-service-test (push) Successful in 5m4s
CI / e2e (push) Successful in 13m1s
CI / test (push) Successful in 21m6s
CI / build-android (push) Successful in 6m27s

This commit is contained in:
kyuno 2026-09-08 03:04:36 +02:00
commit 99d7badddf

View file

@ -283,6 +283,13 @@ describe("Responsive breakpoint — page content under 640px (issue #39)", () =>
// *that* switch; the day view's own day-by-day content is
// PlanningPage.tsx's own spec (planning-page.cy.ts).
it("shows the one-day mobile view instead of the horizontally-scrolling grid, on a phone", () => {
// `PlanningDayView` opens on *today's* weekday within the shown week
// (`defaultDayIndexForWeek`, derived from `Date`). Freeze "today" to a
// Monday so it opens on "lundi" — where the mocked recipe below is —
// instead of drifting with the real date (this test used to pass only
// when CI happened to run on a Monday, UTC). `["Date"]` only, so
// timers/debounces still run.
cy.clock(new Date("2026-08-17T09:00:00.000Z"), ["Date"]);
cy.intercept("GET", /\/planning\?/, {
statusCode: 200,
body: {