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.
This commit is contained in:
Marc-André Bombeck committed 2026-06-02 20:52:28 +02:00
1 parent 7b3094eeef
commit 0c8506d7d4
1 file changed
+6 -1
+6 -1
View File
@@ -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,
});
}
}