From bdfecfa70e2885ac52f90623e5f7effb2b8fc47a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Wed, 11 Nov 2026 20:03:46 +0100 Subject: [PATCH] test(e2e): build the mock weight bands with the server's helpers The dashboard snapshot mock still called `buildWeightBandsFromHeight`, which went with the weight floor change, and kept the old 30 kg lower edge. It now builds the bands the way `buildTargetBands` does. --- e2e/utils/mock-dashboard-snapshot.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/e2e/utils/mock-dashboard-snapshot.ts b/e2e/utils/mock-dashboard-snapshot.ts index c8df7de9c..8e3ae7574 100644 --- a/e2e/utils/mock-dashboard-snapshot.ts +++ b/e2e/utils/mock-dashboard-snapshot.ts @@ -13,10 +13,11 @@ import type { DashboardTargetBands, } from "@/lib/dashboard/snapshot"; import { getBpTargets } from "@/lib/analytics/bp-targets"; +import { METRIC_BOUNDS } from "@/lib/analytics/effective-range"; import { buildTrafficLightBands, buildTrafficRange, - buildWeightBandsFromHeight, + buildBandsFromTrafficRange, buildWeightRangeFromHeight, getBodyFatTargetRange, } from "@/lib/analytics/value-bands"; @@ -77,8 +78,8 @@ function mockTargetBands(): DashboardTargetBands { upperBound: 55, }), weightRange: buildWeightRangeFromHeight(180), - weightBands: buildWeightBandsFromHeight(180, { - lowerBound: 30, + weightBands: buildBandsFromTrafficRange(buildWeightRangeFromHeight(180), { + lowerBound: METRIC_BOUNDS.WEIGHT.min, upperBound: 250, }), };