diff --git a/src/test/app/(protected)/workorders/wo-table-inline-status-schedule.test.tsx b/src/test/app/(protected)/workorders/wo-table-inline-status-schedule.test.tsx index 38e0014e..cb54296e 100644 --- a/src/test/app/(protected)/workorders/wo-table-inline-status-schedule.test.tsx +++ b/src/test/app/(protected)/workorders/wo-table-inline-status-schedule.test.tsx @@ -36,7 +36,7 @@ vi.mock("@/app/(protected)/workorders/_components/list/table/cells/appt-time-cel })); describe("WoTableInlineRow StatusCell with a concrete schedule", () => { - it("keeps Scheduled when Incomplete is picked on a dated draft", () => { + it("disables Pending on a dated draft", () => { const onChange = vi.fn(); const draft = { ...EMPTY_TABLE_DRAFT, @@ -66,8 +66,10 @@ describe("WoTableInlineRow StatusCell with a concrete schedule", () => { ); fireEvent.click(screen.getByRole("button", { name: /incomplete/i })); - fireEvent.click(screen.getByRole("button", { name: /^pending$/i })); + const pending = screen.getByRole("button", { name: /^pending$/i }); - expect(onChange).toHaveBeenCalledWith(expect.objectContaining({ status: "Scheduled" })); + expect(pending).toBeDisabled(); + fireEvent.click(pending); + expect(onChange).not.toHaveBeenCalledWith(expect.objectContaining({ status: "Pending" })); }); });