Skip to content

Commit 55f0a35

Browse files
committed
fix test for click on ContexMenu with active placeholder
1 parent 0b388f9 commit 55f0a35

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/components/ContextOverlay/tests/ContextMenu.test.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ describe("ContextMenu", () => {
3030
});
3131
it("if no placeholder is used the menu should be displayed on click", async () => {
3232
const { container } = render(<ContextMenu {...ContextMenuStory.args} preventPlaceholder={true} />);
33+
checkForPlaceholderClass(container, 0);
3334
fireEvent.click(container.getElementsByClassName(overlayWrapper)[0]);
3435
expect(await screen.findByText("First option")).toBeVisible();
3536
});
36-
it("if placeholder is used the overlay should be displayed on click", async () => {
37-
const { container } = render(<ContextMenu {...ContextMenuStory.args} usePlaceholder={false} />);
37+
it("if placeholder is used the menu should be displayed on click", async () => {
38+
const { container } = render(<ContextMenu {...ContextMenuStory.args} preventPlaceholder={false} />);
39+
checkForPlaceholderClass(container, 1);
3840
fireEvent.click(container.getElementsByClassName(overlayWrapper)[0]);
3941
expect(await screen.findByText("First option")).toBeVisible();
4042
});

0 commit comments

Comments
 (0)