From 8ab3c39cc228ee9a4b66e94329d93aab85008100 Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" Date: Thu, 24 Feb 2022 13:32:48 -0300 Subject: [PATCH] Fixes tests --- .../SliceHeaderControls/SliceHeaderControls.test.tsx | 4 ++-- .../ExploreAdditionalActionsMenu.test.jsx | 3 ++- .../controls/DatasourceControl/DatasourceControl.test.jsx | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx b/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx index 3f78c01439eb2..c5a19de74a83e 100644 --- a/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx +++ b/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx @@ -23,8 +23,8 @@ import { render, screen } from 'spec/helpers/testing-library'; import { FeatureFlag } from 'src/featureFlags'; import SliceHeaderControls from '.'; -jest.mock('src/common/components', () => { - const original = jest.requireActual('src/common/components'); +jest.mock('src/components/Dropdown', () => { + const original = jest.requireActual('src/components/Dropdown'); return { ...original, NoAnimationDropdown: (props: any) => ( diff --git a/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.jsx b/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.jsx index b40a8a8e8f5fe..b2c03ac032dab 100644 --- a/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.jsx +++ b/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.jsx @@ -21,7 +21,8 @@ import { shallow } from 'enzyme'; import { styledMount as mount } from 'spec/helpers/theming'; import thunk from 'redux-thunk'; import configureStore from 'redux-mock-store'; -import { Dropdown, Menu } from 'src/common/components'; +import { Dropdown } from 'src/common/components'; +import { Menu } from 'src/components/Menu'; import ExploreAdditionalActionsMenu from 'src/explore/components/ExploreAdditionalActionsMenu'; const mockStore = configureStore([thunk]); diff --git a/superset-frontend/src/explore/components/controls/DatasourceControl/DatasourceControl.test.jsx b/superset-frontend/src/explore/components/controls/DatasourceControl/DatasourceControl.test.jsx index aed44f7fcb420..4248e8634cc9e 100644 --- a/superset-frontend/src/explore/components/controls/DatasourceControl/DatasourceControl.test.jsx +++ b/superset-frontend/src/explore/components/controls/DatasourceControl/DatasourceControl.test.jsx @@ -20,7 +20,7 @@ import React from 'react'; import sinon from 'sinon'; import configureStore from 'redux-mock-store'; import { shallow } from 'enzyme'; -import { Menu } from 'src/common/components'; +import { Menu } from 'src/components/Menu'; import { DatasourceModal, ChangeDatasourceModal,