From 6d78d80fda0ca615db733586a7a99391746d480e Mon Sep 17 00:00:00 2001 From: Dion Date: Thu, 22 Feb 2024 18:56:29 +0100 Subject: [PATCH] fix test --- ...l-desktop-editor-open-selection-confirmation.spec.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/starsky/starsky/clientapp/src/components/organisms/modal-desktop-editor-open-selection-confirmation/modal-desktop-editor-open-selection-confirmation.spec.tsx b/starsky/starsky/clientapp/src/components/organisms/modal-desktop-editor-open-selection-confirmation/modal-desktop-editor-open-selection-confirmation.spec.tsx index 87e1129f34..f4fd3be162 100644 --- a/starsky/starsky/clientapp/src/components/organisms/modal-desktop-editor-open-selection-confirmation/modal-desktop-editor-open-selection-confirmation.spec.tsx +++ b/starsky/starsky/clientapp/src/components/organisms/modal-desktop-editor-open-selection-confirmation/modal-desktop-editor-open-selection-confirmation.spec.tsx @@ -88,11 +88,13 @@ describe("ModalDesktopEditorOpenConfirmation", () => { const setIsLoading = jest.fn(); const mockIConnectionDefaultResolve: Promise = Promise.resolve({ - data: false, + data: true, statusCode: 200 }); const mockFetchPost = jest .spyOn(FetchPost, "default") + .mockReset() + .mockImplementation(() => mockIConnectionDefaultResolve) .mockImplementation(() => mockIConnectionDefaultResolve); const component = render( @@ -100,7 +102,7 @@ describe("ModalDesktopEditorOpenConfirmation", () => { isOpen={true} handleExit={handleExit} state={exampleState} - select={[]} + select={["test.jpg"]} setIsLoading={setIsLoading} isCollections={false} /> @@ -126,6 +128,7 @@ describe("ModalDesktopEditorOpenConfirmation", () => { }); const mockFetchPost = jest .spyOn(FetchPost, "default") + .mockReset() .mockImplementation(() => mockIConnectionDefaultResolve); const component = render( @@ -133,7 +136,7 @@ describe("ModalDesktopEditorOpenConfirmation", () => { isOpen={true} handleExit={handleExit} state={exampleState} - select={[]} + select={["test.jpg"]} setIsLoading={setIsLoading} isCollections={false} />