Skip to content

Commit 405e3e8

Browse files
[Security Solution] fix broken unit test on main
1 parent 0bc48ae commit 405e3e8

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • x-pack/solutions/security/plugins/security_solution/public/flyout_v2/correlations/utils

x-pack/solutions/security/plugins/security_solution/public/flyout_v2/correlations/utils/get_columns.test.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import React from 'react';
99
import { render, screen } from '@testing-library/react';
1010
import userEvent from '@testing-library/user-event';
1111
import { formatDate } from '@elastic/eui';
12+
import { EntityStoreEuidApiProvider } from '@kbn/entity-store/public';
1213
import { ALERT_REASON, ALERT_RULE_NAME } from '@kbn/rule-data-utils';
1314
import { useExpandableFlyoutApi } from '@kbn/expandable-flyout';
1415
import { TestProviders } from '../../../common/mock';
@@ -24,6 +25,7 @@ jest.mock('../../../common/lib/kibana', () => ({
2425
telemetry: { reportEvent: jest.fn() },
2526
},
2627
}),
28+
useUiSetting: jest.fn(() => false),
2729
}));
2830

2931
const scopeId = 'test-scope';
@@ -32,7 +34,11 @@ const mockOnShowAlert = jest.fn();
3234
const useUserPrivilegesMock = useUserPrivileges as jest.Mock;
3335

3436
const renderColumn = (element: React.ReactElement) =>
35-
render(<TestProviders>{element}</TestProviders>);
37+
render(
38+
<TestProviders>
39+
<EntityStoreEuidApiProvider>{element}</EntityStoreEuidApiProvider>
40+
</TestProviders>
41+
);
3642

3743
describe('getColumns', () => {
3844
beforeEach(() => {

0 commit comments

Comments
 (0)