Skip to content

Commit

Permalink
Add scripted field deprecation message (#97574) (#97625)
Browse files Browse the repository at this point in the history
* add scripted field deprecation msg

Co-authored-by: Matthew Kime <matt@mattki.me>
  • Loading branch information
kibanamachine and mattkime authored Apr 20, 2021
1 parent 0f09ae8 commit aeaec0c
Show file tree
Hide file tree
Showing 11 changed files with 442 additions and 241 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,31 @@
*/

import React from 'react';
import { render } from 'enzyme';
import { mount } from 'enzyme';
import { RouteComponentProps } from 'react-router-dom';
import { ScopedHistory } from 'kibana/public';
import { scopedHistoryMock } from '../../../../../../../../core/public/mocks';
import { KibanaContextProvider } from 'src/plugins/kibana_react/public';
import { mockManagementPlugin } from '../../../../../mocks';

import { Header } from './header';

describe('Header', () => {
const mockedContext = mockManagementPlugin.createIndexPatternManagmentContext();
test('should render normally', () => {
const component = render(
const component = mount(
<Header.WrappedComponent
indexPatternId="test"
history={(scopedHistoryMock.create() as unknown) as ScopedHistory}
location={({} as unknown) as RouteComponentProps['location']}
match={({} as unknown) as RouteComponentProps['match']}
/>
/>,
{
wrappingComponent: KibanaContextProvider,
wrappingComponentProps: {
services: mockedContext,
},
}
);

expect(component).toMatchSnapshot();
Expand Down
Loading

0 comments on commit aeaec0c

Please sign in to comment.