Skip to content

Commit

Permalink
Add modified test back for Workplace Search
Browse files Browse the repository at this point in the history
  • Loading branch information
scottybollinger committed Jun 24, 2021
1 parent 5653353 commit a46f826
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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(<WorkplaceSearchConfigured workplaceSearch={workplaceSearch} />);

expect(initializeAppData).toHaveBeenCalledWith({ workplaceSearch });
});

it('does not re-initialize app data or re-render header actions', () => {
setMockValues({ hasInitialized: true });

Expand Down

0 comments on commit a46f826

Please sign in to comment.