mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-22 17:00:40 +02:00
test: fix failing tests and API (#5823)
* tests: fix failing tests * fix selection.test.tsx * fix excalidraw.test.tsx and don't show image export when SaveAsImage is false in UIOptions.canvasActions * more fixes * require fake index db in setUp test to fix the tests * fix regression
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { fireEvent, render, waitFor } from "./test-utils";
|
||||
import { queryByTestId } from "@testing-library/react";
|
||||
|
||||
import ExcalidrawApp from "../excalidraw-app";
|
||||
import { API } from "./helpers/api";
|
||||
import { MIME_TYPES } from "../constants";
|
||||
@@ -93,15 +95,11 @@ describe("library menu", () => {
|
||||
const latestLibrary = await h.app.library.getLatestLibrary();
|
||||
expect(latestLibrary.length).toBe(0);
|
||||
|
||||
const libraryButton = container.querySelector(".ToolIcon__library");
|
||||
const libraryButton = container.querySelector(".library-button");
|
||||
|
||||
fireEvent.click(libraryButton!);
|
||||
|
||||
const loadLibraryButton = container.querySelector(
|
||||
".library-actions .library-actions--load",
|
||||
);
|
||||
|
||||
fireEvent.click(loadLibraryButton!);
|
||||
fireEvent.click(container.querySelector(".Sidebar__dropdown-btn")!);
|
||||
queryByTestId(container, "lib-dropdown--load")!.click();
|
||||
|
||||
const libraryItems = parseLibraryJSON(await libraryJSONPromise);
|
||||
|
||||
|
Reference in New Issue
Block a user