diff --git a/x-pack/plugins/fleet/public/applications/fleet/mock/create_test_renderer.tsx b/x-pack/plugins/fleet/public/applications/fleet/mock/create_test_renderer.tsx index 9280385d0468d..b4ee7184b8d53 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/mock/create_test_renderer.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/mock/create_test_renderer.tsx @@ -9,12 +9,12 @@ import React, { memo } from 'react'; import { render as reactRender, RenderOptions, RenderResult, act } from '@testing-library/react'; import { ScopedHistory } from '../../../../../../../src/core/public'; import { FleetAppContext } from '../app'; -import { FleetConfigType, FleetStart } from '../../../plugin'; +import { FleetConfigType } from '../../../plugin'; import { createConfigurationMock } from './plugin_configuration'; import { UIExtensionsStorage } from '../types'; import { createStartMock } from './plugin_interfaces'; import { createStartServices } from './fleet_start_services'; -import { MockedFleetStartServices } from './types'; +import { MockedFleetStart, MockedFleetStartServices } from './types'; type UiRender = (ui: React.ReactElement, options?: RenderOptions) => RenderResult; @@ -31,7 +31,7 @@ export interface TestRenderer { startServices: MockedFleetStartServices; config: FleetConfigType; /** The Interface returned by the Fleet plugin `start()` phase */ - startInterface: FleetStart; + startInterface: MockedFleetStart; kibanaVersion: string; AppWrapper: React.FC; render: UiRender; diff --git a/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_configuration.ts b/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_configuration.ts index 7eb5b818eadb8..735c1d11a9837 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_configuration.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_configuration.ts @@ -4,9 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IngestManagerConfigType } from '../../../plugin'; +import { FleetConfigType } from '../../../plugin'; -export const createConfigurationMock = (): IngestManagerConfigType => { +export const createConfigurationMock = (): FleetConfigType => { return { enabled: true, registryUrl: '', diff --git a/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_interfaces.ts b/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_interfaces.ts index 3bc3472e6de11..786702863b0d6 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_interfaces.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_interfaces.ts @@ -4,13 +4,11 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IngestManagerStart } from '../../../plugin'; import { UIExtensionsStorage } from '../types'; import { createExtensionRegistrationCallback } from '../services/ui_extensions'; +import { MockedFleetStart } from './types'; -export const createStartMock = ( - extensionsStorage: UIExtensionsStorage = {} -): IngestManagerStart => { +export const createStartMock = (extensionsStorage: UIExtensionsStorage = {}): MockedFleetStart => { return { isInitialized: jest.fn().mockResolvedValue(true), registerExtension: createExtensionRegistrationCallback(extensionsStorage), diff --git a/x-pack/plugins/fleet/public/applications/fleet/mock/types.ts b/x-pack/plugins/fleet/public/applications/fleet/mock/types.ts index bfe8f58dcedde..c5830b0a2a560 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/mock/types.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/mock/types.ts @@ -5,10 +5,12 @@ */ import { MockedKeys } from '../../../../../../../packages/kbn-utility-types/jest/index'; -import { FleetSetupDeps, FleetStartDeps, FleetStartServices } from '../../../plugin'; +import { FleetSetupDeps, FleetStart, FleetStartDeps, FleetStartServices } from '../../../plugin'; export type MockedFleetStartServices = MockedKeys; export type MockedFleetSetupDeps = MockedKeys; export type MockedFleetStartDeps = MockedKeys; + +export type MockedFleetStart = MockedKeys;