Update create flow pages
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
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";
|
||||
import { CreateFlowTextFieldScreen } from "../../app/create/screens/text/CreateFlowTextFieldScreen";
|
||||
|
||||
describe("TextPage", () => {
|
||||
describe("CreateFlowTextFieldScreen (community name)", () => {
|
||||
it("renders main heading", () => {
|
||||
render(<TextPage />);
|
||||
render(
|
||||
<CreateFlowTextFieldScreen
|
||||
messageNamespace="create.communityName"
|
||||
stateField="title"
|
||||
maxLength={48}
|
||||
/>,
|
||||
);
|
||||
expect(
|
||||
screen.getByRole("heading", {
|
||||
name: "What is your community called?",
|
||||
@@ -14,7 +20,13 @@ describe("TextPage", () => {
|
||||
});
|
||||
|
||||
it("renders description and text field", () => {
|
||||
render(<TextPage />);
|
||||
render(
|
||||
<CreateFlowTextFieldScreen
|
||||
messageNamespace="create.communityName"
|
||||
stateField="title"
|
||||
maxLength={48}
|
||||
/>,
|
||||
);
|
||||
expect(
|
||||
screen.getByText("This will be the name of your community"),
|
||||
).toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user