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 });