diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index 596ba17d343c0..d0055008eb9bf 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -16,6 +16,7 @@ "xpack.data": "plugins/data_enhanced", "xpack.embeddableEnhanced": "plugins/embeddable_enhanced", "xpack.endpoint": "plugins/endpoint", + "xpack.enterpriseSearch": "plugins/enterprise_search", "xpack.features": "plugins/features", "xpack.fileUpload": "plugins/file_upload", "xpack.globalSearch": ["plugins/global_search"], diff --git a/x-pack/plugins/enterprise_search/public/applications/__mocks__/index.ts b/x-pack/plugins/enterprise_search/public/applications/__mocks__/index.ts index 5b19055115fde..14fde357a980a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/__mocks__/index.ts +++ b/x-pack/plugins/enterprise_search/public/applications/__mocks__/index.ts @@ -7,6 +7,7 @@ export { mockHistory } from './react_router_history.mock'; export { mockKibanaContext } from './kibana_context.mock'; export { mockLicenseContext } from './license_context.mock'; -export { mountWithKibanaContext } from './mount_with_context.mock'; +export { mountWithContext, mountWithKibanaContext } from './mount_with_context.mock'; +export { shallowWithIntl } from './shallow_with_i18n.mock'; // Note: shallow_usecontext must be imported directly as a file diff --git a/x-pack/plugins/enterprise_search/public/applications/__mocks__/mount_with_context.mock.tsx b/x-pack/plugins/enterprise_search/public/applications/__mocks__/mount_with_context.mock.tsx index dcb5810d9fccc..7d0716ce0cdd0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/__mocks__/mount_with_context.mock.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/__mocks__/mount_with_context.mock.tsx @@ -7,21 +7,43 @@ import React from 'react'; import { mount } from 'enzyme'; +import { I18nProvider } from '@kbn/i18n/react'; import { KibanaContext } from '../'; import { mockKibanaContext } from './kibana_context.mock'; +import { LicenseContext } from '../shared/licensing'; +import { mockLicenseContext } from './license_context.mock'; /** - * This helper mounts a component with a set of default KibanaContext, - * while also allowing custom context to be passed in via a second arg + * This helper mounts a component with all the contexts/providers used + * by the production app, while allowing custom context to be + * passed in via a second arg * * Example usage: * - * const wrapper = mountWithKibanaContext(, { enterpriseSearchUrl: 'someOverride' }); + * const wrapper = mountWithContext(, { enterpriseSearchUrl: 'someOverride', license: {} }); */ -export const mountWithKibanaContext = (node, contextProps) => { +export const mountWithContext = (children, context) => { return mount( - - {node} + + + + {children} + + + + ); +}; + +/** + * This helper mounts a component with just the default KibanaContext - + * useful for isolated / helper components that only need this context + * + * Same usage/override functionality as mountWithContext + */ +export const mountWithKibanaContext = (children, context) => { + return mount( + + {children} ); }; diff --git a/x-pack/plugins/enterprise_search/public/applications/__mocks__/shallow_with_i18n.mock.tsx b/x-pack/plugins/enterprise_search/public/applications/__mocks__/shallow_with_i18n.mock.tsx new file mode 100644 index 0000000000000..f37d02d251c92 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/__mocks__/shallow_with_i18n.mock.tsx @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React from 'react'; +import { shallow } from 'enzyme'; +import { I18nProvider } from '@kbn/i18n/react'; +import { IntlProvider } from 'react-intl'; + +const intlProvider = new IntlProvider({ locale: 'en', messages: {} }, {}); +const { intl } = intlProvider.getChildContext(); + +/** + * This helper shallow wraps a component with react-intl's which + * fixes "Could not find required `intl` object" console errors when running tests + * + * Example usage (should be the same as shallow()): + * + * const wrapper = shallowWithIntl(); + */ +export const shallowWithIntl = children => { + return shallow({children}, { + context: { intl }, + childContextTypes: { intl }, + }) + .childAt(0) + .dive() + .shallow(); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/empty_state.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/empty_state.tsx index 2c394d310401f..91b1a4319cbd7 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/empty_state.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/empty_state.tsx @@ -6,6 +6,7 @@ import React, { useContext } from 'react'; import { EuiPage, EuiPageBody, EuiPageContent, EuiEmptyPrompt, EuiButton } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; import { sendTelemetry } from '../../../shared/telemetry'; import { SetAppSearchBreadcrumbs as SetBreadcrumbs } from '../../../shared/kibana_breadcrumbs'; @@ -39,17 +40,34 @@ export const EmptyState: React.FC<> = () => { There’s nothing here yet} + title={ +

+ +

+ } titleSize="l" body={

- Looks like you don’t have any App Search engines. -
Let’s create your first one now. + +
+

} actions={ - Create your first Engine + } /> diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/empty_states.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/empty_states.test.tsx index 35baf68e09ca0..5419029a37b16 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/empty_states.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/empty_states.test.tsx @@ -9,6 +9,8 @@ import '../../../__mocks__/shallow_usecontext.mock'; import React from 'react'; import { shallow } from 'enzyme'; import { EuiEmptyPrompt, EuiButton, EuiCode, EuiLoadingContent } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { shallowWithIntl } from '../../../__mocks__'; jest.mock('../../utils/get_username', () => ({ getUserName: jest.fn() })); import { getUserName } from '../../utils/get_username'; @@ -24,38 +26,36 @@ import { ErrorState, NoUserState, EmptyState, LoadingState } from './'; describe('ErrorState', () => { it('renders', () => { const wrapper = shallow(); - const prompt = wrapper.find(EuiEmptyPrompt); - expect(prompt).toHaveLength(1); - expect(prompt.prop('title')).toEqual(

Cannot connect to App Search

); + expect(wrapper.find(EuiEmptyPrompt)).toHaveLength(1); }); }); describe('NoUserState', () => { it('renders', () => { const wrapper = shallow(); - const prompt = wrapper.find(EuiEmptyPrompt); - expect(prompt).toHaveLength(1); - expect(prompt.prop('title')).toEqual(

Cannot find App Search account

); + expect(wrapper.find(EuiEmptyPrompt)).toHaveLength(1); }); it('renders with username', () => { getUserName.mockImplementationOnce(() => 'dolores-abernathy'); - const wrapper = shallow(); + const wrapper = shallowWithIntl(); const prompt = wrapper.find(EuiEmptyPrompt).dive(); + const description1 = prompt + .find(FormattedMessage) + .at(1) + .dive(); - expect(prompt.find(EuiCode).prop('children')).toContain('dolores-abernathy'); + expect(description1.find(EuiCode).prop('children')).toContain('dolores-abernathy'); }); }); describe('EmptyState', () => { it('renders', () => { const wrapper = shallow(); - const prompt = wrapper.find(EuiEmptyPrompt); - expect(prompt).toHaveLength(1); - expect(prompt.prop('title')).toEqual(

There’s nothing here yet

); + expect(wrapper.find(EuiEmptyPrompt)).toHaveLength(1); }); it('sends telemetry on create first engine click', () => { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/error_state.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/error_state.tsx index 9067f8dfc9c81..0725d3650054e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/error_state.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/error_state.tsx @@ -6,6 +6,7 @@ import React, { useContext } from 'react'; import { EuiPage, EuiPageBody, EuiPageContent, EuiEmptyPrompt, EuiCode } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; import { EuiButton } from '../../../shared/react_router_helpers'; import { SetAppSearchBreadcrumbs as SetBreadcrumbs } from '../../../shared/kibana_breadcrumbs'; @@ -29,23 +30,43 @@ export const ErrorState: ReactFC<> = () => { Cannot connect to App Search} + title={ +

+ +

+ } titleSize="l" body={ <>

- We cannot connect to the App Search instance at the configured host URL:{' '} - {enterpriseSearchUrl} + {enterpriseSearchUrl}, + }} + />

- Please ensure your App Search host URL is configured correctly within{' '} - config/kibana.yml. + config/kibana.yml, + }} + />

} actions={ - Review the setup guide + } /> diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/no_user_state.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/no_user_state.tsx index 41ffe88f57fcc..c1d6c2bcffe41 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/no_user_state.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/empty_states/no_user_state.tsx @@ -6,6 +6,7 @@ import React from 'react'; import { EuiPage, EuiPageBody, EuiPageContent, EuiEmptyPrompt, EuiCode } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; import { SetAppSearchBreadcrumbs as SetBreadcrumbs } from '../../../shared/kibana_breadcrumbs'; import { SendAppSearchTelemetry as SendTelemetry } from '../../../shared/telemetry'; @@ -27,21 +28,31 @@ export const NoUserState: React.FC<> = () => { Cannot find App Search account} + title={ +

+ +

+ } titleSize="l" body={ <>

- We cannot find an App Search account matching your username - {username && ( - <> - : {username} - - )} - . + {username} : '', + }} + />

- Please contact your App Search administrator to request an invite for that user. +

} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_overview.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_overview.test.tsx index 5d029d6c4ba8a..e7223b1c6b002 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_overview.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_overview.test.tsx @@ -10,9 +10,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { render } from 'enzyme'; +import { I18nProvider } from '@kbn/i18n/react'; import { KibanaContext } from '../../../'; import { LicenseContext } from '../../../shared/licensing'; -import { mountWithKibanaContext, mockKibanaContext } from '../../../__mocks__'; +import { mountWithContext, mockKibanaContext } from '../../../__mocks__'; import { EmptyState, ErrorState, NoUserState } from '../empty_states'; import { EngineTable } from './engine_table'; @@ -23,12 +24,15 @@ describe('EngineOverview', () => { describe('non-happy-path states', () => { it('isLoading', () => { // We use render() instead of mount() here to not trigger lifecycle methods (i.e., useEffect) + // TODO: Consider pulling this out to a renderWithContext mock/helper const wrapper = render( - - - - - + + + + + + + ); // render() directly renders HTML which means we have to look for selectors instead of for LoadingState directly @@ -66,7 +70,7 @@ describe('EngineOverview', () => { results: [ { name: 'hello-world', - created_at: 'somedate', + created_at: 'Fri, 1 Jan 1970 12:00:00 +0000', document_count: 50, field_count: 10, }, @@ -164,12 +168,7 @@ describe('EngineOverview', () => { // TBH, I don't fully understand why since Enzyme's mount is supposed to // have act() baked in - could be because of the wrapping context provider? await act(async () => { - wrapper = mountWithKibanaContext( - - - , - { http: httpMock } - ); + wrapper = mountWithContext(, { http: httpMock, license }); }); wrapper.update(); // This seems to be required for the DOM to actually update diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_overview.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_overview.tsx index 1e1a583b5bcdb..d640122282618 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_overview.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_overview.tsx @@ -14,6 +14,7 @@ import { EuiTitle, EuiSpacer, } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; import { SetAppSearchBreadcrumbs as SetBreadcrumbs } from '../../../shared/kibana_breadcrumbs'; import { SendAppSearchTelemetry as SendTelemetry } from '../../../shared/telemetry'; @@ -100,7 +101,10 @@ export const EngineOverview: ReactFC<> = () => {

- Engines +

@@ -122,7 +126,10 @@ export const EngineOverview: ReactFC<> = () => {

- Meta Engines +

diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_table.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_table.test.tsx index 62305d7acb451..f7591fb6d1dee 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_table.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_table.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { EuiBasicTable, EuiPagination, EuiButtonEmpty, EuiLink } from '@elastic/eui'; -import { mountWithKibanaContext } from '../../../__mocks__'; +import { mountWithContext } from '../../../__mocks__'; jest.mock('../../../shared/telemetry', () => ({ sendTelemetry: jest.fn() })); import { sendTelemetry } from '../../../shared/telemetry'; @@ -16,7 +16,7 @@ import { EngineTable } from './engine_table'; describe('EngineTable', () => { const onPaginate = jest.fn(); // onPaginate updates the engines API call upstream - const wrapper = mountWithKibanaContext( + const wrapper = mountWithContext( { }); it('handles empty data', () => { - const emptyWrapper = mountWithKibanaContext( + const emptyWrapper = mountWithContext( ); const emptyTable = wrapper.find(EuiBasicTable); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_table.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_table.tsx index e138bade11c15..81c7888730ab8 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_table.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_table.tsx @@ -6,6 +6,8 @@ import React, { useContext } from 'react'; import { EuiBasicTable, EuiLink } from '@elastic/eui'; +import { FormattedMessage, FormattedDate, FormattedNumber } from '@kbn/i18n/react'; +import { i18n } from '@kbn/i18n'; import { sendTelemetry } from '../../../shared/telemetry'; import { KibanaContext, IKibanaContext } from '../../../index'; @@ -51,7 +53,9 @@ export const EngineTable: ReactFC = ({ const columns = [ { field: 'name', - name: 'Name', + name: i18n.translate('xpack.enterpriseSearch.appSearch.enginesOverview.table.column.name', { + defaultMessage: 'Name', + }), render: name => {name}, width: '30%', truncateText: true, @@ -64,36 +68,59 @@ export const EngineTable: ReactFC = ({ }, { field: 'created_at', - name: 'Created At', + name: i18n.translate( + 'xpack.enterpriseSearch.appSearch.enginesOverview.table.column.createdAt', + { + defaultMessage: 'Created At', + } + ), dataType: 'string', - render: dateString => { + render: dateString => ( // e.g., January 1, 1970 - return new Date(dateString).toLocaleDateString('en-US', { - year: 'numeric', - month: 'long', - day: 'numeric', - }); - }, + + ), }, { field: 'document_count', - name: 'Document Count', + name: i18n.translate( + 'xpack.enterpriseSearch.appSearch.enginesOverview.table.column.documentCount', + { + defaultMessage: 'Document Count', + } + ), dataType: 'number', - render: number => number.toLocaleString(), // Display with comma thousand separators + render: number => , truncateText: true, }, { field: 'field_count', - name: 'Field Count', + name: i18n.translate( + 'xpack.enterpriseSearch.appSearch.enginesOverview.table.column.fieldCount', + { + defaultMessage: 'Field Count', + } + ), dataType: 'number', - render: number => number.toLocaleString(), // Display with comma thousand separators + render: number => , truncateText: true, }, { field: 'name', - name: 'Actions', + name: i18n.translate( + 'xpack.enterpriseSearch.appSearch.enginesOverview.table.column.actions', + { + defaultMessage: 'Actions', + } + ), dataType: 'string', - render: name => Manage, + render: name => ( + + + + ), align: 'right', width: '100px', }, diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview_header/engine_overview_header.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview_header/engine_overview_header.tsx index df3238fde56d8..20ad3ce5ad272 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview_header/engine_overview_header.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview_header/engine_overview_header.tsx @@ -6,6 +6,7 @@ import React, { useContext } from 'react'; import { EuiPageHeader, EuiPageHeaderSection, EuiTitle, EuiButton } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; import { sendTelemetry } from '../../../shared/telemetry'; import { KibanaContext, IKibanaContext } from '../../../index'; @@ -36,11 +37,21 @@ export const EngineOverviewHeader: React.FC<> = () => { -

Engine Overview

+

+ +

- Launch App Search + + +
); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/setup_guide/setup_guide.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/setup_guide/setup_guide.tsx index 575a604069fdb..855449b0c0bcd 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/setup_guide/setup_guide.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/setup_guide/setup_guide.tsx @@ -23,6 +23,8 @@ import { EuiAccordion, EuiLink, } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { i18n } from '@kbn/i18n'; import { SetAppSearchBreadcrumbs as SetBreadcrumbs } from '../../../shared/kibana_breadcrumbs'; import { SendAppSearchTelemetry as SendTelemetry } from '../../../shared/telemetry'; @@ -38,7 +40,12 @@ export const SetupGuide: React.FC<> = () => { - Setup Guide + + + @@ -48,7 +55,12 @@ export const SetupGuide: React.FC<> = () => { -

App Search

+

+ +

@@ -61,7 +73,10 @@ export const SetupGuide: React.FC<> = () => { Getting started with App Search - in this short video we'll guide you through how to get App Search up and running @@ -69,15 +84,19 @@ export const SetupGuide: React.FC<> = () => {

- Elastic App Search provides user-friendly tools to design and deploy a powerful search - to your websites or web/mobile applications. +

- App Search has not been configured in your Kibana instance yet. To get started, follow - the instructions on this page. +

@@ -88,13 +107,20 @@ export const SetupGuide: React.FC<> = () => { headingElement="h2" steps={[ { - title: 'Add your App Search host URL to your Kibana configuration', + title: i18n.translate('xpack.enterpriseSearch.setupGuide.step1.title', { + defaultMessage: 'Add your App Search host URL to your Kibana configuration', + }), children: (

- Within your config/kibana.yml file, set{' '} - enterpriseSearch.host to the URL of your App Search - instance. For example: + config/kibana.yml, + configSetting: enterpriseSearch.host, + }} + />

enterpriseSearch.host: 'http://localhost:3002' @@ -103,75 +129,110 @@ export const SetupGuide: React.FC<> = () => { ), }, { - title: 'Reload your Kibana instance', + title: i18n.translate('xpack.enterpriseSearch.setupGuide.step2.title', { + defaultMessage: 'Reload your Kibana instance', + }), children: (

- Restart Kibana to pick up the configuration changes from the previous step. +

- If you’re using{' '} - - Elasticsearch Native - {' '} - auth within App Search - you’re all set! All users should be able to use App - Search in Kibana automatically, inheriting the existing access and permissions - they have within App Search. + + Elasticsearch Native Auth + + ), + }} + />

), }, { - title: 'Troubleshooting issues', + title: i18n.translate('xpack.enterpriseSearch.setupGuide.step3.title', { + defaultMessage: 'Troubleshooting issues', + }), children: ( <>

- This plugin does not currently support App Search and Kibana running on - different clusters. +

- This plugin does not currently support App Search and Kibana operating on - different authentication methods (for example, App Search using a - different SAML provider than Kibana). +

- App Search operating on{' '} - - Standard Auth - {' '} - is currently not fully supported by this plugin. Users created in App - Search must be granted Kibana access. Users created in Kibana will see - "Cannot find App Search account" error messages. + + Standard Auth + + ), + }} + />

diff --git a/x-pack/plugins/enterprise_search/public/applications/index.tsx b/x-pack/plugins/enterprise_search/public/applications/index.tsx index f8b1331e899cf..ac6d01f886175 100644 --- a/x-pack/plugins/enterprise_search/public/applications/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/index.tsx @@ -8,6 +8,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route, Redirect } from 'react-router-dom'; +import { I18nProvider } from '@kbn/i18n/react'; import { CoreStart, AppMountParams, HttpHandler } from 'src/core/public'; import { ClientConfigType, PluginsSetup } from '../plugin'; import { TSetBreadcrumbs } from './shared/kibana_breadcrumbs'; @@ -37,20 +38,22 @@ export const renderApp = ( plugins: PluginsSetup ) => { ReactDOM.render( - - - - - - - , + + + + + + + + + , params.element ); return () => ReactDOM.unmountComponentAtNode(params.element); diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/licensing/license_context.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/licensing/license_context.test.tsx index 3385f79d3d075..01d976bf49c19 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/licensing/license_context.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/licensing/license_context.test.tsx @@ -6,7 +6,7 @@ import React, { useContext } from 'react'; -import { mountWithKibanaContext } from '../../__mocks__'; +import { mountWithContext } from '../../__mocks__'; import { LicenseContext, ILicenseContext } from './'; describe('LicenseProvider', () => { @@ -16,11 +16,7 @@ describe('LicenseProvider', () => { }; it('renders children', () => { - const wrapper = mountWithKibanaContext( - - - - ); + const wrapper = mountWithContext(, { license: { type: 'basic' } }); expect(wrapper.find('.license-test')).toHaveLength(1); expect(wrapper.text()).toEqual('basic');