Compare commits

..

1 commit

Author SHA1 Message Date
adf5d1a2eb fix(mobile): lance la vérification de mise à jour à chaque ouverture (#106)
Some checks failed
CI / lint (push) Successful in 2m47s
CI / build (push) Successful in 4m8s
CI / intent-service-test (push) Successful in 6m13s
CI / e2e (push) Failing after 9m3s
CI / test (push) Successful in 31m5s
CI / build-android (push) Has been skipped
`useAppUpdateCheck` tournait au montage de `<UpdateBanner />`, mais celui-ci
n'était monté que dans `AppLayout`, derrière `RequireAuth` : un utilisateur
non connecté sur l'app native voit `LandingPage`, `AppLayout` n'est jamais
monté, donc aucune vérification tant qu'on n'est pas connecté — alors que
le back suppose l'inverse (`mobile.routes.ts` : « runs on every app start,
session or not »).

- `<UpdateBanner />` monté dans `App.tsx`, hors `<Routes>`, donc rendu pour
  toute route quel que soit l'état d'auth. Garde `!isNativePlatform()` et
  throttle 6 h inchangés ; rend toujours `null` sur le web.
- `update-banner.scss` : passe en `position: fixed` (bandeau haut,
  `env(safe-area-inset-top)`, `z-index: 100`) pour ne pas entrer dans la
  mise en page / le calcul de hauteur d'une page routée (`.app-layout` est
  `height: 100vh; overflow: hidden`).

Pas de test e2e : `Capacitor.isNativePlatform()` n'a pas de couture pour
simuler le natif depuis un run web (posture déjà assumée pour
`useAppUpdateCheck` / `UpdateBanner`, voir `app-settings-page.cy.ts`). Suite
e2e existante (layout / smoke / app-settings) revérifiée : aucun régression.

Closes #106

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-08 02:09:15 +02:00

View file

@ -283,13 +283,6 @@ describe("Responsive breakpoint — page content under 640px (issue #39)", () =>
// *that* switch; the day view's own day-by-day content is // *that* switch; the day view's own day-by-day content is
// PlanningPage.tsx's own spec (planning-page.cy.ts). // 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", () => { 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\?/, { cy.intercept("GET", /\/planning\?/, {
statusCode: 200, statusCode: 200,
body: { body: {