From 0c8506d7d4351e71c47e5f79e210f20a754c4380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Tue, 2 Jun 2026 20:52:28 +0200 Subject: [PATCH] test(e2e): give the next-due chip assertion the 10s budget the name has The medication-list next-due line is computed client-side from the schedule after hydration, so on a loaded CI runner it can appear a beat after the medication name. The chip assertion used the default 5s timeout while the name assertion above it uses 10s; align them so the check isn't racing hydration. --- e2e/medications-wizard-helpers.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/e2e/medications-wizard-helpers.ts b/e2e/medications-wizard-helpers.ts index eba4a9f2a..8d2543581 100644 --- a/e2e/medications-wizard-helpers.ts +++ b/e2e/medications-wizard-helpers.ts @@ -255,6 +255,11 @@ export async function expectMedicationOnList( const main = page.locator("main"); await expect(main.getByText(name).first()).toBeVisible({ timeout: 10_000 }); if (withNextDueChip) { - await expect(main.getByText(/Nächste Einnahme:/i).first()).toBeVisible(); + // The next-due line is computed client-side from the schedule after + // hydration, so it can land a beat after the name on a loaded runner; + // match the name assertion's 10s budget rather than the default 5s. + await expect(main.getByText(/Nächste Einnahme:/i).first()).toBeVisible({ + timeout: 10_000, + }); } }