From d3a6c751287b535b5a8a75f0918cd81cff5710e6 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Thu, 17 Sep 2020 17:41:09 -0500 Subject: [PATCH] Fix jest tests following additional prop --- .../rules/eql_query_bar/eql_query_bar.test.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.test.tsx index 331c0ba4c4491..f31d2cf3f3ecf 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.test.tsx @@ -13,21 +13,27 @@ import { EqlQueryBar, EqlQueryBarProps } from './eql_query_bar'; describe('EqlQueryBar', () => { let mockField: EqlQueryBarProps['field']; + let mockIndex: string[]; beforeEach(() => { + mockIndex = ['index-123*']; mockField = useFormFieldMock({ value: mockQueryBar, }); }); it('renders correctly', () => { - const wrapper = shallow(); + const wrapper = shallow( + + ); expect(wrapper.find('[data-test-subj="myQueryBar"]')).toHaveLength(1); }); it('sets the field value on input change', () => { - const wrapper = mount(); + const wrapper = mount( + + ); wrapper .find('[data-test-subj="eqlQueryBarTextInput"]')