diff --git a/superset-frontend/spec/javascripts/explore/components/RunQueryActionButton_spec.jsx b/superset-frontend/src/SqlLab/components/RunQueryActionButton/RunQueryActionButton.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/RunQueryActionButton_spec.jsx
rename to superset-frontend/src/SqlLab/components/RunQueryActionButton/RunQueryActionButton.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/exploreActions_spec.js b/superset-frontend/src/explore/actions/exploreActions.test.js
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/exploreActions_spec.js
rename to superset-frontend/src/explore/actions/exploreActions.test.js
diff --git a/superset-frontend/spec/javascripts/explore/components/ControlPanelsContainer_spec.tsx b/superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/ControlPanelsContainer_spec.tsx
rename to superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx
diff --git a/superset-frontend/spec/javascripts/explore/components/ControlRow_spec.tsx b/superset-frontend/src/explore/components/ControlRow.test.tsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/ControlRow_spec.tsx
rename to superset-frontend/src/explore/components/ControlRow.test.tsx
diff --git a/superset-frontend/spec/javascripts/explore/components/EmbedCodeButton_spec.jsx b/superset-frontend/src/explore/components/EmbedCodeButton.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/EmbedCodeButton_spec.jsx
rename to superset-frontend/src/explore/components/EmbedCodeButton.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/ExploreActionButtons_spec.jsx b/superset-frontend/src/explore/components/ExploreActionButtons.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/ExploreActionButtons_spec.jsx
rename to superset-frontend/src/explore/components/ExploreActionButtons.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/ExploreAdditionalActionsMenu.jsx b/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.jsx
similarity index 82%
rename from superset-frontend/spec/javascripts/explore/components/ExploreAdditionalActionsMenu.jsx
rename to superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.jsx
index 09380586c3c3f..b40a8a8e8f5fe 100644
--- a/superset-frontend/spec/javascripts/explore/components/ExploreAdditionalActionsMenu.jsx
+++ b/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.jsx
@@ -17,11 +17,16 @@
* under the License.
*/
import React from 'react';
-import { mount, shallow } from 'enzyme';
-import { supersetTheme, ThemeProvider } from '@superset-ui/core';
+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 ExploreAdditionalActionsMenu from 'src/explore/components/ExploreAdditionalActionsMenu';
+const mockStore = configureStore([thunk]);
+const store = mockStore({});
+
describe('ExploreAdditionalActionsMenu', () => {
const defaultProps = {
animation: false,
@@ -43,12 +48,9 @@ describe('ExploreAdditionalActionsMenu', () => {
).toBe(true);
});
it('renders a dropdown with 3 items', () => {
- const wrapper = mount(, {
- wrappingComponent: ThemeProvider,
- wrappingComponentProps: {
- theme: supersetTheme,
- },
- });
+ const wrapper = mount(
+ ,
+ );
const dropdown = wrapper.find(Dropdown);
const menu = shallow(
{dropdown.prop('overlay')}
);
const menuItems = menu.find(Menu.Item);
diff --git a/superset-frontend/spec/javascripts/explore/components/ExploreChartPanel_spec.jsx b/superset-frontend/src/explore/components/ExploreChartPanel.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/ExploreChartPanel_spec.jsx
rename to superset-frontend/src/explore/components/ExploreChartPanel.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/ExploreViewContainer_spec.jsx b/superset-frontend/src/explore/components/ExploreViewContainer.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/ExploreViewContainer_spec.jsx
rename to superset-frontend/src/explore/components/ExploreViewContainer.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/QueryAndSaveBtns_spec.jsx b/superset-frontend/src/explore/components/QueryAndSaveBtns.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/QueryAndSaveBtns_spec.jsx
rename to superset-frontend/src/explore/components/QueryAndSaveBtns.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/RowCountLabel_spec.jsx b/superset-frontend/src/explore/components/RowCountLabel.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/RowCountLabel_spec.jsx
rename to superset-frontend/src/explore/components/RowCountLabel.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/SaveModal_spec.jsx b/superset-frontend/src/explore/components/SaveModal.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/SaveModal_spec.jsx
rename to superset-frontend/src/explore/components/SaveModal.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/BoundsControl_spec.jsx b/superset-frontend/src/explore/components/controls/BoundsControl.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/BoundsControl_spec.jsx
rename to superset-frontend/src/explore/components/controls/BoundsControl.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/CheckboxControl_spec.tsx b/superset-frontend/src/explore/components/controls/CheckboxControl.test.tsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/CheckboxControl_spec.tsx
rename to superset-frontend/src/explore/components/controls/CheckboxControl.test.tsx
diff --git a/superset-frontend/spec/javascripts/explore/components/ColorPickerControl_spec.tsx b/superset-frontend/src/explore/components/controls/ColorPickerControl.test.tsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/ColorPickerControl_spec.tsx
rename to superset-frontend/src/explore/components/controls/ColorPickerControl.test.tsx
diff --git a/superset-frontend/spec/javascripts/explore/components/ColorScheme_spec.jsx b/superset-frontend/src/explore/components/controls/ColorSchemeControl/ColorScheme.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/ColorScheme_spec.jsx
rename to superset-frontend/src/explore/components/controls/ColorSchemeControl/ColorScheme.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/DatasourceControl_spec.jsx b/superset-frontend/src/explore/components/controls/DatasourceControl/DatasourceControl.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/DatasourceControl_spec.jsx
rename to superset-frontend/src/explore/components/controls/DatasourceControl/DatasourceControl.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/FilterBoxItemControl_spec.jsx b/superset-frontend/src/explore/components/controls/FilterBoxItemControl/FilterBoxItemControl.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/FilterBoxItemControl_spec.jsx
rename to superset-frontend/src/explore/components/controls/FilterBoxItemControl/FilterBoxItemControl.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/AdhocMetric_spec.js b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetric.test.js
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/AdhocMetric_spec.js
rename to superset-frontend/src/explore/components/controls/MetricControl/AdhocMetric.test.js
diff --git a/superset-frontend/spec/javascripts/explore/components/AdhocMetricEditPopover_spec.jsx b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/AdhocMetricEditPopover.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/AdhocMetricEditPopover_spec.jsx
rename to superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/AdhocMetricEditPopover.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/AdhocMetricEditPopoverTitle_spec.jsx b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/AdhocMetricEditPopoverTitle_spec.jsx
rename to superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/AdhocMetricOption_spec.jsx b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricOption.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/AdhocMetricOption_spec.jsx
rename to superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricOption.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/AggregateOption_spec.tsx b/superset-frontend/src/explore/components/controls/MetricControl/AggregateOption.test.tsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/AggregateOption_spec.tsx
rename to superset-frontend/src/explore/components/controls/MetricControl/AggregateOption.test.tsx
diff --git a/superset-frontend/spec/javascripts/explore/components/FilterDefinitionOption_spec.jsx b/superset-frontend/src/explore/components/controls/MetricControl/FilterDefinitionOption.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/FilterDefinitionOption_spec.jsx
rename to superset-frontend/src/explore/components/controls/MetricControl/FilterDefinitionOption.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/MetricDefinitionOption_spec.jsx b/superset-frontend/src/explore/components/controls/MetricControl/MetricDefinitionOption.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/MetricDefinitionOption_spec.jsx
rename to superset-frontend/src/explore/components/controls/MetricControl/MetricDefinitionOption.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/MetricDefinitionValue_spec.jsx b/superset-frontend/src/explore/components/controls/MetricControl/MetricDefinitionValue.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/MetricDefinitionValue_spec.jsx
rename to superset-frontend/src/explore/components/controls/MetricControl/MetricDefinitionValue.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/MetricsControl_spec.jsx b/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/MetricsControl_spec.jsx
rename to superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/SelectControl_spec.jsx b/superset-frontend/src/explore/components/controls/SelectControl.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/SelectControl_spec.jsx
rename to superset-frontend/src/explore/components/controls/SelectControl.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/TextArea_spec.jsx b/superset-frontend/src/explore/components/controls/TextAreaControl.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/TextArea_spec.jsx
rename to superset-frontend/src/explore/components/controls/TextAreaControl.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/ViewportControl_spec.jsx b/superset-frontend/src/explore/components/controls/ViewportControl.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/ViewportControl_spec.jsx
rename to superset-frontend/src/explore/components/controls/ViewportControl.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/VizTypeControl_spec.jsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeControl.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/VizTypeControl_spec.jsx
rename to superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeControl.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/withAsyncVerification_spec.tsx b/superset-frontend/src/explore/components/controls/withAsyncVerification.test.tsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/withAsyncVerification_spec.tsx
rename to superset-frontend/src/explore/components/controls/withAsyncVerification.test.tsx
diff --git a/superset-frontend/spec/javascripts/explore/controlUtils_spec.tsx b/superset-frontend/src/explore/controlUtils/controlUtils.test.tsx
similarity index 99%
rename from superset-frontend/spec/javascripts/explore/controlUtils_spec.tsx
rename to superset-frontend/src/explore/controlUtils/controlUtils.test.tsx
index db3e9717b8a32..ac8dcef7a517e 100644
--- a/superset-frontend/spec/javascripts/explore/controlUtils_spec.tsx
+++ b/superset-frontend/src/explore/controlUtils/controlUtils.test.tsx
@@ -33,7 +33,7 @@ import {
controlPanelSectionsChartOptions,
controlPanelSectionsChartOptionsOnlyColorScheme,
controlPanelSectionsChartOptionsTable,
-} from 'spec/javascripts/explore/fixtures';
+} from 'src/explore/fixtures';
const getKnownControlConfig = (controlKey: string, vizType: string) =>
getControlConfig(controlKey, vizType) as ControlConfig;
diff --git a/superset-frontend/spec/javascripts/explore/utils_spec.jsx b/superset-frontend/src/explore/exploreUtils/exploreUtils.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/utils_spec.jsx
rename to superset-frontend/src/explore/exploreUtils/exploreUtils.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/fixtures.tsx b/superset-frontend/src/explore/fixtures.tsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/fixtures.tsx
rename to superset-frontend/src/explore/fixtures.tsx
diff --git a/superset-frontend/spec/javascripts/explore/store_spec.jsx b/superset-frontend/src/explore/store.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/store_spec.jsx
rename to superset-frontend/src/explore/store.test.jsx
diff --git a/superset-frontend/spec/javascripts/explore/components/FilterBox_spec.jsx b/superset-frontend/src/visualizations/FilterBox/FilterBox.test.jsx
similarity index 100%
rename from superset-frontend/spec/javascripts/explore/components/FilterBox_spec.jsx
rename to superset-frontend/src/visualizations/FilterBox/FilterBox.test.jsx