Run Use without changes through name, description, and photo so final review never holds an editable field.
This commit is contained in:
1 parent
53e27ef122
commit
6bf890fa78
13 files changed
+156
-145
No files matched your search
@@ -1334,6 +1334,36 @@ describe("FinalReviewScreen — edit published title and description", () => {
|
||||
expect(screen.getByTestId("rule-description-edit")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("shows name and description as text on the template path, with no text input", async () => {
|
||||
function TemplatePathHarness() {
|
||||
const { replaceState } = useCreateFlow();
|
||||
useLayoutEffect(() => {
|
||||
replaceState({
|
||||
title: "Eastside Tenants Union",
|
||||
communityContext: "Neighbors sharing a building.",
|
||||
pendingTemplateAction: {
|
||||
slug: "woodline",
|
||||
mode: "useWithoutChanges",
|
||||
},
|
||||
});
|
||||
}, [replaceState]);
|
||||
return <FinalReviewScreen />;
|
||||
}
|
||||
render(<TemplatePathHarness />);
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText("Eastside Tenants Union")).toBeInTheDocument();
|
||||
});
|
||||
expect(
|
||||
screen.getByText("Neighbors sharing a building."),
|
||||
).toBeInTheDocument();
|
||||
expect(
|
||||
screen.queryByRole("textbox", { name: /Community name/i }),
|
||||
).not.toBeInTheDocument();
|
||||
expect(
|
||||
screen.queryByRole("textbox"),
|
||||
).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("opens Save modal from title click and updates title", async () => {
|
||||
let latest: CreateFlowState = {};
|
||||
render(
|
||||
|
||||
Reference in new issue
Block a user