mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-03 01:03:21 +00:00
Dispatchers can flag Aveta on Service and Notes and filter those rows without a site-level attribute.
16 lines
653 B
TypeScript
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.",
|
|
);
|
|
});
|
|
});
|