import { screen, within } from "@testing-library/react"; import { describe, expect, it, vi } from "vitest"; import { WO_TABLE_COLS } from "@/app/(protected)/workorders/_components/list/table/wo-table-cols"; import { WoTableHead } from "@/app/(protected)/workorders/_components/list/table/wo-table-head"; import { WoTableRowServiceCells } from "@/app/(protected)/workorders/_components/list/table/wo-table-row-service-cells"; import type { WoTableRowHandlers } from "@/app/(protected)/workorders/_components/list/table/wo-table-row"; import type { WorkOrderTableRow } from "@/domain/work-orders/types/work-order-table-row"; import { renderWithProviders } from "@/test/test-utils"; vi.mock("@/app/(protected)/workorders/_components/list/table/cells/pm-type-cell", () => ({ PMTypeCell: () => cell:service, })); vi.mock("@/app/(protected)/workorders/_components/list/table/cells/vendor-cell", () => ({ VendorCell: () => cell:vendor, })); vi.mock("@/app/(protected)/workorders/_components/list/table/cells/appt-time-cell", () => ({ ApptTimeCell: () => cell:appt, })); vi.mock("@/app/(protected)/workorders/_components/list/table/cells/status-cell", () => ({ StatusCell: () => cell:status, })); vi.mock("@/app/(protected)/workorders/_components/list/table/cells/date-cell", () => ({ DateCell: () => cell:completed, })); vi.mock("@/app/(protected)/workorders/_components/list/table/cells/comp-doc-cell", () => ({ CompDocCell: () => cell:doc, })); vi.mock("@/app/(protected)/workorders/_components/list/table/cells/uplift-cell", () => ({ UpliftCell: () => cell:uplift, })); /** SH-359: documented left-to-right data column order for the Work Orders board. */ const DOCUMENTED_ORDER = [ "SITE", "WO", "TYPE OF WO", "ASSIGNED TO", "SCHEDULE ON", "DUE DATE", "SERVICE", "VENDOR", "APPT TIME", "STATUS", "COMPLETED DATE", "COMP DOC", "UPLIFT", ]; describe("Work Orders board column order (SH-359)", () => { it("renders the documented header order with grip/flag before Site and actions after Uplift", () => { renderWithProviders(