test(uplifts): cover an unknown row total with nothing granted on the WO (SH-394)

This commit is contained in:
Alexandre Brandizzi 2026-09-24 23:00:27 -03:00
parent ec3f97dcf6
commit b8d24d75a3

View file

@ -135,6 +135,19 @@ describe("Uplift Approvals: Approved on WO (SH-394)", () => {
}, },
); );
it("shows a dash in both places when the row total is unknown and the WO has nothing granted", async () => {
woUplifts.data = [
{ id: 1, status: "pending", amount: 250 },
{ id: 2, status: "rejected", amount: 80 },
{ id: 3, status: "revoked", amount: 40 },
];
seedQueue({ approvedOnWoTotal: null });
await renderQueuePage();
expect(approvedOnWoColumnText()).toBe("—");
expect(modalTotalText()).toBe("—");
});
it("keeps the modal Total as a dash when the WO uplift lookup fails but the row reports zero", async () => { it("keeps the modal Total as a dash when the WO uplift lookup fails but the row reports zero", async () => {
woUplifts.data = null; woUplifts.data = null;
woUplifts.isError = true; woUplifts.isError = true;