Skip to content

Commit

Permalink
fix readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Feb 22, 2024
1 parent ac43e8c commit a8cc3ff
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,23 @@ describe("ModalDesktopEditorOpenConfirmation", () => {

const component = render(
<MenuOptionDesktopEditorOpenSelection
isReadOnly={true}
isReadOnly={false}
select={["file1.jpg", "file2.jpg"]}
state={state}
setEnableMoreMenu={() => {}}
/>
);
fireEvent.keyDown(document.body, { key: "e", ctrlKey: true });

expect(fetchPostSpy).toHaveBeenCalled();
expect(fetchPostSpy).toHaveBeenCalledTimes(1);
expect(fetchPostSpy).toHaveBeenNthCalledWith(
1,
new UrlQuery().UrlApiDesktopEditorOpenAmountConfirmationChecker(),
"f=%2Ffile1.jpg%3B%2Ffile2.jpg"
);

await waitFor(() => {
expect(fetchPostSpy).toHaveBeenCalled();
expect(fetchPostSpy).toHaveBeenCalledTimes(2);
expect(fetchPostSpy).toHaveBeenNthCalledWith(
1,
new UrlQuery().UrlApiDesktopEditorOpenAmountConfirmationChecker(),
"f=%2Ffile1.jpg%3B%2Ffile2.jpg"
);

expect(fetchPostSpy).toHaveBeenNthCalledWith(
2,
new UrlQuery().UrlApiDesktopEditorOpen(),
Expand Down

0 comments on commit a8cc3ff

Please sign in to comment.