diff --git a/frontend/e2e/interactive-elements.spec.ts b/frontend/e2e/interactive-elements.spec.ts index a00160c..c771b80 100644 --- a/frontend/e2e/interactive-elements.spec.ts +++ b/frontend/e2e/interactive-elements.spec.ts @@ -130,9 +130,13 @@ test("return preview correctly reports blocked (not maintenance) for damage repo // The preview is the server's authoritative evaluation: damage always routes to // "blocked", never "maintenance" -- this used to be guessed client-side and wrong. - await expect(page.getByText("Damage was reported on return.")).toBeVisible(); + // The localized reason is the primary text; the raw code sits behind "Technical + // details" so it isn't visible until expanded. + await expect(page.getByText("Damage was reported on this return.")).toBeVisible(); const statusRegion = page.locator(".impact-preview"); await expect(statusRegion.getByText("blocked", { exact: true })).toBeVisible(); + await page.getByText("Technical details").click(); + await expect(page.getByText("Damage was reported on return.")).toBeVisible(); }); test("data quality page: status and rule-type filters work", async ({ page }) => { @@ -201,8 +205,8 @@ test("data quality: applying the recommended status resolves a vehicle conflict" await page.goto("/data-quality/DQ-DEMO-STATUS"); await expect(page.getByRole("heading", { name: "DQ-DEMO-STATUS" })).toBeVisible(); - await page.getByRole("button", { name: "Calculate and apply recommended status" }).click(); - await page.getByRole("button", { name: "Yes, apply" }).click(); + await page.getByRole("button", { name: "Review recommendation" }).click(); + await page.getByRole("button", { name: /^Change status to/ }).click(); await expect(page.getByText("Applied", { exact: false })).toBeVisible(); });