From b8d24d75a3754e7b1c8708258e6bf5ca11de397f Mon Sep 17 00:00:00 2001 From: Alexandre Brandizzi Date: Thu, 24 Sep 2026 23:00:27 -0300 Subject: [PATCH] test(uplifts): cover an unknown row total with nothing granted on the WO (SH-394) --- .../uplifts/uplift-approved-on-wo-dash.test.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test/app/(protected)/uplifts/uplift-approved-on-wo-dash.test.tsx b/src/test/app/(protected)/uplifts/uplift-approved-on-wo-dash.test.tsx index 9a874e2e..54ae4629 100644 --- a/src/test/app/(protected)/uplifts/uplift-approved-on-wo-dash.test.tsx +++ b/src/test/app/(protected)/uplifts/uplift-approved-on-wo-dash.test.tsx @@ -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 () => { woUplifts.data = null; woUplifts.isError = true;