Stop seeding 75% consensus on custom decision cards so wizard copy shows on the published rule.
Wire Back on the final-review chip editor to the same dismiss path as close, instead of a no-op. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -50,4 +50,26 @@ describe("CommunityRule", () => {
|
||||
);
|
||||
expect(screen.getByText("How proposals pass")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("renders entry body together with labeled blocks", () => {
|
||||
render(
|
||||
<CommunityRule
|
||||
sections={[
|
||||
{
|
||||
categoryName: "Decision-making",
|
||||
entries: [
|
||||
{
|
||||
title: "Forum proposals",
|
||||
body: "Anyone can start a thread.",
|
||||
blocks: [{ label: "Quorum", body: "60%" }],
|
||||
},
|
||||
],
|
||||
},
|
||||
]}
|
||||
/>,
|
||||
);
|
||||
expect(screen.getByText("Anyone can start a thread.")).toBeInTheDocument();
|
||||
expect(screen.getByText("Quorum")).toBeInTheDocument();
|
||||
expect(screen.getByText("60%")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -519,6 +519,25 @@ describe("FinalReviewScreen — chip detail modal", () => {
|
||||
).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("closes the chip edit modal when Back is pressed", async () => {
|
||||
render(
|
||||
<FinalReviewWithStateProbe
|
||||
onState={() => {}}
|
||||
initial={{
|
||||
title: "Oak Park Commons",
|
||||
selectedCommunicationMethodIds: ["signal"],
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
|
||||
fireEvent.click(await screen.findByRole("button", { name: "Signal" }));
|
||||
const dialog = await screen.findByRole("dialog");
|
||||
fireEvent.click(within(dialog).getByRole("button", { name: "Back" }));
|
||||
await waitFor(() => {
|
||||
expect(screen.queryByRole("dialog")).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,4 +45,17 @@ describe("TextBlock", () => {
|
||||
"/api/uploads/aaaaaaaa-bbbb-4ccc-dddd-eeeeeeeeeeee",
|
||||
);
|
||||
});
|
||||
|
||||
it("renders body paragraphs above labeled rows when both are set", () => {
|
||||
render(
|
||||
<TextBlock
|
||||
title="Forum proposals"
|
||||
body="Anyone can start a thread."
|
||||
rows={[{ label: "Quorum", body: "60%" }]}
|
||||
/>,
|
||||
);
|
||||
expect(screen.getByText("Anyone can start a thread.")).toBeInTheDocument();
|
||||
expect(screen.getByText("Quorum")).toBeInTheDocument();
|
||||
expect(screen.getByText("60%")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user