Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro-Vega committed Oct 9, 2024
1 parent fa34367 commit 0909f1d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/components/GenericTable/ColumnVisibilityButton.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { render, waitFor } from "@testing-library/react";
import { render } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { axe } from "jest-axe";
import ColumnVisibilityButton from "./ColumnVisibilityButton";
Expand Down Expand Up @@ -174,12 +174,7 @@ describe("ColumnVisibilityButton", () => {
/>
);

await waitFor(() => {
expect(getByTestId("column-visibility-button")).toBeInTheDocument();
});

const button = getByTestId("column-visibility-button");
userEvent.click(button);
userEvent.click(getByTestId("column-visibility-button"));

expect(await axe(container)).toHaveNoViolations();
});
Expand Down

0 comments on commit 0909f1d

Please sign in to comment.