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:
@ -90,10 +90,10 @@ describe("Sidebar", () => {
|
||||
|
||||
const sidebar = container.querySelector<HTMLElement>(".test-sidebar");
|
||||
expect(sidebar).not.toBe(null);
|
||||
const closeButton = queryByTestId(sidebar!, "sidebar-close");
|
||||
const closeButton = queryByTestId(sidebar!, "sidebar-close")!;
|
||||
expect(closeButton).not.toBe(null);
|
||||
|
||||
fireEvent.click(closeButton!.querySelector("button")!);
|
||||
fireEvent.click(closeButton);
|
||||
await waitFor(() => {
|
||||
expect(container.querySelector<HTMLElement>(".test-sidebar")).toBe(null);
|
||||
expect(onClose).toHaveBeenCalled();
|
||||
|
Reference in New Issue
Block a user