Files
community-rule/tests/components/TextPage.test.tsx
T
2026-04-04 10:57:01 -06:00

26 lines
747 B
TypeScript

import { describe, it, expect } from "vitest";
import { renderWithProviders as render, screen } from "../utils/test-utils";
import "@testing-library/jest-dom/vitest";
import TextPage from "../../app/create/text/page";
describe("TextPage", () => {
it("renders main heading", () => {
render(<TextPage />);
expect(
screen.getByRole("heading", {
name: "What is your community called?",
}),
).toBeInTheDocument();
});
it("renders description and text field", () => {
render(<TextPage />);
expect(
screen.getByText("This will be the name of your community"),
).toBeInTheDocument();
expect(
screen.getByPlaceholderText("Enter your community name"),
).toBeInTheDocument();
});
});