diff --git a/src/components/BulkEditPane/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditPreviewModalList.js b/src/components/BulkEditPane/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditPreviewModalList.js index 7ffb7126..408bb8e4 100644 --- a/src/components/BulkEditPane/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditPreviewModalList.js +++ b/src/components/BulkEditPane/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditPreviewModalList.js @@ -1,4 +1,8 @@ -import React, { useContext, useEffect, useState } from 'react'; +import React, { + useContext, + useEffect, + useState +} from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage, @@ -148,4 +152,5 @@ BulkEditPreviewModalList.propTypes = { bulkDetails: PropTypes.object, isPreviewEnabled: PropTypes.bool, onPreviewError: PropTypes.func, + setShouldRefetchStatus: PropTypes.func, }; diff --git a/src/hooks/api/useBulkOperationDetails.test.js b/src/hooks/api/useBulkOperationDetails.test.js index e4df975b..b8d20a6b 100644 --- a/src/hooks/api/useBulkOperationDetails.test.js +++ b/src/hooks/api/useBulkOperationDetails.test.js @@ -49,15 +49,13 @@ describe('useBulkOperationDetails', () => { it('should initialize with the correct refetch interval and query key', () => { const id = 'test-id'; - const refetchInterval = 5000; + const interval = 5000; - const { result } = renderHook(() => useBulkOperationDetails({ id, interval: refetchInterval })); + renderHook(() => useBulkOperationDetails({ id, interval })); - expect(result.current.isLoading).toBe(false); expect(useQuery).toHaveBeenCalledWith( expect.objectContaining({ - queryKey: [BULK_OPERATION_DETAILS_KEY, 'namespace-key', id, refetchInterval], - refetchInterval, + queryKey: [BULK_OPERATION_DETAILS_KEY, 'namespace-key', 0, id], enabled: true, }) );