diff --git a/x-pack/plugins/lens/public/index.ts b/x-pack/plugins/lens/public/index.ts index fa5a9f9289e92..9b53e59f96792 100644 --- a/x-pack/plugins/lens/public/index.ts +++ b/x-pack/plugins/lens/public/index.ts @@ -19,7 +19,9 @@ export type { SeriesType, ValueLabelConfig, YAxisMode, + XYCurveType, } from './xy_visualization/types'; +export type { DataType } from './types'; export type { PieVisualizationState, PieLayerState, diff --git a/x-pack/plugins/lens/public/mocks.ts b/x-pack/plugins/lens/public/mocks.tsx similarity index 68% rename from x-pack/plugins/lens/public/mocks.ts rename to x-pack/plugins/lens/public/mocks.tsx index fd1e38db242a8..743846d81213c 100644 --- a/x-pack/plugins/lens/public/mocks.ts +++ b/x-pack/plugins/lens/public/mocks.tsx @@ -5,16 +5,20 @@ * 2.0. */ +import React from 'react'; import { LensPublicStart } from '.'; +import { visualizationTypes } from './xy_visualization/types'; export type Start = jest.Mocked; const createStartContract = (): Start => { const startContract: Start = { - EmbeddableComponent: jest.fn(() => null), + EmbeddableComponent: jest.fn(() => { + return Lens Embeddable Component; + }), canUseEditor: jest.fn(() => true), navigateToPrefilledEditor: jest.fn(), - getXyVisTypes: jest.fn(), + getXyVisTypes: jest.fn().mockReturnValue(new Promise(() => visualizationTypes)), }; return startContract; };