mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 05:12:14 +00:00
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:
1 parent
7b3094eeef
commit
0c8506d7d4
1 file changed
+6
-1
@@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user