Skip to content

Commit

Permalink
improve test readability
Browse files Browse the repository at this point in the history
  • Loading branch information
RODO94 committed Nov 18, 2024
1 parent f686868 commit 51ac118
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions editor.planx.uk/src/ui/editor/ComponentTagSelect.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe("Checklist Component for a Platform Admin", () => {
}),
),
);

it("renders all tags with none selected", async () => {
const { getByRole, user } = setup(
<DndProvider backend={HTML5Backend}>
Expand All @@ -50,6 +51,7 @@ describe("Checklist Component for a Platform Admin", () => {

expect(optionTexts).toEqual(expect.arrayContaining(tagDisplayNames));
});

it("renders all tags with Placeholder selected as a button", async () => {
const { queryByTestId, queryByRole } = setup(
<DndProvider backend={HTML5Backend}>
Expand Down Expand Up @@ -79,6 +81,7 @@ describe("Checklist Component for a non Platform Admin", () => {
}),
),
);

it("renders all tags except Placeholder with none selected", async () => {
const { getByRole, user } = setup(
<DndProvider backend={HTML5Backend}>
Expand All @@ -95,6 +98,7 @@ describe("Checklist Component for a non Platform Admin", () => {

expect(optionTexts).not.toContain(/placeholder/i);
});

it("renders all tags with static Placeholder selected", async () => {
const { getByTestId, queryByRole } = setup(
<DndProvider backend={HTML5Backend}>
Expand Down

0 comments on commit 51ac118

Please sign in to comment.