From a46f82620af2a578962f82b2b651f3368eda3a59 Mon Sep 17 00:00:00 2001 From: scottybollinger Date: Thu, 24 Jun 2021 12:06:41 -0500 Subject: [PATCH] Add modified test back for Workplace Search --- .../public/applications/workplace_search/index.test.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.test.tsx index 905f0da4be92f..9cfe8b5c72e08 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.test.tsx @@ -7,6 +7,7 @@ import '../__mocks__/react_router'; import '../__mocks__/shallow_useeffect.mock'; +import { DEFAULT_INITIAL_APP_DATA } from '../../../common/__mocks__'; import { setMockValues, setMockActions, mockKibanaValues } from '../__mocks__/kea_logic'; import React from 'react'; @@ -68,6 +69,13 @@ describe('WorkplaceSearchConfigured', () => { expect(mockKibanaValues.renderHeaderActions).toHaveBeenCalledWith(WorkplaceSearchHeaderActions); }); + it('initializes app data with passed props', () => { + const { workplaceSearch } = DEFAULT_INITIAL_APP_DATA; + shallow(); + + expect(initializeAppData).toHaveBeenCalledWith({ workplaceSearch }); + }); + it('does not re-initialize app data or re-render header actions', () => { setMockValues({ hasInitialized: true });