diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/index.ts b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/index.ts
index 7564c246513de..bc0da84133e68 100644
--- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/index.ts
+++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/index.ts
@@ -6,13 +6,16 @@
*/
import {
+ EuiMarkdownEditorUiPlugin,
getDefaultEuiMarkdownParsingPlugins,
getDefaultEuiMarkdownProcessingPlugins,
+ getDefaultEuiMarkdownUiPlugins,
} from '@elastic/eui';
import * as timelineMarkdownPlugin from './timeline';
-
-export const uiPlugins = [timelineMarkdownPlugin.plugin];
+const uiPlugins: EuiMarkdownEditorUiPlugin[] = getDefaultEuiMarkdownUiPlugins();
+uiPlugins.push(timelineMarkdownPlugin.plugin);
+export { uiPlugins };
export const parsingPlugins = getDefaultEuiMarkdownParsingPlugins();
export const processingPlugins = getDefaultEuiMarkdownProcessingPlugins();
diff --git a/x-pack/plugins/security_solution/public/common/components/query_bar/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/query_bar/index.test.tsx
index fbf56bd235789..1e998f9798e97 100644
--- a/x-pack/plugins/security_solution/public/common/components/query_bar/index.test.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/query_bar/index.test.tsx
@@ -34,7 +34,16 @@ describe('QueryBar ', () => {
await waitFor(() => getByTestId('queryInput')); // check for presence of query input
return mount(Component);
};
+ let abortSpy: jest.SpyInstance;
+ beforeAll(() => {
+ const mockAbort = new AbortController();
+ mockAbort.abort();
+ abortSpy = jest.spyOn(window, 'AbortController').mockImplementation(() => mockAbort);
+ });
+ afterAll(() => {
+ abortSpy.mockRestore();
+ });
beforeEach(() => {
mockOnChangeQuery.mockClear();
mockOnSubmitQuery.mockClear();
@@ -264,7 +273,6 @@ describe('QueryBar ', () => {
const onChangedQueryRef = searchBarProps.onQueryChange;
const onSubmitQueryRef = searchBarProps.onQuerySubmit;
const onSavedQueryRef = searchBarProps.onSavedQueryUpdated;
-
wrapper.setProps({ onSavedQuery: jest.fn() });
wrapper.update();
@@ -294,22 +302,21 @@ describe('QueryBar ', () => {
onSavedQuery={mockOnSavedQuery}
/>
);
- await waitFor(() => {
- const isSavedQueryPopoverOpen = () =>
- wrapper.find('EuiPopover[id="savedQueryPopover"]').prop('isOpen');
+ const isSavedQueryPopoverOpen = () =>
+ wrapper.find('EuiPopover[id="savedQueryPopover"]').prop('isOpen');
- expect(isSavedQueryPopoverOpen()).toBeFalsy();
+ expect(isSavedQueryPopoverOpen()).toBeFalsy();
- wrapper
- .find('button[data-test-subj="saved-query-management-popover-button"]')
- .simulate('click');
+ wrapper
+ .find('button[data-test-subj="saved-query-management-popover-button"]')
+ .simulate('click');
+ await waitFor(() => {
expect(isSavedQueryPopoverOpen()).toBeTruthy();
+ });
+ wrapper.find('button[data-test-subj="saved-query-management-save-button"]').simulate('click');
- wrapper
- .find('button[data-test-subj="saved-query-management-save-button"]')
- .simulate('click');
-
+ await waitFor(() => {
expect(isSavedQueryPopoverOpen()).toBeFalsy();
});
});
diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_table.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_table.test.tsx
index 3b87c786d0e36..88b42c506dabc 100644
--- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_table.test.tsx
+++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_table.test.tsx
@@ -20,7 +20,15 @@ import { useAllExceptionLists } from './use_all_exception_lists';
jest.mock('../../../../../../common/lib/kibana');
jest.mock('./use_all_exception_lists');
jest.mock('../../../../../../shared_imports');
+jest.mock('@kbn/i18n/react', () => {
+ const originalModule = jest.requireActual('@kbn/i18n/react');
+ const FormattedRelative = jest.fn().mockImplementation(() => '20 hours ago');
+ return {
+ ...originalModule,
+ FormattedRelative,
+ };
+});
describe('ExceptionListsTable', () => {
const exceptionList1 = getExceptionListSchemaMock();
const exceptionList2 = { ...getExceptionListSchemaMock(), list_id: 'not_endpoint_list', id: '2' };
diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx
index 9925b35616c91..79e91fdeb813a 100644
--- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx
+++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx
@@ -54,6 +54,16 @@ describe('when on the list page', () => {
let store: AppContextTestRender['store'];
let coreStart: AppContextTestRender['coreStart'];
let middlewareSpy: AppContextTestRender['middlewareSpy'];
+ let abortSpy: jest.SpyInstance;
+ beforeAll(() => {
+ const mockAbort = new AbortController();
+ mockAbort.abort();
+ abortSpy = jest.spyOn(window, 'AbortController').mockImplementation(() => mockAbort);
+ });
+
+ afterAll(() => {
+ abortSpy.mockRestore();
+ });
beforeEach(() => {
const mockedContext = createAppRootMockRenderer();
({ history, store, coreStart, middlewareSpy } = mockedContext);
diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/locked_card.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/locked_card.tsx
index 5c19a10307608..e9e9195b819d3 100644
--- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/locked_card.tsx
+++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/locked_card.tsx
@@ -6,7 +6,15 @@
*/
import React, { memo } from 'react';
-import { EuiCard, EuiIcon, EuiTextColor, EuiLink, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
+import {
+ EuiCard,
+ EuiIcon,
+ EuiTextColor,
+ EuiLink,
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiText,
+} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import styled from 'styled-components';
import { i18n } from '@kbn/i18n';
@@ -42,8 +50,10 @@ export const LockedPolicyCard = memo(() => {
}
- description={
-