test(e2e): wait for the lab overview read and drop an unused picker type

This commit is contained in:
Marc-André Bombeck committed 2026-10-15 17:31:31 +02:00
1 parent b1c59b908c
commit 140fe7277a
3 files changed
+30 -5

No files matched your search

+29
View File
@@ -605,6 +605,35 @@ async function installA11yMocks(page: Page) {
pdfSupported: true,
}),
);
// The lab list reads one row per marker from the overview route.
await page.route("**/api/labs/overview", (route) =>
fulfilJson(route, {
markers: [
{
key: "analyte:a11y ldl",
count: 1,
trend: [2.4],
latest: {
id: "a11y-lab",
biomarkerId: null,
panel: "A11y panel",
analyte: "A11y LDL",
value: 2.4,
valueText: null,
unit: "mmol/L",
referenceLow: 0,
referenceHigh: 3,
takenAt: "2026-07-19T12:00:00.000Z",
source: "MANUAL",
hasNote: false,
rangeStatus: "inRange",
createdAt: "2026-07-19T12:00:00.000Z",
updatedAt: "2026-07-19T12:00:00.000Z",
},
},
],
}),
);
await page.route("**/api/labs?*", (route) =>
fulfilJson(route, {
results: [
+1 -1
View File
@@ -16,7 +16,7 @@ import {
const DOMAIN_READS = {
measurements: "/api/measurements",
medications: "/api/medications",
labs: "/api/labs",
labs: "/api/labs/overview",
profile: "/api/profile/summary",
illness: "/api/illness/episodes",
mind: "/api/mood-entries",
@@ -198,10 +198,6 @@ export function useLinkPickerPages<T extends { id: string }>({
};
}
export type LinkPickerPages<T extends { id: string }> = ReturnType<
typeof useLinkPickerPages<T>
>;
/**
* Where a record's date splits the list: the end of the UTC day
* {@link ENCOUNTER_SUGGEST_WINDOW_DAYS} days after it, so everything the