Skip to content

Commit

Permalink
Tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dariaterekhova-actionengine committed Dec 9, 2024
1 parent 22ebd78 commit c6f3027
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/bookmarks-panel/bookmarks-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ enum PopoverType {
none,
}

Object.defineProperty(globalThis, "crypto", {
value: {
randomUUID: () => "",
},
});

const Container = styled.div<LayoutProps>`
position: absolute;
background: ${({ theme }) => theme.colors.mainCanvasColor};
Expand Down
6 changes: 6 additions & 0 deletions src/components/layers-panel/insert-panel/insert-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ import {
import { UploadPanel } from "../../upload-panel/upload-panel";
import { getLayerUrl } from "../../../utils/layer-utils";

Object.defineProperty(globalThis, "crypto", {
value: {
randomUUID: () => "",
},
});

const NO_NAME_ERROR = "Please enter name";
const INVALID_URL_ERROR = "Invalid URL";

Expand Down
6 changes: 6 additions & 0 deletions src/components/upload-panel/upload-panel.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jest.mock("@hyperjump/json-schema", () => ({
),
}));

Object.defineProperty(globalThis, "crypto", {
value: {
randomUUID: () => "",
},
});

const onCancel = jest.fn();
const onFileUploaded = jest.fn();

Expand Down

0 comments on commit c6f3027

Please sign in to comment.