From 5e30c07c7935b93bc721620a325b3d71923243b1 Mon Sep 17 00:00:00 2001 From: Arthur Bassi Date: Fri, 24 Jul 2026 10:07:15 -0300 Subject: [PATCH] fix(test): align board-core affordance fixtures with WorkOrderTableRow --- ...ork-orders-board-core-affordances.test.tsx | 41 ++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/src/test/app/(protected)/workorders/work-orders-board-core-affordances.test.tsx b/src/test/app/(protected)/workorders/work-orders-board-core-affordances.test.tsx index c091e708..803a7e16 100644 --- a/src/test/app/(protected)/workorders/work-orders-board-core-affordances.test.tsx +++ b/src/test/app/(protected)/workorders/work-orders-board-core-affordances.test.tsx @@ -53,11 +53,42 @@ vi.mock("@/app/(protected)/workorders/_components/media/media-upload-modal", () MediaUploadModal: () => null, })); -const canceledRow = { +const canceledRow: WorkOrderTableRow = { id: 77, - status: "Canceled", woNumber: "WO-77", -} as WorkOrderTableRow; + site: "CHI-1042", + type: "PM", + dispatcherId: "u1", + dispatcherName: "Test Dispatcher", + scheduledOn: "2026-07-20", + targetWeek: "2026-07-20", + dayGroup: "2026-07-20", + dayLabel: "Mon", + location: "Chicago Loop", + locationId: "mock-loc-1", + pm: "HVAC — Quarterly PM", + company: "", + tech: "", + techPhone: "", + apptStart: "", + apptEnd: "", + apptTime: "", + status: "Canceled", + docStatus: "No", + pocName: "", + pocPhone: "", + pocNotes: "", + dueDate: "", + rescheduleCount: 0, + carriedOver: 0, + originalWeek: "", + originalDate: "", + isPastDue: false, + scheduleWeekOnly: false, + mediaCount: 0, + title: "", + priority: "", +}; vi.mock("@/app/(protected)/workorders/_hooks/use-work-orders-table-data", () => ({ useWorkOrdersTableData: () => ({ @@ -151,7 +182,7 @@ describe("WorkOrdersListPage board-core public interface", () => { describe("CompDocCell slice affordances", () => { it("hides View Doc / Draft when onOpen is omitted", () => { const { container } = renderWithProviders( - , + , { withAuth: false }, ); @@ -161,7 +192,7 @@ describe("CompDocCell slice affordances", () => { it("shows View Doc when onOpen is provided", () => { renderWithProviders( - , + , { withAuth: false }, );