From bb1853620811e50a73f429d1fc0cec3cda024991 Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Fri, 16 Dec 2022 18:07:48 +0200 Subject: [PATCH] Fix tests --- .../editor_frame/config_panel/config_panel.test.tsx | 2 ++ .../editor_frame/workspace_panel/workspace_panel.test.tsx | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx index af63826c1e71d..fa180593faa56 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx @@ -22,6 +22,7 @@ import { LayerPanel } from './layer_panel'; import { coreMock } from '@kbn/core/public/mocks'; import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; import { uiActionsPluginMock } from '@kbn/ui-actions-plugin/public/mocks'; +import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { generateId } from '../../../id_generator'; import { mountWithProvider } from '../../../mocks'; import { LayerTypes } from '@kbn/expression-xy-plugin/public'; @@ -135,6 +136,7 @@ describe('ConfigPanel', () => { isFullscreen: false, toggleFullscreen: jest.fn(), uiActions, + dataViewsService: dataViewPluginMocks.createStartContract(), }; } diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.test.tsx index 257d6d78cff99..069f02eaff424 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.test.tsx @@ -34,6 +34,7 @@ import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; import { uiActionsPluginMock } from '@kbn/ui-actions-plugin/public/mocks'; import { TriggerContract } from '@kbn/ui-actions-plugin/public/triggers'; import { VIS_EVENT_TO_TRIGGER } from '@kbn/visualizations-plugin/public/embeddable'; +import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { applyChanges, setState, @@ -44,6 +45,7 @@ import { getLensInspectorService } from '../../../lens_inspector_service'; import { inspectorPluginMock } from '@kbn/inspector-plugin/public/mocks'; import { disableAutoApply, enableAutoApply } from '../../../state_management/lens_slice'; import { Ast, toExpression } from '@kbn/interpreter'; +import { createIndexPatternServiceMock } from '../../../mocks/data_views_service_mock'; const defaultPermissions: Record>> = { navLinks: { management: true }, @@ -67,10 +69,12 @@ const defaultProps = { plugins: { uiActions: uiActionsPluginMock.createStartContract(), data: mockDataPlugin(), + dataViews: dataViewPluginMocks.createStartContract(), }, getSuggestionForField: () => undefined, lensInspector: getLensInspectorService(inspectorPluginMock.createStartContract()), toggleFullscreen: jest.fn(), + indexPatternService: createIndexPatternServiceMock(), }; const toExpr = (