diff --git a/starsky/starsky/clientapp/src/components/molecules/menu-option-desktop-editor-open-selection/menu-option-desktop-editor-open-selection.spec.tsx b/starsky/starsky/clientapp/src/components/molecules/menu-option-desktop-editor-open-selection/menu-option-desktop-editor-open-selection.spec.tsx index ae4f5a98cc..050c4b9a6f 100644 --- a/starsky/starsky/clientapp/src/components/molecules/menu-option-desktop-editor-open-selection/menu-option-desktop-editor-open-selection.spec.tsx +++ b/starsky/starsky/clientapp/src/components/molecules/menu-option-desktop-editor-open-selection/menu-option-desktop-editor-open-selection.spec.tsx @@ -72,7 +72,7 @@ describe("ModalDesktopEditorOpenConfirmation", () => { const component = render( {}} @@ -80,16 +80,15 @@ describe("ModalDesktopEditorOpenConfirmation", () => { ); 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(),