shoc-frontend-new/src/test/domain/work-orders/utils/reschedule-indicator.test.ts
Arthur Bassi 7a30335ab8 feat(work-orders): add per-WO Aveta indicators and advanced filter
Dispatchers can flag Aveta on Service and Notes and filter those rows
without a site-level attribute.
2026-08-24 15:16:51 -03:00

16 lines
653 B
TypeScript

import { describe, expect, it } from "vitest";
import { formatRescheduleHover } from "@/domain/work-orders/utils/reschedule-indicator";
describe("formatRescheduleHover", () => {
it("includes the count without an original date when the API omits it", () => {
expect(formatRescheduleHover(4)).toBe(
"Rescheduled 4 times — this WO has had its date changed 4 times.",
);
});
it("appends the original date when the board DTO provides originalDate", () => {
expect(formatRescheduleHover(3, "2026-05-08")).toBe(
"Rescheduled 3 times — this WO has had its date changed 3 times. Original date: May 8, 2026.",
);
});
});