From 140fe7277a2765180076234101ce1d0e022dec6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 15 Oct 2026 17:31:31 +0200 Subject: [PATCH] test(e2e): wait for the lab overview read and drop an unused picker type --- e2e/a11y.spec.ts | 29 +++++++++++++++++++ e2e/v137-sharing-managed-profiles.spec.ts | 2 +- src/components/links/use-link-picker-pages.ts | 4 --- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/e2e/a11y.spec.ts b/e2e/a11y.spec.ts index abc0c487d..e6ac14953 100644 --- a/e2e/a11y.spec.ts +++ b/e2e/a11y.spec.ts @@ -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: [ diff --git a/e2e/v137-sharing-managed-profiles.spec.ts b/e2e/v137-sharing-managed-profiles.spec.ts index 7cd1f9f0b..59928b471 100644 --- a/e2e/v137-sharing-managed-profiles.spec.ts +++ b/e2e/v137-sharing-managed-profiles.spec.ts @@ -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", diff --git a/src/components/links/use-link-picker-pages.ts b/src/components/links/use-link-picker-pages.ts index 28f9e1f41..4a0b13f7e 100644 --- a/src/components/links/use-link-picker-pages.ts +++ b/src/components/links/use-link-picker-pages.ts @@ -198,10 +198,6 @@ export function useLinkPickerPages({ }; } -export type LinkPickerPages = ReturnType< - typeof useLinkPickerPages ->; - /** * 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