Skip to content

Commit

Permalink
Fixed some left over types
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-tavares committed Nov 24, 2020
1 parent 4b31a39 commit 789ad25
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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<any>;
render: UiRender;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
4 changes: 3 additions & 1 deletion x-pack/plugins/fleet/public/applications/fleet/mock/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<FleetStartServices>;

export type MockedFleetSetupDeps = MockedKeys<FleetSetupDeps>;

export type MockedFleetStartDeps = MockedKeys<FleetStartDeps>;

export type MockedFleetStart = MockedKeys<FleetStart>;

0 comments on commit 789ad25

Please sign in to comment.