Files
community-rule/tests/components/SelectPage.test.tsx
T
adilalloandCursor 20ea4a2f30 Give MultiSelect chips accessible names and start creation fields empty.
Catalog chips now announce Select or Deselect so they are named for assistive tech. Method and value modals open blank; Generate draft inserts the catalog copy that used to be prefilled, and Customize still keeps the section headings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 15:59:00 -06:00

32 lines
1.1 KiB
TypeScript

import { describe, it, expect } from "vitest";
import { renderWithProviders as render, screen } from "../utils/test-utils";
import "@testing-library/jest-dom/vitest";
import { CommunitySizeSelectScreen } from "../../app/(app)/create/screens/select/CommunitySizeSelectScreen";
describe("CommunitySizeSelectScreen", () => {
it("renders HeaderLockup title", () => {
render(<CommunitySizeSelectScreen />);
expect(
screen.getByRole("heading", {
name: "How many people will be in your community in the near term?",
}),
).toBeInTheDocument();
});
it("renders preset size chips", () => {
render(<CommunitySizeSelectScreen />);
expect(screen.getByText("1 member")).toBeInTheDocument();
expect(screen.getByText("2-5 members")).toBeInTheDocument();
});
it("gives size chips Select/Deselect accessible names", () => {
render(<CommunitySizeSelectScreen />);
expect(
screen.getByRole("button", { name: "Select 1 member" }),
).toBeInTheDocument();
expect(
screen.getByRole("button", { name: "Select 2-5 members" }),
).toBeInTheDocument();
});
});