Fix refetch on workflow status update (#9946)
Refetch was not set-up properly on activation/deactivation
This commit is contained in:
@ -142,8 +142,9 @@ describe('useDeactivateWorkflowSingleRecordAction', () => {
|
||||
result.current.onClick();
|
||||
});
|
||||
|
||||
expect(deactivateWorkflowVersionMock).toHaveBeenCalledWith(
|
||||
activeWorkflowMock.currentVersion.id,
|
||||
);
|
||||
expect(deactivateWorkflowVersionMock).toHaveBeenCalledWith({
|
||||
workflowVersionId: activeWorkflowMock.currentVersion.id,
|
||||
workflowId: activeWorkflowMock.id,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -216,7 +216,7 @@ describe('useDiscardDraftWorkflowSingleRecordAction', () => {
|
||||
expect(result.current.shouldBeRegistered).toBe(true);
|
||||
});
|
||||
|
||||
it('should call deactivateWorkflowVersion on click', () => {
|
||||
it('should call deleteOneWorkflowVersion on click', () => {
|
||||
(useWorkflowWithCurrentVersion as jest.Mock).mockImplementation(
|
||||
() => draftWorkflowMock,
|
||||
);
|
||||
|
||||
@ -21,7 +21,10 @@ export const useDeactivateWorkflowSingleRecordAction: ActionHookWithoutObjectMet
|
||||
return;
|
||||
}
|
||||
|
||||
deactivateWorkflowVersion(workflowWithCurrentVersion.currentVersion.id);
|
||||
deactivateWorkflowVersion({
|
||||
workflowVersionId: workflowWithCurrentVersion.currentVersion.id,
|
||||
workflowId: workflowWithCurrentVersion.id,
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user