Rebuild Share and Delete Account from the privacy designs.

Share asks the person who holds the pen to confirm their community agreed before a link turns on, and deleting an account lists each owned Rule with PDF and RULE.md export. Case-study Share copies the page link instead of opening the privacy modal, and the sign-in banner stays below the header so Share remains clickable.
This commit is contained in:
adilallo committed 2026-11-09 19:54:09 -07:00
1 parent 5cbda35e32
commit b6795c1f18
28 files changed
+1467 -377

No files matched your search

@@ -118,6 +118,27 @@ describe("UseCaseCompletedRulePage", () => {
);
});
test("Share copies the page link through a banner instead of a privacy modal", async () => {
const user = userEvent.setup();
const writeText = vi.fn().mockResolvedValue(undefined);
Object.defineProperty(window.navigator, "clipboard", {
configurable: true,
value: { writeText },
});
render(
await UseCaseCompletedRulePage({
params: Promise.resolve({ slug: "food-not-bombs" }),
}),
);
await user.click(screen.getByRole("button", { name: "Share" }));
expect(writeText).toHaveBeenCalled();
expect(screen.getByText("Link copied")).toBeInTheDocument();
expect(screen.queryByRole("dialog")).not.toBeInTheDocument();
});
test("Share button reads Share under the marketing case-study bundle", async () => {
rtlRender(
<MessagesProvider messages={marketingMessages}>