From 8abf2d5eadc3cb8920bb2f0a01a276a581774338 Mon Sep 17 00:00:00 2001 From: cauemarcondes Date: Fri, 2 Oct 2020 11:17:02 +0200 Subject: [PATCH] fixing types --- .../public/pages/overview/overview.stories.tsx | 12 ++++++------ .../observability/public/utils/test_helper.tsx | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/observability/public/pages/overview/overview.stories.tsx b/x-pack/plugins/observability/public/pages/overview/overview.stories.tsx index ff34116f59104..714a204783c56 100644 --- a/x-pack/plugins/observability/public/pages/overview/overview.stories.tsx +++ b/x-pack/plugins/observability/public/pages/overview/overview.stories.tsx @@ -6,7 +6,7 @@ import { makeDecorator } from '@storybook/addons'; import { storiesOf } from '@storybook/react'; -import { AppMountContext } from 'kibana/public'; +import { AppMountContext, CoreStart } from 'kibana/public'; import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { UI_SETTINGS } from '../../../../../../src/plugins/data/public'; @@ -36,7 +36,7 @@ const withCore = makeDecorator({ return ( - + {storyFn(context)} @@ -119,7 +119,7 @@ const core = ({ return euiSettings[key]; }, }, -} as unknown) as AppMountContext['core']; +} as unknown) as CoreStart; const coreWithAlerts = ({ ...core, @@ -127,7 +127,7 @@ const coreWithAlerts = ({ ...core.http, get: alertsFetchData, }, -} as unknown) as AppMountContext['core']; +} as unknown) as CoreStart; const coreWithNewsFeed = ({ ...core, @@ -135,7 +135,7 @@ const coreWithNewsFeed = ({ ...core.http, get: newsFeedFetchData, }, -} as unknown) as AppMountContext['core']; +} as unknown) as CoreStart; const coreAlertsThrowsError = ({ ...core, @@ -145,7 +145,7 @@ const coreAlertsThrowsError = ({ throw new Error('Error fetching Alerts data'); }, }, -} as unknown) as AppMountContext['core']; +} as unknown) as CoreStart; storiesOf('app/Overview', module) .addDecorator(withCore(core)) diff --git a/x-pack/plugins/observability/public/utils/test_helper.tsx b/x-pack/plugins/observability/public/utils/test_helper.tsx index 2a290f2b24d6b..19c4ba4a8a280 100644 --- a/x-pack/plugins/observability/public/utils/test_helper.tsx +++ b/x-pack/plugins/observability/public/utils/test_helper.tsx @@ -5,7 +5,7 @@ */ import React from 'react'; import { render as testLibRender } from '@testing-library/react'; -import { AppMountContext } from 'kibana/public'; +import { CoreStart } from 'kibana/public'; import { PluginContext } from '../context/plugin_context'; import { EuiThemeProvider } from '../typings'; @@ -15,7 +15,7 @@ export const core = ({ prepend: jest.fn(), }, }, -} as unknown) as AppMountContext['core']; +} as unknown) as CoreStart; export const render = (component: React.ReactNode) => { return testLibRender(