Give finished Rules a print path, folded launch counts, and a two-day follow-up.

Export is PDF, RULE.md, and Print on US Letter, with every shared term, no member names, and a takeaway that points at Ask an organizer. Finished Rules keep type and place so the team can read folded counts without a database, Umami can sit beside the app with no cookies, and the person who holds the pen gets working PDF and RULE.md links 48 hours later.
This commit is contained in:
adilallo committed 2026-11-10 18:32:33 -07:00
1 parent 0efc907633
commit d9c475a967
74 files changed
+2401 -630

No files matched your search

+2 -5
View File
@@ -92,11 +92,8 @@ describe("CompletedScreen", () => {
);
render(<CompletedScreen />);
expect(
screen.getByText("Has your Rule changed how your community works?"),
).toBeInTheDocument();
expect(
screen.getByRole("button", { name: "Tell an organizer what changed." }),
).toBeInTheDocument();
screen.getByRole("link", { name: "Tell us what this Rule changed" }),
).toHaveAttribute("href", "/#ask-organizer");
});
it("renders header and document from sessionStorage", () => {
+9 -6
View File
@@ -73,9 +73,9 @@ describe("CreateFlowTopNav (behavioral tests)", () => {
});
it.each([
["Download Markdown", "markdown"],
["Download PDF", "pdf"],
["Download CSV", "csv"],
["RULE.md", "markdown"],
["PDF", "pdf"],
["Print", "print"],
] as const)(
"opens export menu and calls onSelectExportFormat for %s",
async (menuLabel, expectedFormat) => {
@@ -245,14 +245,17 @@ describe("CreateFlowTopNav (viewport < sm2 / 440px)", () => {
expect(screen.getByRole("menuitem", { name: "Share" })).toBeInTheDocument();
expect(
screen.getByRole("menuitem", { name: "Download PDF" }),
screen.getByRole("menuitem", { name: "PDF" }),
).toBeInTheDocument();
expect(
screen.getByRole("menuitem", { name: "Download CSV" }),
screen.getByRole("menuitem", { name: "RULE.md" }),
).toBeInTheDocument();
expect(
screen.getByRole("menuitem", { name: "Download Markdown" }),
screen.getByRole("menuitem", { name: "Print" }),
).toBeInTheDocument();
expect(
screen.queryByRole("menuitem", { name: "Download CSV" }),
).not.toBeInTheDocument();
expect(screen.getByRole("menuitem", { name: "Edit" })).toBeInTheDocument();
expect(
screen.getByRole("menuitem", { name: "Save and exit" }),
+7
View File
@@ -110,6 +110,13 @@ describe("Footer (behavioral tests)", () => {
expect(screen.queryByText(/all right reserved/i)).not.toBeInTheDocument();
});
it("renders the takeaway line to Ask an organizer", () => {
render(<Footer />);
expect(
screen.getAllByRole("link", { name: "Tell us what this Rule changed" })[0],
).toHaveAttribute("href", "/#ask-organizer");
});
it("renders legal links to privacy and terms pages", () => {
render(<Footer />);
expect(