Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tonai committed Jan 16, 2025
1 parent 09de26f commit ea06058
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/react-dsfr-tiptap/src/components/Loader.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ describe("Loader component", () => {
expect(buttons[0].getAttribute("title")).toEqual("Gras");
});

test("it should render the 'Bold' and the 'Underline' buttons", async () => {
render(<Loader controls={[["Bold", "Underline"]]} />);
test("it should render the 'Bold' and the 'Italic' buttons", async () => {
render(<Loader controls={[["Bold", "Italic"]]} />);
// Wait for the second render
await waitFor(() => expect(screen.queryAllByRole("button").length).toEqual(2));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe("RichTextEditor component", () => {
test("it render the RichTextEditor component", async () => {
render(<RichTextEditor content="<h1>Hello World<h1>" />);
// Wait for the loader
await waitFor(() => expect(screen.queryAllByRole("button").length).toEqual(27));
await waitFor(() => expect(screen.queryAllByRole("button").length).toEqual(19));
const title = screen.getByText("Hello World");
expect(title).toBeInTheDocument();
expect(title instanceof HTMLHeadingElement).toBe(true);
Expand Down

0 comments on commit ea06058

Please sign in to comment.