chore: bump @testing-library/react 12.1.5 -> 16.0.0 (#8322)

This commit is contained in:
David Luzar
2024-08-06 15:17:42 +02:00
committed by GitHub
parent 3cf14c73a3
commit f19ce30dfe
52 changed files with 1035 additions and 978 deletions

View File

@@ -1,6 +1,7 @@
import React from "react";
import { vi } from "vitest";
import { fireEvent, render, waitFor } from "./test-utils";
import { queryByTestId } from "@testing-library/react";
import { act, queryByTestId } from "@testing-library/react";
import { Excalidraw } from "../index";
import { API } from "./helpers/api";
@@ -43,7 +44,9 @@ vi.mock("../data/filesystem.ts", async (importOriginal) => {
describe("library", () => {
beforeEach(async () => {
await render(<Excalidraw />);
h.app.library.resetLibrary();
await act(() => {
return h.app.library.resetLibrary();
});
});
it("import library via drag&drop", async () => {
@@ -208,7 +211,7 @@ describe("library menu", () => {
"dropdown-menu-button",
)!,
);
queryByTestId(container, "lib-dropdown--load")!.click();
fireEvent.click(queryByTestId(container, "lib-dropdown--load")!);
const libraryItems = parseLibraryJSON(await libraryJSONPromise);