Files
community-rule/tests/components/UploadPage.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

26 lines
859 B
TypeScript

import { describe, it, expect } from "vitest";
import { renderWithProviders as render, screen } from "../utils/test-utils";
import "@testing-library/jest-dom/vitest";
import { CommunityUploadScreen } from "../../app/(app)/create/screens/upload/CommunityUploadScreen";
describe("CommunityUploadScreen", () => {
it("renders HeaderLockup", () => {
render(<CommunityUploadScreen />);
expect(
screen.getByRole("heading", {
name: "Add a photo to identify your group",
}),
).toBeInTheDocument();
});
it("renders Upload control and helper copy", () => {
render(<CommunityUploadScreen />);
expect(screen.getByRole("button", { name: "Upload" })).toBeInTheDocument();
expect(
screen.getByText(
/This photo will be used as a profile picture for your group/i,
),
).toBeInTheDocument();
});
});