Files
community-rule/tests/components/InformationalPage.test.tsx
T
adilalloandCursor 42d83c8b62 Give builder fields persistent labels, treat description as optional, and validate save-progress email with a real form.
Name stays required; description is a labelled optional textarea. Email uses native validity and form submit. Drop the dead workshop link and fix a few copy errors.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 11:37:41 -06:00

37 lines
1.2 KiB
TypeScript

import { describe, it, expect } from "vitest";
import { renderWithProviders as render, screen } from "../utils/test-utils";
import "@testing-library/jest-dom/vitest";
import { InformationalScreen } from "../../app/(app)/create/screens/informational/InformationalScreen";
describe("InformationalScreen", () => {
it("renders without crashing", () => {
render(<InformationalScreen />);
expect(
screen.getByRole("heading", {
name: "How CommunityRule helps groups like yours",
}),
).toBeInTheDocument();
});
it("renders lockup description", () => {
render(<InformationalScreen />);
expect(
screen.getByText(
/This flow will give you recommendations to improve your community/i,
),
).toBeInTheDocument();
});
it("does not offer a workshop link until a destination exists", () => {
render(<InformationalScreen />);
expect(screen.queryByRole("link", { name: "workshop" })).not.toBeInTheDocument();
});
it("renders first numbered list item title", () => {
render(<InformationalScreen />);
expect(
screen.getByText("Tell us about your organization"),
).toBeInTheDocument();
});
});