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.
This commit is contained in:
Marc-André Bombeck committed 2026-11-11 20:03:46 +01:00
1 parent 3fcfe11694
commit bdfecfa70e
1 file changed
+4 -3
+4 -3
View File
@@ -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,
}),
};