diff --git a/src/components/DashboardsBar/__tests__/Chip.spec.js b/src/components/DashboardsBar/__tests__/Chip.spec.js index 4c0dbc9b2..6215f9c4c 100644 --- a/src/components/DashboardsBar/__tests__/Chip.spec.js +++ b/src/components/DashboardsBar/__tests__/Chip.spec.js @@ -31,6 +31,7 @@ jest.mock('@dhis2/ui', () => { jest.mock('@dhis2/app-runtime', () => ({ useDhis2ConnectionStatus: () => ({ isConnected: true }), useCacheableSection: jest.fn(), + useDataEngine: jest.fn(), })) jest.mock('@dhis2/analytics', () => ({ diff --git a/src/components/DashboardsBar/__tests__/DashboardsBar.spec.js b/src/components/DashboardsBar/__tests__/DashboardsBar.spec.js index 74ee88d72..2abd414ce 100644 --- a/src/components/DashboardsBar/__tests__/DashboardsBar.spec.js +++ b/src/components/DashboardsBar/__tests__/DashboardsBar.spec.js @@ -40,6 +40,7 @@ jest.mock('@dhis2/app-runtime', () => ({ isCached: false, recordingState: 'default', })), + useDataEngine: jest.fn(), })) test('minimized DashboardsBar has Show more/less button', () => { diff --git a/src/pages/view/__tests__/ViewDashboard.spec.js b/src/pages/view/__tests__/ViewDashboard.spec.js index 2dfa67dbf..7821ec83b 100644 --- a/src/pages/view/__tests__/ViewDashboard.spec.js +++ b/src/pages/view/__tests__/ViewDashboard.spec.js @@ -24,6 +24,7 @@ jest.mock('@dhis2/app-runtime', () => ({ isCached: false, recordingState: 'default', })), + useDataEngine: jest.fn(), })) jest.mock('../../../api/fetchDashboard')