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:
Jesse Yang
2020-05-07 14:18:10 -07:00
committed by GitHub
parent 6237cea952
commit 13c5b133a9
220 changed files with 827 additions and 1730 deletions

View File

@@ -19,15 +19,11 @@
import React from 'react';
import configureStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import { shallow } from 'enzyme';
import { STATUS_OPTIONS } from '../../../src/SqlLab/constants';
import SouthPaneContainer, { SouthPane } from 'src/SqlLab/components/SouthPane';
import ResultSet from 'src/SqlLab/components/ResultSet';
import { STATUS_OPTIONS } from 'src/SqlLab/constants';
import { initialState } from './fixtures';
import SouthPaneContainer, {
SouthPane,
} from '../../../src/SqlLab/components/SouthPane';
import ResultSet from '../../../src/SqlLab/components/ResultSet';
describe('SouthPane', () => {
const middlewares = [thunk];
@@ -94,12 +90,7 @@ describe('SouthPane', () => {
it('should render offline when the state is offline', () => {
wrapper = getWrapper();
wrapper.setProps({ offline: true });
expect(
wrapper
.find('.m-r-3')
.render()
.text(),
).toBe(STATUS_OPTIONS.offline);
expect(wrapper.find('.m-r-3').render().text()).toBe(STATUS_OPTIONS.offline);
});
it('should pass latest query down to ResultSet component', () => {
wrapper = getWrapper();