From dd834c1c23d5cfb089c5905fd79dba272ef1d402 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Fri, 20 Mar 2020 21:19:41 -0500 Subject: [PATCH] Fix more tests --- .../rules/components/description_step/index.test.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.test.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.test.tsx index 2c6f47fd27c443..557da8677f777b 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.test.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.test.tsx @@ -18,7 +18,7 @@ import { Filter, FilterManager, } from '../../../../../../../../../../src/plugins/data/public'; -import { mockAboutStepRule } from '../../all/__mocks__/mock'; +import { mockAboutStepRule, mockDefineStepRule } from '../../all/__mocks__/mock'; import { coreMock } from '../../../../../../../../../../src/core/public/mocks'; import { DEFAULT_TIMELINE_TITLE } from '../../../../../components/timeline/translations'; import * as i18n from './translations'; @@ -263,7 +263,7 @@ describe('description_step', () => { test('returns expected ListItems array when given valid inputs', () => { const result: ListItems[] = buildListItems(mockAboutStep, schema, mockFilterManager); - expect(result.length).toEqual(10); + expect(result.length).toEqual(9); }); }); @@ -431,10 +431,11 @@ describe('description_step', () => { describe('timeline', () => { test('returns timeline title if one exists', () => { + const mockDefineStep = mockDefineStepRule(); const result: ListItems[] = getDescriptionItem( 'timeline', 'Timeline label', - mockAboutStep, + mockDefineStep, mockFilterManager ); @@ -444,7 +445,7 @@ describe('description_step', () => { test('returns default timeline title if none exists', () => { const mockStep = { - ...mockAboutStep, + ...mockDefineStepRule(), timeline: { id: '12345', },