mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-09-30 05:43:12 +00:00
test(uplifts): cover an unknown row total with nothing granted on the WO (SH-394)
This commit is contained in:
parent
ec3f97dcf6
commit
b8d24d75a3
1 changed files with 13 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue