fix: Duplicated plugin registration (#26379)

This commit is contained in:
Michael S. Molina 2023-12-29 15:58:26 -03:00 committed by GitHub
parent 3a0391bbb9
commit 29633e7d8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -19,6 +19,7 @@
import React from 'react';
import userEvent from '@testing-library/user-event';
import { render, screen, within } from 'spec/helpers/testing-library';
import setupPlugins from 'src/setup/setupPlugins';
import { getMockStoreWithNativeFilters } from 'spec/fixtures/mockStore';
import chartQueries, { sliceId } from 'spec/fixtures/mockChartQueries';
import { BinaryQueryObjectFilterClause } from '@superset-ui/core';
@ -241,6 +242,10 @@ const expectDrillToDetailByAll = async (
await expectDrillToDetailModal(menuItemName, filters);
};
beforeAll(() => {
setupPlugins();
});
test('dropdown menu for unsupported chart', async () => {
renderMenu({ formData: unsupportedChartFormData });
await expectDrillToDetailEnabled();

View File

@ -39,7 +39,6 @@ import {
import { hydrateDashboard } from 'src/dashboard/actions/hydrate';
import { setDatasources } from 'src/dashboard/actions/datasources';
import injectCustomCss from 'src/dashboard/util/injectCustomCss';
import setupPlugins from 'src/setup/setupPlugins';
import { LocalStorageKeys, setItem } from 'src/utils/localStorageHelpers';
import { URL_PARAMS } from 'src/constants';
@ -65,7 +64,6 @@ import SyncDashboardState, {
export const DashboardPageIdContext = React.createContext('');
setupPlugins();
const DashboardBuilder = React.lazy(
() =>
import(

View File

@ -64,7 +64,6 @@ import Tag from 'src/types/TagType';
import { Tooltip } from 'src/components/Tooltip';
import Icons from 'src/components/Icons';
import { nativeFilterGate } from 'src/dashboard/components/nativeFilters/utils';
import setupPlugins from 'src/setup/setupPlugins';
import InfoTooltip from 'src/components/InfoTooltip';
import CertifiedBadge from 'src/components/CertifiedBadge';
import { GenericLink } from 'src/components/GenericLink/GenericLink';
@ -106,7 +105,6 @@ const CONFIRM_OVERWRITE_MESSAGE = t(
'sure you want to overwrite?',
);
setupPlugins();
const registry = getChartMetadataRegistry();
const createFetchDatasets = async (