From 84e0606a9050dffca59cd3f5284250d958381d42 Mon Sep 17 00:00:00 2001 From: Elizabeth Thompson Date: Mon, 30 Nov 2020 14:23:56 -0800 Subject: [PATCH] chore: move fixtures and helpers to root (#11812) --- .../dashboard => }/fixtures/mockChartQueries.js | 2 +- .../dashboard => }/fixtures/mockDashboardData.js | 0 .../dashboard => }/fixtures/mockDashboardFilters.js | 0 .../dashboard => }/fixtures/mockDashboardInfo.js | 0 .../dashboard => }/fixtures/mockDashboardLayout.js | 0 .../dashboard => }/fixtures/mockDashboardState.js | 0 .../dashboard => }/fixtures/mockSliceEntities.js | 2 +- .../dashboard => }/fixtures/mockState.js | 4 ++-- .../dashboard => }/fixtures/mockStore.js | 0 .../dashboard => }/helpers/WithDragDropContext.jsx | 0 .../spec/javascripts/CRUD/CollectionTable_spec.jsx | 2 +- .../dashboard/actions/dashboardState_spec.js | 6 +++--- .../dashboard/components/DashboardBuilder_spec.jsx | 6 +++--- .../dashboard/components/Dashboard_spec.jsx | 12 ++++++------ .../dashboard/components/FiltersBadge_spec.tsx | 8 ++++---- .../dashboard/components/PropertiesModal_spec.jsx | 2 +- .../dashboard/components/SliceAdder_spec.jsx | 2 +- .../components/gridComponents/ChartHolder_spec.jsx | 8 ++++---- .../components/gridComponents/Chart_spec.jsx | 6 +++--- .../components/gridComponents/Column_spec.jsx | 6 +++--- .../components/gridComponents/Divider_spec.jsx | 2 +- .../components/gridComponents/Header_spec.jsx | 4 ++-- .../components/gridComponents/Markdown_spec.jsx | 6 +++--- .../dashboard/components/gridComponents/Row_spec.jsx | 6 +++--- .../dashboard/components/gridComponents/Tab_spec.jsx | 6 +++--- .../components/gridComponents/Tabs_spec.jsx | 6 +++--- .../new/DraggableNewComponent_spec.jsx | 2 +- .../dashboard/reducers/dashboardFilters_spec.js | 6 +++--- .../util/getLeafComponentIdFromPath_spec.js | 4 ++-- .../util/updateComponentParentsList_spec.js | 2 +- .../datasource/ChangeDatasourceModal_spec.jsx | 2 +- .../javascripts/datasource/DatasourceEditor_spec.jsx | 2 +- .../javascripts/datasource/DatasourceModal_spec.jsx | 2 +- .../explore/components/FilterBoxItemControl_spec.jsx | 2 +- 34 files changed, 59 insertions(+), 59 deletions(-) rename superset-frontend/spec/{javascripts/dashboard => }/fixtures/mockChartQueries.js (97%) rename superset-frontend/spec/{javascripts/dashboard => }/fixtures/mockDashboardData.js (100%) rename superset-frontend/spec/{javascripts/dashboard => }/fixtures/mockDashboardFilters.js (100%) rename superset-frontend/spec/{javascripts/dashboard => }/fixtures/mockDashboardInfo.js (100%) rename superset-frontend/spec/{javascripts/dashboard => }/fixtures/mockDashboardLayout.js (100%) rename superset-frontend/spec/{javascripts/dashboard => }/fixtures/mockDashboardState.js (100%) rename superset-frontend/spec/{javascripts/dashboard => }/fixtures/mockSliceEntities.js (98%) rename superset-frontend/spec/{javascripts/dashboard => }/fixtures/mockState.js (90%) rename superset-frontend/spec/{javascripts/dashboard => }/fixtures/mockStore.js (100%) rename superset-frontend/spec/{javascripts/dashboard => }/helpers/WithDragDropContext.jsx (100%) diff --git a/superset-frontend/spec/javascripts/dashboard/fixtures/mockChartQueries.js b/superset-frontend/spec/fixtures/mockChartQueries.js similarity index 97% rename from superset-frontend/spec/javascripts/dashboard/fixtures/mockChartQueries.js rename to superset-frontend/spec/fixtures/mockChartQueries.js index acb2762fa..a16354c93 100644 --- a/superset-frontend/spec/javascripts/dashboard/fixtures/mockChartQueries.js +++ b/superset-frontend/spec/fixtures/mockChartQueries.js @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { datasourceId } from '../../../fixtures/mockDatasource'; +import { datasourceId } from './mockDatasource'; export const sliceId = 18; diff --git a/superset-frontend/spec/javascripts/dashboard/fixtures/mockDashboardData.js b/superset-frontend/spec/fixtures/mockDashboardData.js similarity index 100% rename from superset-frontend/spec/javascripts/dashboard/fixtures/mockDashboardData.js rename to superset-frontend/spec/fixtures/mockDashboardData.js diff --git a/superset-frontend/spec/javascripts/dashboard/fixtures/mockDashboardFilters.js b/superset-frontend/spec/fixtures/mockDashboardFilters.js similarity index 100% rename from superset-frontend/spec/javascripts/dashboard/fixtures/mockDashboardFilters.js rename to superset-frontend/spec/fixtures/mockDashboardFilters.js diff --git a/superset-frontend/spec/javascripts/dashboard/fixtures/mockDashboardInfo.js b/superset-frontend/spec/fixtures/mockDashboardInfo.js similarity index 100% rename from superset-frontend/spec/javascripts/dashboard/fixtures/mockDashboardInfo.js rename to superset-frontend/spec/fixtures/mockDashboardInfo.js diff --git a/superset-frontend/spec/javascripts/dashboard/fixtures/mockDashboardLayout.js b/superset-frontend/spec/fixtures/mockDashboardLayout.js similarity index 100% rename from superset-frontend/spec/javascripts/dashboard/fixtures/mockDashboardLayout.js rename to superset-frontend/spec/fixtures/mockDashboardLayout.js diff --git a/superset-frontend/spec/javascripts/dashboard/fixtures/mockDashboardState.js b/superset-frontend/spec/fixtures/mockDashboardState.js similarity index 100% rename from superset-frontend/spec/javascripts/dashboard/fixtures/mockDashboardState.js rename to superset-frontend/spec/fixtures/mockDashboardState.js diff --git a/superset-frontend/spec/javascripts/dashboard/fixtures/mockSliceEntities.js b/superset-frontend/spec/fixtures/mockSliceEntities.js similarity index 98% rename from superset-frontend/spec/javascripts/dashboard/fixtures/mockSliceEntities.js rename to superset-frontend/spec/fixtures/mockSliceEntities.js index 9f33c2963..600c84015 100644 --- a/superset-frontend/spec/javascripts/dashboard/fixtures/mockSliceEntities.js +++ b/superset-frontend/spec/fixtures/mockSliceEntities.js @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { datasourceId } from '../../../fixtures/mockDatasource'; +import { datasourceId } from 'spec/fixtures/mockDatasource'; import { sliceId } from './mockChartQueries'; export const filterId = 127; diff --git a/superset-frontend/spec/javascripts/dashboard/fixtures/mockState.js b/superset-frontend/spec/fixtures/mockState.js similarity index 90% rename from superset-frontend/spec/javascripts/dashboard/fixtures/mockState.js rename to superset-frontend/spec/fixtures/mockState.js index 35eeb8be8..471d57894 100644 --- a/superset-frontend/spec/javascripts/dashboard/fixtures/mockState.js +++ b/superset-frontend/spec/fixtures/mockState.js @@ -16,13 +16,13 @@ * specific language governing permissions and limitations * under the License. */ +import datasources from 'spec/fixtures/mockDatasource'; +import messageToasts from 'spec/javascripts/messageToasts/mockMessageToasts'; import chartQueries from './mockChartQueries'; import { dashboardLayout } from './mockDashboardLayout'; import dashboardInfo from './mockDashboardInfo'; import { emptyFilters } from './mockDashboardFilters'; import dashboardState from './mockDashboardState'; -import messageToasts from '../../messageToasts/mockMessageToasts'; -import datasources from '../../../fixtures/mockDatasource'; import sliceEntities from './mockSliceEntities'; export default { diff --git a/superset-frontend/spec/javascripts/dashboard/fixtures/mockStore.js b/superset-frontend/spec/fixtures/mockStore.js similarity index 100% rename from superset-frontend/spec/javascripts/dashboard/fixtures/mockStore.js rename to superset-frontend/spec/fixtures/mockStore.js diff --git a/superset-frontend/spec/javascripts/dashboard/helpers/WithDragDropContext.jsx b/superset-frontend/spec/helpers/WithDragDropContext.jsx similarity index 100% rename from superset-frontend/spec/javascripts/dashboard/helpers/WithDragDropContext.jsx rename to superset-frontend/spec/helpers/WithDragDropContext.jsx diff --git a/superset-frontend/spec/javascripts/CRUD/CollectionTable_spec.jsx b/superset-frontend/spec/javascripts/CRUD/CollectionTable_spec.jsx index cdb695bf4..3500a81ec 100644 --- a/superset-frontend/spec/javascripts/CRUD/CollectionTable_spec.jsx +++ b/superset-frontend/spec/javascripts/CRUD/CollectionTable_spec.jsx @@ -20,7 +20,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import CollectionTable from 'src/CRUD/CollectionTable'; -import mockDatasource from '../../fixtures/mockDatasource'; +import mockDatasource from 'spec/fixtures/mockDatasource'; const props = { collection: mockDatasource['7__table'].columns, diff --git a/superset-frontend/spec/javascripts/dashboard/actions/dashboardState_spec.js b/superset-frontend/spec/javascripts/dashboard/actions/dashboardState_spec.js index c2ea3d183..00349fbfe 100644 --- a/superset-frontend/spec/javascripts/dashboard/actions/dashboardState_spec.js +++ b/superset-frontend/spec/javascripts/dashboard/actions/dashboardState_spec.js @@ -29,9 +29,9 @@ import { DASHBOARD_GRID_ID } from 'src/dashboard/util/constants'; import { filterId, sliceEntitiesForDashboard as sliceEntities, -} from '../fixtures/mockSliceEntities'; -import { emptyFilters } from '../fixtures/mockDashboardFilters'; -import mockDashboardData from '../fixtures/mockDashboardData'; +} from 'spec/fixtures/mockSliceEntities'; +import { emptyFilters } from 'spec/fixtures/mockDashboardFilters'; +import mockDashboardData from 'spec/fixtures/mockDashboardData'; describe('dashboardState actions', () => { const mockState = { diff --git a/superset-frontend/spec/javascripts/dashboard/components/DashboardBuilder_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/DashboardBuilder_spec.jsx index b6cd7b9a3..2fb9804cf 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/DashboardBuilder_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/DashboardBuilder_spec.jsx @@ -33,13 +33,13 @@ import DashboardHeader from 'src/dashboard/containers/DashboardHeader'; import DashboardGrid from 'src/dashboard/containers/DashboardGrid'; import * as dashboardStateActions from 'src/dashboard/actions/dashboardState'; -import WithDragDropContext from '../helpers/WithDragDropContext'; import { dashboardLayout as undoableDashboardLayout, dashboardLayoutWithTabs as undoableDashboardLayoutWithTabs, -} from '../fixtures/mockDashboardLayout'; +} from 'spec/fixtures/mockDashboardLayout'; -import { mockStore, mockStoreWithTabs } from '../fixtures/mockStore'; +import { mockStore, mockStoreWithTabs } from 'spec/fixtures/mockStore'; +import WithDragDropContext from 'spec/helpers/WithDragDropContext'; const dashboardLayout = undoableDashboardLayout.present; const layoutWithTabs = undoableDashboardLayoutWithTabs.present; diff --git a/superset-frontend/spec/javascripts/dashboard/components/Dashboard_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/Dashboard_spec.jsx index d3d6fe4aa..87f6c5120 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/Dashboard_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/Dashboard_spec.jsx @@ -26,12 +26,12 @@ import { CHART_TYPE } from 'src/dashboard/util/componentTypes'; import newComponentFactory from 'src/dashboard/util/newComponentFactory'; // mock data -import chartQueries from '../fixtures/mockChartQueries'; -import datasources from '../../../fixtures/mockDatasource'; -import dashboardInfo from '../fixtures/mockDashboardInfo'; -import { dashboardLayout } from '../fixtures/mockDashboardLayout'; -import dashboardState from '../fixtures/mockDashboardState'; -import { sliceEntitiesForChart as sliceEntities } from '../fixtures/mockSliceEntities'; +import chartQueries from 'spec/fixtures/mockChartQueries'; +import datasources from 'spec/fixtures/mockDatasource'; +import dashboardInfo from 'spec/fixtures/mockDashboardInfo'; +import { dashboardLayout } from 'spec/fixtures/mockDashboardLayout'; +import dashboardState from 'spec/fixtures/mockDashboardState'; +import { sliceEntitiesForChart as sliceEntities } from 'spec/fixtures/mockSliceEntities'; describe('Dashboard', () => { const props = { diff --git a/superset-frontend/spec/javascripts/dashboard/components/FiltersBadge_spec.tsx b/superset-frontend/spec/javascripts/dashboard/components/FiltersBadge_spec.tsx index 9876b1263..ea8992794 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/FiltersBadge_spec.tsx +++ b/superset-frontend/spec/javascripts/dashboard/components/FiltersBadge_spec.tsx @@ -23,10 +23,10 @@ import * as SupersetUI from '@superset-ui/core'; import { CHART_UPDATE_SUCCEEDED } from 'src/chart/chartAction'; import { buildActiveFilters } from 'src/dashboard/util/activeDashboardFilters'; import FiltersBadge from 'src/dashboard/containers/FiltersBadge'; -import { getMockStoreWithFilters } from '../fixtures/mockStore'; -import { sliceId } from '../fixtures/mockChartQueries'; -import { dashboardFilters } from '../fixtures/mockDashboardFilters'; -import { dashboardWithFilter } from '../fixtures/mockDashboardLayout'; +import { getMockStoreWithFilters } from 'spec/fixtures/mockStore'; +import { sliceId } from 'spec/fixtures/mockChartQueries'; +import { dashboardFilters } from 'spec/fixtures/mockDashboardFilters'; +import { dashboardWithFilter } from 'spec/fixtures/mockDashboardLayout'; describe('FiltersBadge', () => { // there's this bizarre "active filters" thing diff --git a/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx index 1a54c2307..f30420b19 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx @@ -28,7 +28,7 @@ import { import Modal from 'src/common/components/Modal'; import PropertiesModal from 'src/dashboard/components/PropertiesModal'; -import { mockStore } from '../fixtures/mockStore'; +import { mockStore } from 'spec/fixtures/mockStore'; const dashboardResult = { json: { diff --git a/superset-frontend/spec/javascripts/dashboard/components/SliceAdder_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/SliceAdder_spec.jsx index c43e0d806..6078314bb 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/SliceAdder_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/SliceAdder_spec.jsx @@ -23,7 +23,7 @@ import sinon from 'sinon'; import { List } from 'react-virtualized'; import SliceAdder from 'src/dashboard/components/SliceAdder'; -import { sliceEntitiesForDashboard as mockSliceEntities } from '../fixtures/mockSliceEntities'; +import { sliceEntitiesForDashboard as mockSliceEntities } from 'spec/fixtures/mockSliceEntities'; describe('SliceAdder', () => { const mockEvent = { diff --git a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/ChartHolder_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/ChartHolder_spec.jsx index dcb0e8096..7d8e8841b 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/ChartHolder_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/ChartHolder_spec.jsx @@ -29,10 +29,10 @@ import DragDroppable from 'src/dashboard/components/dnd/DragDroppable'; import HoverMenu from 'src/dashboard/components/menu/HoverMenu'; import ResizableContainer from 'src/dashboard/components/resizable/ResizableContainer'; -import { mockStore } from '../../fixtures/mockStore'; -import { sliceId } from '../../fixtures/mockChartQueries'; -import { dashboardLayout as mockLayout } from '../../fixtures/mockDashboardLayout'; -import WithDragDropContext from '../../helpers/WithDragDropContext'; +import { mockStore } from 'spec/fixtures/mockStore'; +import { sliceId } from 'spec/fixtures/mockChartQueries'; +import { dashboardLayout as mockLayout } from 'spec/fixtures/mockDashboardLayout'; +import WithDragDropContext from 'spec/helpers/WithDragDropContext'; describe('ChartHolder', () => { const props = { diff --git a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Chart_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Chart_spec.jsx index 198e2d626..52dc41c2e 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Chart_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Chart_spec.jsx @@ -24,11 +24,11 @@ import Chart from 'src/dashboard/components/gridComponents/Chart'; import SliceHeader from 'src/dashboard/components/SliceHeader'; import ChartContainer from 'src/chart/ChartContainer'; -import mockDatasource from '../../../../fixtures/mockDatasource'; -import { sliceEntitiesForChart as sliceEntities } from '../../fixtures/mockSliceEntities'; +import { sliceEntitiesForChart as sliceEntities } from 'spec/fixtures/mockSliceEntities'; +import mockDatasource from 'spec/fixtures/mockDatasource'; import chartQueries, { sliceId as queryId, -} from '../../fixtures/mockChartQueries'; +} from 'spec/fixtures/mockChartQueries'; describe('Chart', () => { const props = { diff --git a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Column_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Column_spec.jsx index b48d76c04..5000d2c98 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Column_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Column_spec.jsx @@ -32,9 +32,9 @@ import IconButton from 'src/dashboard/components/IconButton'; import ResizableContainer from 'src/dashboard/components/resizable/ResizableContainer'; import WithPopoverMenu from 'src/dashboard/components/menu/WithPopoverMenu'; -import { mockStore } from '../../fixtures/mockStore'; -import { dashboardLayout as mockLayout } from '../../fixtures/mockDashboardLayout'; -import WithDragDropContext from '../../helpers/WithDragDropContext'; +import WithDragDropContext from 'spec/helpers/WithDragDropContext'; +import { mockStore } from 'spec/fixtures/mockStore'; +import { dashboardLayout as mockLayout } from 'spec/fixtures/mockDashboardLayout'; describe('Column', () => { const columnWithoutChildren = { diff --git a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Divider_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Divider_spec.jsx index 8a52a6675..876d22cdd 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Divider_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Divider_spec.jsx @@ -30,7 +30,7 @@ import { DASHBOARD_GRID_TYPE, } from 'src/dashboard/util/componentTypes'; -import WithDragDropContext from '../../helpers/WithDragDropContext'; +import WithDragDropContext from 'spec/helpers/WithDragDropContext'; describe('Divider', () => { const props = { diff --git a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Header_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Header_spec.jsx index 3e057d197..0266d08a9 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Header_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Header_spec.jsx @@ -33,8 +33,8 @@ import { DASHBOARD_GRID_TYPE, } from 'src/dashboard/util/componentTypes'; -import WithDragDropContext from '../../helpers/WithDragDropContext'; -import { mockStoreWithTabs } from '../../fixtures/mockStore'; +import WithDragDropContext from 'spec/helpers/WithDragDropContext'; +import { mockStoreWithTabs } from 'spec/fixtures/mockStore'; describe('Header', () => { const props = { diff --git a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Markdown_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Markdown_spec.jsx index 343bcf940..04d5ad675 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Markdown_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Markdown_spec.jsx @@ -30,9 +30,9 @@ import DragDroppable from 'src/dashboard/components/dnd/DragDroppable'; import WithPopoverMenu from 'src/dashboard/components/menu/WithPopoverMenu'; import ResizableContainer from 'src/dashboard/components/resizable/ResizableContainer'; -import { mockStore } from '../../fixtures/mockStore'; -import { dashboardLayout as mockLayout } from '../../fixtures/mockDashboardLayout'; -import WithDragDropContext from '../../helpers/WithDragDropContext'; +import WithDragDropContext from 'spec/helpers/WithDragDropContext'; +import { mockStore } from 'spec/fixtures/mockStore'; +import { dashboardLayout as mockLayout } from 'spec/fixtures/mockDashboardLayout'; describe('Markdown', () => { const props = { diff --git a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Row_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Row_spec.jsx index bf10832e1..f6cd5302d 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Row_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Row_spec.jsx @@ -32,9 +32,9 @@ import WithPopoverMenu from 'src/dashboard/components/menu/WithPopoverMenu'; import { DASHBOARD_GRID_ID } from 'src/dashboard/util/constants'; import { supersetTheme, ThemeProvider } from '@superset-ui/core'; -import { mockStore } from '../../fixtures/mockStore'; -import { dashboardLayout as mockLayout } from '../../fixtures/mockDashboardLayout'; -import WithDragDropContext from '../../helpers/WithDragDropContext'; +import WithDragDropContext from 'spec/helpers/WithDragDropContext'; +import { mockStore } from 'spec/fixtures/mockStore'; +import { dashboardLayout as mockLayout } from 'spec/fixtures/mockDashboardLayout'; describe('Row', () => { const rowWithoutChildren = { ...mockLayout.present.ROW_ID, children: [] }; diff --git a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Tab_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Tab_spec.jsx index 689de4466..f2289f274 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Tab_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Tab_spec.jsx @@ -28,9 +28,9 @@ import Tab, { RENDER_TAB, RENDER_TAB_CONTENT, } from 'src/dashboard/components/gridComponents/Tab'; -import WithDragDropContext from '../../helpers/WithDragDropContext'; -import { dashboardLayoutWithTabs } from '../../fixtures/mockDashboardLayout'; -import { mockStoreWithTabs } from '../../fixtures/mockStore'; +import WithDragDropContext from 'spec/helpers/WithDragDropContext'; +import { dashboardLayoutWithTabs } from 'spec/fixtures/mockDashboardLayout'; +import { mockStoreWithTabs } from 'spec/fixtures/mockStore'; describe('Tabs', () => { const props = { diff --git a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Tabs_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Tabs_spec.jsx index 777837ccc..fcffea0af 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Tabs_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Tabs_spec.jsx @@ -30,9 +30,9 @@ import HoverMenu from 'src/dashboard/components/menu/HoverMenu'; import DragDroppable from 'src/dashboard/components/dnd/DragDroppable'; import Tabs from 'src/dashboard/components/gridComponents/Tabs'; import { DASHBOARD_ROOT_ID } from 'src/dashboard/util/constants'; -import WithDragDropContext from '../../helpers/WithDragDropContext'; -import { dashboardLayoutWithTabs } from '../../fixtures/mockDashboardLayout'; -import { mockStoreWithTabs } from '../../fixtures/mockStore'; +import WithDragDropContext from 'spec/helpers/WithDragDropContext'; +import { dashboardLayoutWithTabs } from 'spec/fixtures/mockDashboardLayout'; +import { mockStoreWithTabs } from 'spec/fixtures/mockStore'; describe('Tabs', () => { const props = { diff --git a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/new/DraggableNewComponent_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/new/DraggableNewComponent_spec.jsx index bc0e07cca..804a64b1a 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/new/DraggableNewComponent_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/new/DraggableNewComponent_spec.jsx @@ -26,7 +26,7 @@ import { NEW_COMPONENT_SOURCE_TYPE, CHART_TYPE, } from 'src/dashboard/util/componentTypes'; -import WithDragDropContext from '../../../helpers/WithDragDropContext'; +import WithDragDropContext from 'spec/helpers/WithDragDropContext'; describe('DraggableNewComponent', () => { const props = { diff --git a/superset-frontend/spec/javascripts/dashboard/reducers/dashboardFilters_spec.js b/superset-frontend/spec/javascripts/dashboard/reducers/dashboardFilters_spec.js index 60dfe97b0..19527d227 100644 --- a/superset-frontend/spec/javascripts/dashboard/reducers/dashboardFilters_spec.js +++ b/superset-frontend/spec/javascripts/dashboard/reducers/dashboardFilters_spec.js @@ -30,13 +30,13 @@ import * as activeDashboardFilters from 'src/dashboard/util/activeDashboardFilte import { emptyFilters, dashboardFilters, -} from '../fixtures/mockDashboardFilters'; +} from 'spec/fixtures/mockDashboardFilters'; import { sliceEntitiesForDashboard, filterId, column, -} from '../fixtures/mockSliceEntities'; -import { filterComponent } from '../fixtures/mockDashboardLayout'; +} from 'spec/fixtures/mockSliceEntities'; +import { filterComponent } from 'spec/fixtures/mockDashboardLayout'; describe('dashboardFilters reducer', () => { const { form_data } = sliceEntitiesForDashboard.slices[filterId]; diff --git a/superset-frontend/spec/javascripts/dashboard/util/getLeafComponentIdFromPath_spec.js b/superset-frontend/spec/javascripts/dashboard/util/getLeafComponentIdFromPath_spec.js index 95192f7c3..3d85d0ece 100644 --- a/superset-frontend/spec/javascripts/dashboard/util/getLeafComponentIdFromPath_spec.js +++ b/superset-frontend/spec/javascripts/dashboard/util/getLeafComponentIdFromPath_spec.js @@ -17,8 +17,8 @@ * under the License. */ import getLeafComponentIdFromPath from 'src/dashboard/util/getLeafComponentIdFromPath'; -import { filterId } from '../fixtures/mockSliceEntities'; -import { dashboardFilters } from '../fixtures/mockDashboardFilters'; +import { filterId } from 'spec/fixtures/mockSliceEntities'; +import { dashboardFilters } from 'spec/fixtures/mockDashboardFilters'; describe('getLeafComponentIdFromPath', () => { const path = dashboardFilters[filterId].directPathToFilter; diff --git a/superset-frontend/spec/javascripts/dashboard/util/updateComponentParentsList_spec.js b/superset-frontend/spec/javascripts/dashboard/util/updateComponentParentsList_spec.js index 83ece5988..c8f66b193 100644 --- a/superset-frontend/spec/javascripts/dashboard/util/updateComponentParentsList_spec.js +++ b/superset-frontend/spec/javascripts/dashboard/util/updateComponentParentsList_spec.js @@ -21,7 +21,7 @@ import { DASHBOARD_ROOT_ID } from 'src/dashboard/util/constants'; import { dashboardLayout, dashboardLayoutWithTabs, -} from '../fixtures/mockDashboardLayout'; +} from 'spec/fixtures/mockDashboardLayout'; describe('updateComponentParentsList', () => { const emptyLayout = { diff --git a/superset-frontend/spec/javascripts/datasource/ChangeDatasourceModal_spec.jsx b/superset-frontend/spec/javascripts/datasource/ChangeDatasourceModal_spec.jsx index 739ef5915..fed3b4bdb 100644 --- a/superset-frontend/spec/javascripts/datasource/ChangeDatasourceModal_spec.jsx +++ b/superset-frontend/spec/javascripts/datasource/ChangeDatasourceModal_spec.jsx @@ -27,7 +27,7 @@ import { act } from 'react-dom/test-utils'; import Modal from 'src/common/components/Modal'; import ChangeDatasourceModal from 'src/datasource/ChangeDatasourceModal'; import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint'; -import mockDatasource from '../../fixtures/mockDatasource'; +import mockDatasource from 'spec/fixtures/mockDatasource'; const mockStore = configureStore([thunk]); const store = mockStore({}); diff --git a/superset-frontend/spec/javascripts/datasource/DatasourceEditor_spec.jsx b/superset-frontend/spec/javascripts/datasource/DatasourceEditor_spec.jsx index 7fb2b2a01..0032c8d2e 100644 --- a/superset-frontend/spec/javascripts/datasource/DatasourceEditor_spec.jsx +++ b/superset-frontend/spec/javascripts/datasource/DatasourceEditor_spec.jsx @@ -25,7 +25,7 @@ import thunk from 'redux-thunk'; import Tabs from 'src/common/components/Tabs'; import DatasourceEditor from 'src/datasource/DatasourceEditor'; import Field from 'src/CRUD/Field'; -import mockDatasource from '../../fixtures/mockDatasource'; +import mockDatasource from 'spec/fixtures/mockDatasource'; const props = { datasource: mockDatasource['7__table'], diff --git a/superset-frontend/spec/javascripts/datasource/DatasourceModal_spec.jsx b/superset-frontend/spec/javascripts/datasource/DatasourceModal_spec.jsx index 484a85465..dc5e4879a 100644 --- a/superset-frontend/spec/javascripts/datasource/DatasourceModal_spec.jsx +++ b/superset-frontend/spec/javascripts/datasource/DatasourceModal_spec.jsx @@ -30,7 +30,7 @@ import Modal from 'src/common/components/Modal'; import DatasourceModal from 'src/datasource/DatasourceModal'; import DatasourceEditor from 'src/datasource/DatasourceEditor'; import * as featureFlags from 'src/featureFlags'; -import mockDatasource from '../../fixtures/mockDatasource'; +import mockDatasource from 'spec/fixtures/mockDatasource'; const mockStore = configureStore([thunk]); const store = mockStore({}); diff --git a/superset-frontend/spec/javascripts/explore/components/FilterBoxItemControl_spec.jsx b/superset-frontend/spec/javascripts/explore/components/FilterBoxItemControl_spec.jsx index 50e59276a..09727a6b8 100644 --- a/superset-frontend/spec/javascripts/explore/components/FilterBoxItemControl_spec.jsx +++ b/superset-frontend/spec/javascripts/explore/components/FilterBoxItemControl_spec.jsx @@ -24,7 +24,7 @@ import { shallow } from 'enzyme'; import Popover from 'src/common/components/Popover'; import FilterBoxItemControl from 'src/explore/components/controls/FilterBoxItemControl'; import FormRow from 'src/components/FormRow'; -import datasources from '../../../fixtures/mockDatasource'; +import datasources from 'spec/fixtures/mockDatasource'; const defaultProps = { label: 'some label',