Skip to content

Commit

Permalink
Add test for default disclaimer text
Browse files Browse the repository at this point in the history
  • Loading branch information
jamdelion committed Nov 19, 2024
1 parent 3501e54 commit 82e89ba
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,21 @@ describe("following a FindProperty component", () => {
expect(negativeConstraintsContainer).toBeVisible();
expect(getByRole("heading", { name: /Ecology/ })).toBeVisible();
});

test("default disclaimer text should render if none provided", async () => {
const { queryByText } = setup(
<PlanningConstraints
title="Planning constraints"
description="Things that might affect your project"
fn="property.constraints.planning"
disclaimer=""
handleSubmit={vi.fn()}
/>,
);
expect(
queryByText(
"This page does not include information about historic planning conditions that may apply to this property.",
),
).toBeVisible();
});
});

0 comments on commit 82e89ba

Please sign in to comment.