Skip to content

Commit

Permalink
fixup! (HP-2023) Hook for using download actions
Browse files Browse the repository at this point in the history
  • Loading branch information
NikoHelle committed Oct 12, 2023
1 parent 9d21f76 commit ab6c33f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/gdprApi/__tests__/useDownloadProfileQueue.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -733,18 +733,16 @@ describe('useDownloadProfileQueue', () => {
tunnistamoAuthCodeRedirectionAction.type,
tunnistamoAuthCodeCallbackUrlAction.type
);
expect(getState().currentPhase === currentPhases.running).toBeTruthy();
expect(getState().nextPhase === nextPhases.resumeCallback).toBeTruthy();

expect(getFunctionResults()).toMatchObject({
...hookFunctionResultsAsFalse,
isLoading: true,
});

await toggleComponentMounting();
mockedWindowControls.setPath(config.gdprCallbackPath);
await toggleComponentMounting();

expect(getState()).toMatchObject({
currentPhase: currentPhases.idle,
nextPhase: nextPhases.resumeCallback,
});

expect(getFunctionResults()).toMatchObject({
...hookFunctionResultsAsFalse,
shouldHandleCallback: true,
Expand Down

0 comments on commit ab6c33f

Please sign in to comment.