diff --git a/public/app/features/correlations/CorrelationsPage.test.tsx b/public/app/features/correlations/CorrelationsPage.test.tsx index a115a551798..0417feffc85 100644 --- a/public/app/features/correlations/CorrelationsPage.test.tsx +++ b/public/app/features/correlations/CorrelationsPage.test.tsx @@ -23,7 +23,7 @@ import { configureStore } from 'app/store/configureStore'; import { mockDataSource } from '../alerting/unified/mocks'; -import CorrelationsPage from './CorrelationsPage'; +import { CorrelationsPageLegacy } from './CorrelationsPageWrapper'; import { createCreateCorrelationResponse, createFetchCorrelationsError, @@ -33,7 +33,6 @@ import { MockDataSourceSrv, } from './mocks/useCorrelations.mocks'; import { Correlation, CreateCorrelationParams, OmitUnion } from './types'; -import { toEnrichedCorrelationData, useCorrelations } from './useCorrelations'; // Set app events up, otherwise plugin modules will fail to load setAppEvents(appEvents); @@ -111,19 +110,9 @@ const renderWithContext = async ( setDataSourceSrv(dsServer); - // const { remove, get } = useCorrelations(); - - const enhCorrData = correlations.map(toEnrichedCorrelationData).filter((i) => i !== undefined); - const renderResult = render( - new Promise((c) => c)} - correlations={{ correlations: enhCorrData, limit: 100, page: 0, totalCount: correlations.length }} - isLoading={false} - error={undefined} - removeFn={undefined} - /> + , { queries: { diff --git a/public/app/features/correlations/CorrelationsPageWrapper.tsx b/public/app/features/correlations/CorrelationsPageWrapper.tsx index c9c15a45d31..2814bc5a9a5 100644 --- a/public/app/features/correlations/CorrelationsPageWrapper.tsx +++ b/public/app/features/correlations/CorrelationsPageWrapper.tsx @@ -8,7 +8,7 @@ import { RemoveCorrelationParams } from './types'; import { useCorrelations } from './useCorrelations'; import { useCorrelationsK8s } from './useCorrelationsK8s'; -function CorrelationsPageLegacy() { +export function CorrelationsPageLegacy() { const { remove, get } = useCorrelations(); return (