mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 14:16:12 +00:00
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:
1 parent
3fcfe11694
commit
bdfecfa70e
1 file changed
+4
-3
@@ -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,
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user