Implement about page

This commit is contained in:
adilallo
2026-05-13 23:08:36 -06:00
parent d2dfa099a2
commit b6b9b63608
69 changed files with 1834 additions and 28 deletions
+37
View File
@@ -222,4 +222,41 @@ describe("QuoteBlock Component", () => {
screen.queryByText("The Tyranny of Structurelessness"),
).not.toBeInTheDocument();
});
test("statement variant renders dual paragraphs without attribution", () => {
render(
<QuoteBlock
variant="statement"
id="about-test-quote"
quote="First paragraph of the statement."
quoteSecondary="Second paragraph of the statement."
/>,
);
const region = screen.getByRole("region", {
name: /first paragraph of the statement/i,
});
expect(region).toBeInTheDocument();
expect(
screen.getByText("Second paragraph of the statement."),
).toBeInTheDocument();
expect(screen.queryByRole("cite")).not.toBeInTheDocument();
});
test("statement variant logs when quoteSecondary is missing", () => {
const consoleSpy = vi.spyOn(console, "error").mockImplementation(() => {});
render(
<QuoteBlock
variant="statement"
quote="Only one paragraph"
/>,
);
expect(consoleSpy).toHaveBeenCalledWith(
"QuoteBlock: statement variant requires non-empty quote and quoteSecondary",
);
consoleSpy.mockRestore();
});
});
+7 -2
View File
@@ -9,11 +9,16 @@ vi.mock("../../lib/server/mail", () => ({
}));
const rateLimitKeyMock = vi.hoisted(() =>
vi.fn(() => ({ ok: true as const })),
vi.fn(
(_key: string, _minIntervalMs: number): { ok: true } | { ok: false; retryAfterMs: number } => ({
ok: true,
}),
),
);
vi.mock("../../lib/server/rateLimit", () => ({
rateLimitKey: (...args: unknown[]) => rateLimitKeyMock(...args),
rateLimitKey: (key: string, minIntervalMs: number) =>
rateLimitKeyMock(key, minIntervalMs),
}));
import { POST } from "../../app/api/organizer-inquiry/route";