diff --git a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailMenuItems.test.tsx b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailMenuItems.test.tsx index 8a0f8dbfc5cd1..b57f061a3e057 100644 --- a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailMenuItems.test.tsx +++ b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailMenuItems.test.tsx @@ -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(); diff --git a/superset-frontend/src/dashboard/containers/DashboardPage.tsx b/superset-frontend/src/dashboard/containers/DashboardPage.tsx index 7dd618850e9c8..cf2098e547fcb 100644 --- a/superset-frontend/src/dashboard/containers/DashboardPage.tsx +++ b/superset-frontend/src/dashboard/containers/DashboardPage.tsx @@ -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( diff --git a/superset-frontend/src/pages/ChartList/index.tsx b/superset-frontend/src/pages/ChartList/index.tsx index 5ed967d7c1023..cbda387681b23 100644 --- a/superset-frontend/src/pages/ChartList/index.tsx +++ b/superset-frontend/src/pages/ChartList/index.tsx @@ -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 (