Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions frontend/src/components/StatusBadge.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(<StatusBadge status="ready" />);
expect(container.firstChild).toMatchSnapshot();
});

it("renders executed status", () => {
const { container } = render(<StatusBadge status="executed" />);
expect(container.firstChild).toMatchSnapshot();
Expand Down
10 changes: 10 additions & 0 deletions frontend/src/components/__snapshots__/StatusBadge.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ exports[`StatusBadge > renders pending status 1`] = `
</span>
`;

exports[`StatusBadge > renders ready badge at the weighted-quorum transition boundary 1`] = `
<span
aria-label="Status: ready"
class="text-xs px-2 py-0.5 rounded-full font-mono bg-emerald-500/10 text-emerald-400 border border-emerald-500/20"
role="status"
>
ready
</span>
`;

exports[`StatusBadge > renders ready status 1`] = `
<span
aria-label="Status: ready"
Expand Down