Skip to content

Commit

Permalink
🏷️ Fix type issues after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
dej611 committed Oct 9, 2024
1 parent 08462d7 commit ea89ca9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
12 changes: 0 additions & 12 deletions x-pack/plugins/lens/public/app_plugin/app.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,6 @@ import faker from 'faker';
import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { VisualizeEditorContext } from '../types';
import { pluginServices as presentationUtilPluginServices } from '@kbn/presentation-util-plugin/public/services';

presentationUtilPluginServices.getHooks = jest.fn().mockReturnValue({
capabilities: {
useService: () => ({
canAccessDashboards: () => true,
canCreateNewDashboards: () => true,
canSaveVisualizations: () => true,
canSetAdvancedSettings: () => true,
}),
},
});

jest.mock('../persistence/saved_objects_utils/check_for_duplicate_title', () => ({
checkForDuplicateTitle: jest.fn(),
Expand Down
3 changes: 1 addition & 2 deletions x-pack/plugins/lens/public/app_plugin/mounter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import React, { useCallback, useEffect, useState, useMemo, PropsWithChildren, FC } from 'react';
import React, { useCallback, useEffect, useState, useMemo } from 'react';
import { AppMountParameters, CoreSetup, CoreStart } from '@kbn/core/public';
import { FormattedMessage } from '@kbn/i18n-react';
import { RouteComponentProps } from 'react-router-dom';
Expand Down Expand Up @@ -143,7 +143,6 @@ export async function mountApp(
mountProps: {
createEditorFrame: EditorFrameStart['createInstance'];
attributeService: LensAttributesService;
getPresentationUtilContext: () => FC<PropsWithChildren<{}>>;
topNavMenuEntryGenerators: LensTopNavMenuEntryGenerator[];
locator?: LensAppLocator;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function getStateManagementForInlineEditing(
const updatePanelState = (
datasourceState: unknown,
visualizationState: unknown,
visualizationType: string
visualizationType?: string
) => {
const viz = getAttributes();
const datasourceStates: DatasourceStates = {
Expand All @@ -37,7 +37,7 @@ export function getStateManagementForInlineEditing(
const newViz = mergeToNewDoc(
viz,
{
activeId: visualizationType,
activeId: visualizationType || viz.visualizationType,
state: visualizationState,
},
datasourceStates,
Expand Down

0 comments on commit ea89ca9

Please sign in to comment.