mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 06:06:10 +00:00
chore: reconcile the catalogue and metric-unit guards
The widget catalogue grew to 42 ids, so the snapshot round-trip count follows. The mood card's unit key carries "/5" rather than an empty string — the locale-integrity guard forbids empty values, and the scale is the honest thing to print next to a 1-to-5 score. It joins the identical-across-locales allowlist alongside the other unit notations.
This commit is contained in:
1 parent
4c3cc84daf
commit
30954901ac
9 files changed
+10
-11
No files matched your search
@@ -752,11 +752,11 @@ describe("buildDashboardSnapshot — layoutCatalogue (35-id round-trip)", () =>
|
||||
isFullyCovered.mockReturnValue(false);
|
||||
});
|
||||
|
||||
it("emits all 38 catalogue ids with visibility + order", async () => {
|
||||
it("emits all 42 catalogue ids with visibility + order", async () => {
|
||||
const snap = await buildDashboardSnapshot(fakePrisma, baseUser());
|
||||
expect(snap.layoutCatalogue).toHaveLength(38);
|
||||
expect(snap.layoutCatalogue).toHaveLength(42);
|
||||
const ids = new Set(snap.layoutCatalogue.map((w) => w.id));
|
||||
expect(ids.size).toBe(38);
|
||||
expect(ids.size).toBe(42);
|
||||
// iOS-only ids appended default-invisible.
|
||||
const walkingSpeed = snap.layoutCatalogue.find(
|
||||
(w) => w.id === "walkingSpeed",
|
||||
|
||||
Reference in new issue
Block a user