diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx
index 8e398e6236510a6..757319e7aa1ae91 100644
--- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx
@@ -154,7 +154,9 @@ describe('StepAboutRuleToggleDetails', () => {
.simulate('change', { target: { value: 'notes' } });
expect(wrapper.find('EuiButtonGroup[idSelected="notes"]').exists()).toBeTruthy();
- expect(wrapper.find('Markdown h1').text()).toEqual('this is some markdown documentation');
+ expect(wrapper.find('.euiMarkdownFormat').text()).toEqual(
+ 'this is some markdown documentation'
+ );
});
});
});
diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/__snapshots__/index.test.tsx.snap
index 718e7ce1d27a5a3..53bc76bfeb8e862 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/__snapshots__/index.test.tsx.snap
+++ b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/__snapshots__/index.test.tsx.snap
@@ -11,13 +11,6 @@ exports[`AddNote renders correctly 1`] = `
noteInputHeight={200}
updateNewNote={[MockFunction]}
/>
-
-
-
diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/__snapshots__/new_note.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/__snapshots__/new_note.test.tsx.snap
index 9bf2b5c65e82944..69e06bc7e0d1bce 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/__snapshots__/new_note.test.tsx.snap
+++ b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/__snapshots__/new_note.test.tsx.snap
@@ -3,54 +3,13 @@
exports[`NewNote renders correctly 1`] = `
,
- "id": "note",
- "name": "Note",
- }
- }
- tabs={
- Array [
- Object {
- "content": ,
- "id": "note",
- "name": "Note",
- },
- Object {
- "content":
-
- ,
- "id": "preview",
- "name": "Preview (Markdown)",
- },
- ]
- }
-/>
+>
+
+
`;
diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.test.tsx
index 570c0028e0f5161..01dfd72a22db1b8 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.test.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.test.tsx
@@ -74,7 +74,9 @@ describe('AddNote', () => {
test('it renders the contents of the note', () => {
const wrapper = mount();
- expect(wrapper.find('[data-test-subj="add-a-note"]').first().text()).toEqual(note);
+ expect(
+ wrapper.find('[data-test-subj="add-a-note"] .euiMarkdownEditorDropZone').first().text()
+ ).toEqual(note);
});
test('it invokes associateNote when the Add Note button is clicked', () => {
@@ -131,30 +133,4 @@ describe('AddNote', () => {
expect(updateNote).toBeCalled();
});
-
- test('it does NOT display the markdown formatting hint when a note has NOT been entered', () => {
- const testProps = {
- ...props,
- newNote: '',
- };
- const wrapper = mount();
-
- expect(wrapper.find('[data-test-subj="markdown-hint"]').first()).toHaveStyleRule(
- 'visibility',
- 'hidden'
- );
- });
-
- test('it displays the markdown formatting hint when a note has been entered', () => {
- const testProps = {
- ...props,
- newNote: 'We should see a formatting hint now',
- };
- const wrapper = mount();
-
- expect(wrapper.find('[data-test-subj="markdown-hint"]').first()).toHaveStyleRule(
- 'visibility',
- 'inline'
- );
- });
});
diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/new_note.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/new_note.test.tsx
index c85d9b7dca75caa..0377653ae3b646e 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/new_note.test.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/new_note.test.tsx
@@ -7,8 +7,6 @@
import { mount, shallow } from 'enzyme';
import React from 'react';
-import * as i18n from '../translations';
-
import { NewNote } from './new_note';
describe('NewNote', () => {
@@ -21,36 +19,11 @@ describe('NewNote', () => {
expect(wrapper).toMatchSnapshot();
});
- test('it renders a tab labeled "Note"', () => {
- const wrapper = mount();
-
- expect(wrapper.find('button[role="tab"]').first().text()).toEqual(i18n.NOTE);
- });
-
- test('it renders a tab labeled "Preview (Markdown)"', () => {
- const wrapper = mount();
-
- expect(wrapper.find('button[role="tab"]').at(1).text()).toEqual(i18n.PREVIEW_MARKDOWN);
- });
-
- test('it renders the expected placeholder when a note is NOT provided', () => {
- const wrapper = mount();
-
- expect(wrapper.find(`textarea[placeholder="${i18n.ADD_A_NOTE}"]`).exists()).toEqual(true);
- });
-
test('it renders a text area containing the contents of a new (raw) note', () => {
const wrapper = mount();
- expect(wrapper.find('[data-test-subj="add-a-note"]').first().text()).toEqual(note);
- });
-
- test('it renders a markdown preview when the user clicks Preview (Markdown)', () => {
- const wrapper = mount();
-
- // click the preview tab:
- wrapper.find('button[role="tab"]').at(1).simulate('click');
-
- expect(wrapper.find('[data-test-subj="markdown-root"]').first().text()).toEqual(note);
+ expect(
+ wrapper.find('[data-test-subj="add-a-note"] .euiMarkdownEditorDropZone').first().text()
+ ).toEqual(note);
});
});
diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.test.tsx
index 5506514999f35f8..54a074bb2adb7ae 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.test.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.test.tsx
@@ -83,7 +83,7 @@ describe('NoteCards', () => {
wrapper
.find('[data-test-subj="note-card"]')
.find('[data-test-subj="note-card-body"]')
- .find('[data-test-subj="markdown-root"]')
+ .find('.euiMarkdownFormat')
.first()
.text()
).toEqual(getNotesByIds(noteIds)[0].note);