test(work-orders): assert completed status as display text

This commit is contained in:
Alexandre Brandizzi 2026-09-29 19:13:51 -03:00
parent fdbb602e0c
commit 262c93b41c

View file

@ -336,7 +336,7 @@ test.describe("Inline technician registration", () => {
),
)
.toBe(true);
await expect(reloadedRow.getByRole("button", { name: /completed/i })).toBeVisible();
await expect(reloadedRow.getByText("Completed", { exact: true })).toBeVisible();
await reloadedRow.getByRole("button", { name: /Coastal HVAC/ }).click();
const completedDialog = page.getByRole("dialog");
await expect(completedDialog.getByText("—", { exact: true })).toBeVisible();
@ -435,7 +435,7 @@ test.describe("Inline technician registration", () => {
await expect
.poll(() => writes.filter((write) => write.pathname === "/api/workorders/1/board").length)
.toBe(2);
await expect(reloadedRow.getByRole("button", { name: /completed/i })).toBeVisible();
await expect(reloadedRow.getByText("Completed", { exact: true })).toBeVisible();
expect(
writes.some(
(write) =>