mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 14:32:03 +00:00
test(e2e): widen step-transition and provenance assertion timeouts
The wizard step-advance and the AI-read card marker are gated on async settles (per-step validation; list invalidate→refetch); on a loaded CI runner those exceed the default 5s expect timeout, so the assertion samples a mid-transition frame. Widen just those two assertions to 20s — orthogonal to test.slow() (which extends the test, not the expect, timeout).
This commit is contained in:
1 parent
1dd9b92b7d
commit
e48f9859c8
2 files changed
+11
-2
No files matched your search
@@ -369,7 +369,12 @@ test.describe("document vault — AI assist + content search", () => {
|
||||
const marker = page
|
||||
.locator('[data-slot="document-card"]', { hasText: "Radiology note" })
|
||||
.locator('[data-slot="document-searchable"]');
|
||||
await expect(marker).toHaveAttribute("data-source", "ai-read");
|
||||
// The card marker appears after the list query invalidates and refetches
|
||||
// the new provenance; on a loaded runner that round-trip can outlast the
|
||||
// default 5s expect timeout, so wait explicitly for it to resolve.
|
||||
await expect(marker).toHaveAttribute("data-source", "ai-read", {
|
||||
timeout: 20_000,
|
||||
});
|
||||
});
|
||||
|
||||
// ── (f) Text-mode refuses a non-image before any OCR/upload ──────────────
|
||||
|
||||
@@ -221,11 +221,15 @@ export async function expectStep(
|
||||
// stepper landed, so it is hidden on the desktop e2e viewport. Assert the
|
||||
// viewport-independent root data-attributes the dialog always carries.
|
||||
const root = page.locator('[data-slot="medication-wizard-dialog"]');
|
||||
// Each step advance waits on per-step form validation; on a loaded CI runner
|
||||
// that settle can exceed the default 5s expect timeout (the dialog sits at
|
||||
// the prior step when the assertion first samples). Give the step-transition
|
||||
// assertion room so a slow runner doesn't read a mid-transition frame.
|
||||
await expect(root).toHaveAttribute(
|
||||
"data-display-step",
|
||||
String(displayIndex),
|
||||
{
|
||||
timeout: 5_000,
|
||||
timeout: 20_000,
|
||||
},
|
||||
);
|
||||
if (totalSteps != null) {
|
||||
|
||||
Reference in new issue
Block a user