diff --git a/docs/guide-utilisateur.md b/docs/guide-utilisateur.md index d6a47f1..793f38c 100644 --- a/docs/guide-utilisateur.md +++ b/docs/guide-utilisateur.md @@ -183,7 +183,7 @@ Les cartes de crédit n'offrent qu'environ trois mois d'historique. #### BMO -*Procédure reconstituée (fournie par Max le 2026-10-03, d'après une description générale), à confirmer sur un compte réel ; format de fichier non encore reconnu (#371)* +*Procédure reconstituée d'après une description générale, à confirmer sur un compte réel ; format de fichier non encore reconnu* 1. Connectez-vous aux Services bancaires en ligne BMO sur bmo.com (le site, pas l'application) 2. Dans le sommaire, cliquez sur le compte voulu (chèques, épargne ou Mastercard) diff --git a/src/hooks/useImportWizard.test.ts b/src/hooks/useImportWizard.test.ts index 47d16b5..0f29cf3 100644 --- a/src/hooks/useImportWizard.test.ts +++ b/src/hooks/useImportWizard.test.ts @@ -8,7 +8,7 @@ // dispatches), and never touched by an error — which also leaves the scanned // sources exactly as they were. Plus the local-date helper handed to Rust. -import { describe, it, expect, vi } from "vitest"; +import { describe, it, expect, vi, beforeAll, afterAll } from "vitest"; // The hook module imports the import services (→ db → tauri plugins). Stub the // connection so importing the module never touches a real database. @@ -111,11 +111,23 @@ describe("wizardReducer — sampleCreated (#356)", () => { }); describe("formatLocalDate (#356)", () => { + // Pin a timezone west of Greenwich: under TZ=UTC (the CI runner) local and + // UTC dates coincide, so a `toISOString()` regression would pass unnoticed. + const originalTz = process.env.TZ; + beforeAll(() => { + process.env.TZ = "America/Toronto"; + }); + afterAll(() => { + if (originalTz === undefined) delete process.env.TZ; + else process.env.TZ = originalTz; + }); + it("formats the LOCAL calendar date, zero-padded", () => { // Built from local components, so the expectation holds in every timezone — // unlike `toISOString()`, which would shift this evening date to the 6th - // east of Greenwich and to the 4th west of it. + // in Toronto (04:30Z the next day). expect(formatLocalDate(new Date(2026, 0, 5, 23, 30))).toBe("2026-01-05"); + expect(new Date(2026, 0, 5, 23, 30).toISOString().slice(0, 10)).not.toBe("2026-01-05"); expect(formatLocalDate(new Date(2026, 11, 31, 0, 0))).toBe("2026-12-31"); }); }); diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 73e6abc..d4a91a5 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -996,7 +996,7 @@ { "id": "import-bmo", "title": "BMO", - "status": "Procedure reconstructed (provided by Max on 2026-10-03 from a general description), to be confirmed on a real account; file format not recognised yet (#371)", + "status": "Procedure reconstructed from a general description, to be confirmed on a real account; file format not recognised yet", "steps": [ "Sign in to BMO Online Banking at bmo.com (the website, not the app)", "In the summary, click the account you want (chequing, savings or Mastercard)", diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index 894c897..a6a00e0 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -996,7 +996,7 @@ { "id": "import-bmo", "title": "BMO", - "status": "Procédure reconstituée (fournie par Max le 2026-10-03, d'après une description générale), à confirmer sur un compte réel ; format de fichier non encore reconnu (#371)", + "status": "Procédure reconstituée d'après une description générale, à confirmer sur un compte réel ; format de fichier non encore reconnu", "steps": [ "Connectez-vous aux Services bancaires en ligne BMO sur bmo.com (le site, pas l'application)", "Dans le sommaire, cliquez sur le compte voulu (chèques, épargne ou Mastercard)", diff --git a/src/pages/DashboardPage.tsx b/src/pages/DashboardPage.tsx index 13f5c24..f68fecc 100644 --- a/src/pages/DashboardPage.tsx +++ b/src/pages/DashboardPage.tsx @@ -109,7 +109,11 @@ export default function DashboardPage() { ); } - const showCompactChecklist = checklistReady && !onboarding.hidden && !checklist.complete; + // `complete` is computed with the fail-closed entitlement (Budget locked → 5/5) + // until the licence resolves; gate on `budgetReady` so a Base+ profile with the + // five other items done does not see the list vanish, then reappear as 5/6. + const showCompactChecklist = + checklistReady && !onboarding.hidden && !(onboarding.budgetReady && checklist.complete); return (