Cleanup, add tests and storybook

This commit is contained in:
adilallo
2026-04-04 10:57:01 -06:00
parent 5d6530e914
commit 427dc44476
26 changed files with 700 additions and 7 deletions
+29
View File
@@ -0,0 +1,29 @@
import { describe, it, expect } from "vitest";
import { renderWithProviders as render, screen } from "../utils/test-utils";
import "@testing-library/jest-dom/vitest";
import SelectPage from "../../app/create/select/page";
describe("SelectPage", () => {
it("renders HeaderLockup title", () => {
render(<SelectPage />);
expect(
screen.getByRole("heading", {
name: "What is your community called?",
}),
).toBeInTheDocument();
});
it("renders MultiSelect add control", () => {
render(<SelectPage />);
const addButtons = screen.getAllByRole("button", {
name: "Add organization type",
});
expect(addButtons.length).toBeGreaterThanOrEqual(1);
});
it("renders preset chip labels", () => {
render(<SelectPage />);
expect(screen.getByText("1 member")).toBeInTheDocument();
expect(screen.getByText("Non-profit")).toBeInTheDocument();
});
});