diff --git a/src/utils/onboardingChecklist.test.ts b/src/utils/onboardingChecklist.test.ts index c740028..16d2c1e 100644 --- a/src/utils/onboardingChecklist.test.ts +++ b/src/utils/onboardingChecklist.test.ts @@ -1,6 +1,11 @@ import { describe, it, expect } from "vitest"; import { computeChecklist, shouldAcknowledgeVisitSteps } from "./onboardingChecklist"; -import type { ChecklistItemKey, OnboardingCounters } from "../shared/types"; +import { + CHECKLIST_ITEM_KEYS, + VISIT_STEP_KEYS, + type ChecklistItemKey, + type OnboardingCounters, +} from "../shared/types"; const zero: OnboardingCounters = { sources: 0, @@ -38,6 +43,12 @@ describe("computeChecklist — rows (#351)", () => { ]); }); + it("CHECKLIST_ITEM_KEYS lists the rows in their order, VISIT_STEP_KEYS the two visit steps", () => { + // The reducer keeps skipped and acknowledged steps in this order (`withStep`). + expect(CHECKLIST_ITEM_KEYS).toEqual(keys(zero)); + expect(VISIT_STEP_KEYS).toEqual(["categories", "reports"]); + }); + it("zero counters → only profile is done (1/8)", () => { const list = computeChecklist(zero, open); expect(doneKeys(zero)).toEqual(["profile"]);