mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
test(frontend): use absolute path for src imports (#9761)
* test(frontend): use absolute path for src imports * Upgrade prettier, fix eslint
This commit is contained in:
@@ -19,15 +19,14 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
|
||||
import DragDroppable from '../../../../../../src/dashboard/components/dnd/DragDroppable';
|
||||
import DraggableNewComponent from '../../../../../../src/dashboard/components/gridComponents/new/DraggableNewComponent';
|
||||
import WithDragDropContext from '../../../helpers/WithDragDropContext';
|
||||
|
||||
import { NEW_COMPONENTS_SOURCE_ID } from '../../../../../../src/dashboard/util/constants';
|
||||
import DragDroppable from 'src/dashboard/components/dnd/DragDroppable';
|
||||
import DraggableNewComponent from 'src/dashboard/components/gridComponents/new/DraggableNewComponent';
|
||||
import { NEW_COMPONENTS_SOURCE_ID } from 'src/dashboard/util/constants';
|
||||
import {
|
||||
NEW_COMPONENT_SOURCE_TYPE,
|
||||
CHART_TYPE,
|
||||
} from '../../../../../../src/dashboard/util/componentTypes';
|
||||
} from 'src/dashboard/util/componentTypes';
|
||||
import WithDragDropContext from '../../../helpers/WithDragDropContext';
|
||||
|
||||
describe('DraggableNewComponent', () => {
|
||||
const props = {
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import DraggableNewComponent from '../../../../../../src/dashboard/components/gridComponents/new/DraggableNewComponent';
|
||||
import NewColumn from '../../../../../../src/dashboard/components/gridComponents/new/NewColumn';
|
||||
import DraggableNewComponent from 'src/dashboard/components/gridComponents/new/DraggableNewComponent';
|
||||
import NewColumn from 'src/dashboard/components/gridComponents/new/NewColumn';
|
||||
|
||||
import { NEW_COLUMN_ID } from '../../../../../../src/dashboard/util/constants';
|
||||
import { COLUMN_TYPE } from '../../../../../../src/dashboard/util/componentTypes';
|
||||
import { NEW_COLUMN_ID } from 'src/dashboard/util/constants';
|
||||
import { COLUMN_TYPE } from 'src/dashboard/util/componentTypes';
|
||||
|
||||
describe('NewColumn', () => {
|
||||
function setup() {
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import DraggableNewComponent from '../../../../../../src/dashboard/components/gridComponents/new/DraggableNewComponent';
|
||||
import NewDivider from '../../../../../../src/dashboard/components/gridComponents/new/NewDivider';
|
||||
import DraggableNewComponent from 'src/dashboard/components/gridComponents/new/DraggableNewComponent';
|
||||
import NewDivider from 'src/dashboard/components/gridComponents/new/NewDivider';
|
||||
|
||||
import { NEW_DIVIDER_ID } from '../../../../../../src/dashboard/util/constants';
|
||||
import { DIVIDER_TYPE } from '../../../../../../src/dashboard/util/componentTypes';
|
||||
import { NEW_DIVIDER_ID } from 'src/dashboard/util/constants';
|
||||
import { DIVIDER_TYPE } from 'src/dashboard/util/componentTypes';
|
||||
|
||||
describe('NewDivider', () => {
|
||||
function setup() {
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import DraggableNewComponent from '../../../../../../src/dashboard/components/gridComponents/new/DraggableNewComponent';
|
||||
import NewHeader from '../../../../../../src/dashboard/components/gridComponents/new/NewHeader';
|
||||
import DraggableNewComponent from 'src/dashboard/components/gridComponents/new/DraggableNewComponent';
|
||||
import NewHeader from 'src/dashboard/components/gridComponents/new/NewHeader';
|
||||
|
||||
import { NEW_HEADER_ID } from '../../../../../../src/dashboard/util/constants';
|
||||
import { HEADER_TYPE } from '../../../../../../src/dashboard/util/componentTypes';
|
||||
import { NEW_HEADER_ID } from 'src/dashboard/util/constants';
|
||||
import { HEADER_TYPE } from 'src/dashboard/util/componentTypes';
|
||||
|
||||
describe('NewHeader', () => {
|
||||
function setup() {
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import DraggableNewComponent from '../../../../../../src/dashboard/components/gridComponents/new/DraggableNewComponent';
|
||||
import NewRow from '../../../../../../src/dashboard/components/gridComponents/new/NewRow';
|
||||
import DraggableNewComponent from 'src/dashboard/components/gridComponents/new/DraggableNewComponent';
|
||||
import NewRow from 'src/dashboard/components/gridComponents/new/NewRow';
|
||||
|
||||
import { NEW_ROW_ID } from '../../../../../../src/dashboard/util/constants';
|
||||
import { ROW_TYPE } from '../../../../../../src/dashboard/util/componentTypes';
|
||||
import { NEW_ROW_ID } from 'src/dashboard/util/constants';
|
||||
import { ROW_TYPE } from 'src/dashboard/util/componentTypes';
|
||||
|
||||
describe('NewRow', () => {
|
||||
function setup() {
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import DraggableNewComponent from '../../../../../../src/dashboard/components/gridComponents/new/DraggableNewComponent';
|
||||
import NewTabs from '../../../../../../src/dashboard/components/gridComponents/new/NewTabs';
|
||||
import DraggableNewComponent from 'src/dashboard/components/gridComponents/new/DraggableNewComponent';
|
||||
import NewTabs from 'src/dashboard/components/gridComponents/new/NewTabs';
|
||||
|
||||
import { NEW_TABS_ID } from '../../../../../../src/dashboard/util/constants';
|
||||
import { TABS_TYPE } from '../../../../../../src/dashboard/util/componentTypes';
|
||||
import { NEW_TABS_ID } from 'src/dashboard/util/constants';
|
||||
import { TABS_TYPE } from 'src/dashboard/util/componentTypes';
|
||||
|
||||
describe('NewTabs', () => {
|
||||
function setup() {
|
||||
|
||||
Reference in New Issue
Block a user