From 075ed030e188551b3eb1c0623af38a224d137da9 Mon Sep 17 00:00:00 2001 From: oatkiller <robert.austin@elastic.co> Date: Thu, 5 Dec 2019 09:00:19 -0500 Subject: [PATCH] change interface of renderApp in resolver_test plugin --- .../public/applications/resolver_test/index.tsx | 7 +++---- .../plugins/resolver_test/public/plugin.ts | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/x-pack/test/plugin_functional/plugins/resolver_test/public/applications/resolver_test/index.tsx b/x-pack/test/plugin_functional/plugins/resolver_test/public/applications/resolver_test/index.tsx index 3ac955884b28b..67149d94ff69c 100644 --- a/x-pack/test/plugin_functional/plugins/resolver_test/public/applications/resolver_test/index.tsx +++ b/x-pack/test/plugin_functional/plugins/resolver_test/public/applications/resolver_test/index.tsx @@ -6,7 +6,7 @@ import * as React from 'react'; import ReactDOM from 'react-dom'; -import { AppMountContext, AppMountParameters } from 'kibana/public'; +import { AppMountParameters } from 'kibana/public'; import { I18nProvider } from '@kbn/i18n/react'; import { IEmbeddable } from 'src/plugins/embeddable/public'; import { useEffect } from 'react'; @@ -15,10 +15,9 @@ import { useEffect } from 'react'; * This module will be loaded asynchronously to reduce the bundle size of your plugin's main bundle. */ export function renderApp( - ...args: [AppMountContext, AppMountParameters, Promise<IEmbeddable | undefined>] + { element }: AppMountParameters, + embeddable: Promise<IEmbeddable | undefined> ) { - const [, { element }, embeddable] = args; - ReactDOM.render( <I18nProvider> <AppRoot embeddable={embeddable} /> diff --git a/x-pack/test/plugin_functional/plugins/resolver_test/public/plugin.ts b/x-pack/test/plugin_functional/plugins/resolver_test/public/plugin.ts index 9bba05ab525ab..c7a81003a51dd 100644 --- a/x-pack/test/plugin_functional/plugins/resolver_test/public/plugin.ts +++ b/x-pack/test/plugin_functional/plugins/resolver_test/public/plugin.ts @@ -23,9 +23,9 @@ export class ResolverTestPlugin implements Plugin { title: i18n.translate('xpack.resolver_test.pluginTitle', { defaultMessage: 'Resolver Test', }), - mount: async (context, params) => { + mount: async (_context, params) => { const { renderApp } = await import('./applications/resolver_test'); - return renderApp(context, params, this.embeddablePromise); + return renderApp(params, this.embeddablePromise); }, }); }