Files
community-rule/tests/components/InformationalPage.test.tsx
T
adilallo 0535f6f167 Let anyone finish a Rule without an account or email.
Continue on final review and Finish without inviting no longer open a login wall. The header stays Exit until Save your progress is done, and Send invitations is the only invite-path login.
2026-11-23 14:48:01 -07:00

37 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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: "Write your community’s Rule",
}),
).toBeInTheDocument();
});
it("renders lockup description", () => {
render(<InformationalScreen />);
expect(
screen.getByText(
/you don’t need an account to write or finish it/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 community"),
).toBeInTheDocument();
});
});