From 9040fff1e2a55bda7fc101ec7acbe6f87c47c977 Mon Sep 17 00:00:00 2001 From: Olumide-01 Date: Mon, 31 Aug 2026 01:57:26 +0100 Subject: [PATCH] test(frontend): add Ready badge snapshot at weighted-quorum boundary Add a snapshot test documenting the Ready badge at the exact weighted-quorum transition boundary where approval weight first meets quorum weight. --- frontend/src/components/StatusBadge.test.tsx | 7 +++++++ .../components/__snapshots__/StatusBadge.test.tsx.snap | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/frontend/src/components/StatusBadge.test.tsx b/frontend/src/components/StatusBadge.test.tsx index 906b044c..9b350a44 100644 --- a/frontend/src/components/StatusBadge.test.tsx +++ b/frontend/src/components/StatusBadge.test.tsx @@ -13,6 +13,13 @@ describe("StatusBadge", () => { expect(container.firstChild).toMatchSnapshot(); }); + it("renders ready badge at the weighted-quorum transition boundary", () => { + // A proposal becomes "Ready" the moment its approval weight exactly meets + // its quorum weight. Snapshotted here: approvalWeight === quorumWeight (e.g. 10 === 10). + const { container } = render(); + expect(container.firstChild).toMatchSnapshot(); + }); + it("renders executed status", () => { const { container } = render(); expect(container.firstChild).toMatchSnapshot(); diff --git a/frontend/src/components/__snapshots__/StatusBadge.test.tsx.snap b/frontend/src/components/__snapshots__/StatusBadge.test.tsx.snap index 0ec5a977..248e7015 100644 --- a/frontend/src/components/__snapshots__/StatusBadge.test.tsx.snap +++ b/frontend/src/components/__snapshots__/StatusBadge.test.tsx.snap @@ -30,6 +30,16 @@ exports[`StatusBadge > renders pending status 1`] = ` `; +exports[`StatusBadge > renders ready badge at the weighted-quorum transition boundary 1`] = ` + + ready + +`; + exports[`StatusBadge > renders ready status 1`] = `