mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +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,9 +19,9 @@
|
||||
import React from 'react';
|
||||
import { Col, Row, Tab } from 'react-bootstrap';
|
||||
import { shallow } from 'enzyme';
|
||||
import App from 'src/profile/components/App';
|
||||
|
||||
import { user } from './fixtures';
|
||||
import App from '../../../src/profile/components/App';
|
||||
|
||||
describe('App', () => {
|
||||
const mockedProps = {
|
||||
|
||||
@@ -20,10 +20,10 @@ import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import thunk from 'redux-thunk';
|
||||
import configureStore from 'redux-mock-store';
|
||||
import CreatedContent from 'src/profile/components/CreatedContent';
|
||||
import TableLoader from 'src/components/TableLoader';
|
||||
|
||||
import { user } from './fixtures';
|
||||
import CreatedContent from '../../../src/profile/components/CreatedContent';
|
||||
import TableLoader from '../../../src/components/TableLoader';
|
||||
|
||||
// store needed for withToasts(TableLoader)
|
||||
const mockStore = configureStore([thunk]);
|
||||
|
||||
@@ -20,7 +20,7 @@ import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import sinon from 'sinon';
|
||||
|
||||
import EditableTable from '../../../src/components/EditableTitle';
|
||||
import EditableTable from 'src/components/EditableTitle';
|
||||
|
||||
describe('EditableTitle', () => {
|
||||
const callback = sinon.spy();
|
||||
|
||||
@@ -20,10 +20,10 @@ import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import thunk from 'redux-thunk';
|
||||
import configureStore from 'redux-mock-store';
|
||||
import Favorites from 'src/profile/components/Favorites';
|
||||
import TableLoader from 'src/components/TableLoader';
|
||||
|
||||
import { user } from './fixtures';
|
||||
import Favorites from '../../../src/profile/components/Favorites';
|
||||
import TableLoader from '../../../src/components/TableLoader';
|
||||
|
||||
// store needed for withToasts(TableLoader)
|
||||
const mockStore = configureStore([thunk]);
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import RecentActivity from 'src/profile/components/RecentActivity';
|
||||
import TableLoader from 'src/components/TableLoader';
|
||||
|
||||
import { user } from './fixtures';
|
||||
import RecentActivity from '../../../src/profile/components/RecentActivity';
|
||||
import TableLoader from '../../../src/components/TableLoader';
|
||||
|
||||
describe('RecentActivity', () => {
|
||||
const mockedProps = {
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import Security from 'src/profile/components/Security';
|
||||
|
||||
import { user, userNoPerms } from './fixtures';
|
||||
import Security from '../../../src/profile/components/Security';
|
||||
|
||||
describe('Security', () => {
|
||||
const mockedProps = {
|
||||
|
||||
@@ -20,9 +20,9 @@ import React from 'react';
|
||||
import Gravatar from 'react-gravatar';
|
||||
import { Panel } from 'react-bootstrap';
|
||||
import { mount } from 'enzyme';
|
||||
import UserInfo from 'src/profile/components/UserInfo';
|
||||
|
||||
import { user } from './fixtures';
|
||||
import UserInfo from '../../../src/profile/components/UserInfo';
|
||||
|
||||
describe('UserInfo', () => {
|
||||
const mockedProps = {
|
||||
|
||||
Reference in New Issue
Block a user