Skip to content

Commit

Permalink
fix: Duplicated plugin registration (#26379)
Browse files Browse the repository at this point in the history
(cherry picked from commit 29633e7)
  • Loading branch information
michael-s-molina committed Jan 3, 2024
1 parent 76e2388 commit 5d49100
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 0 additions & 2 deletions superset-frontend/src/dashboard/containers/DashboardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -65,7 +64,6 @@ import SyncDashboardState, {

export const DashboardPageIdContext = React.createContext('');

setupPlugins();
const DashboardBuilder = React.lazy(
() =>
import(
Expand Down
2 changes: 0 additions & 2 deletions superset-frontend/src/pages/ChartList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -106,7 +105,6 @@ const CONFIRM_OVERWRITE_MESSAGE = t(
'sure you want to overwrite?',
);

setupPlugins();
const registry = getChartMetadataRegistry();

const createFetchDatasets = async (
Expand Down

0 comments on commit 5d49100

Please sign in to comment.