mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Bumping the JS libs to fix the build (#2616)
* bumping the js libs * New linting rules * More linting * More * Done linting * npm >=4.5.0 * Bumping node * Tweaking the build * Fixing the damn build * Fixing the apps
This commit is contained in:
committed by
GitHub
parent
a2b30f35fc
commit
366ecefbaa
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import AlertsWrapper from '../../../javascripts/components/AlertsWrapper';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import AlertsWrapper from '../../../javascripts/components/AlertsWrapper';
|
||||
|
||||
describe('AlertsWrapper', () => {
|
||||
it('is valid', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import App from '../../../javascripts/SqlLab/components/App';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import App from '../../../javascripts/SqlLab/components/App';
|
||||
|
||||
describe('App', () => {
|
||||
it('is valid', () => {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import React from 'react';
|
||||
import ColumnElement from '../../../javascripts/SqlLab/components/ColumnElement';
|
||||
import { mockedActions, table } from './fixtures';
|
||||
import { mount } from 'enzyme';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import { mockedActions, table } from './fixtures';
|
||||
import ColumnElement from '../../../javascripts/SqlLab/components/ColumnElement';
|
||||
|
||||
|
||||
describe('ColumnElement', () => {
|
||||
const mockedProps = {
|
||||
@@ -13,7 +14,7 @@ describe('ColumnElement', () => {
|
||||
};
|
||||
it('is valid with props', () => {
|
||||
expect(
|
||||
React.isValidElement(<ColumnElement {...mockedProps} />)
|
||||
React.isValidElement(<ColumnElement {...mockedProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
it('renders a proper primary key', () => {
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
import React from 'react';
|
||||
import CopyQueryTabUrl from '../../../javascripts/SqlLab/components/CopyQueryTabUrl';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
import { initialState } from './fixtures';
|
||||
|
||||
import CopyQueryTabUrl from '../../../javascripts/SqlLab/components/CopyQueryTabUrl';
|
||||
|
||||
describe('CopyQueryTabUrl', () => {
|
||||
const mockedProps = {
|
||||
queryEditor: initialState.queryEditors[0],
|
||||
};
|
||||
it('is valid with props', () => {
|
||||
expect(
|
||||
React.isValidElement(<CopyQueryTabUrl {...mockedProps} />)
|
||||
React.isValidElement(<CopyQueryTabUrl {...mockedProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import React from 'react';
|
||||
import HighlightedSql from '../../../javascripts/SqlLab/components/HighlightedSql';
|
||||
import ModalTrigger from '../../../javascripts/components/ModalTrigger';
|
||||
import SyntaxHighlighter from 'react-syntax-highlighter';
|
||||
import { mount, shallow } from 'enzyme';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import HighlightedSql from '../../../javascripts/SqlLab/components/HighlightedSql';
|
||||
import ModalTrigger from '../../../javascripts/components/ModalTrigger';
|
||||
|
||||
|
||||
describe('HighlightedSql', () => {
|
||||
const sql = "SELECT * FROM test WHERE something='fkldasjfklajdslfkjadlskfjkldasjfkladsjfkdjsa'";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import Link from '../../../javascripts/SqlLab/components/Link';
|
||||
import { shallow } from 'enzyme';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import Link from '../../../javascripts/SqlLab/components/Link';
|
||||
|
||||
describe('Link', () => {
|
||||
const mockedProps = {
|
||||
@@ -15,7 +15,7 @@ describe('Link', () => {
|
||||
});
|
||||
it('renders with props', () => {
|
||||
expect(
|
||||
React.isValidElement(<Link {...mockedProps} >TEST</Link>)
|
||||
React.isValidElement(<Link {...mockedProps} >TEST</Link>),
|
||||
).to.equal(true);
|
||||
});
|
||||
it('renders an anchor tag', () => {
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
import React from 'react';
|
||||
import Select from 'react-select';
|
||||
import { Button } from 'react-bootstrap';
|
||||
import QuerySearch from '../../../javascripts/SqlLab/components/QuerySearch';
|
||||
import { shallow } from 'enzyme';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
import sinon from 'sinon';
|
||||
|
||||
import QuerySearch from '../../../javascripts/SqlLab/components/QuerySearch';
|
||||
|
||||
describe('QuerySearch', () => {
|
||||
const mockedProps = {
|
||||
actions: {},
|
||||
};
|
||||
it('is valid', () => {
|
||||
expect(
|
||||
React.isValidElement(<QuerySearch {...mockedProps} />)
|
||||
React.isValidElement(<QuerySearch {...mockedProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
const wrapper = shallow(<QuerySearch {...mockedProps} />);
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import React from 'react';
|
||||
import QueryTable from '../../../javascripts/SqlLab/components/QueryTable';
|
||||
import { queries } from './fixtures';
|
||||
import { mount } from 'enzyme';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import { queries } from './fixtures';
|
||||
import QueryTable from '../../../javascripts/SqlLab/components/QueryTable';
|
||||
|
||||
|
||||
describe('QueryTable', () => {
|
||||
const mockedProps = {
|
||||
@@ -15,7 +16,7 @@ describe('QueryTable', () => {
|
||||
});
|
||||
it('is valid with props', () => {
|
||||
expect(
|
||||
React.isValidElement(<QueryTable {...mockedProps} />)
|
||||
React.isValidElement(<QueryTable {...mockedProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
it('renders a proper table', () => {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import React from 'react';
|
||||
import ResultSet from '../../../javascripts/SqlLab/components/ResultSet';
|
||||
import { shallow } from 'enzyme';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
import { queries } from './fixtures';
|
||||
import { Table } from 'reactable';
|
||||
|
||||
import ResultSet from '../../../javascripts/SqlLab/components/ResultSet';
|
||||
import { queries } from './fixtures';
|
||||
|
||||
describe('ResultSet', () => {
|
||||
const mockedProps = {
|
||||
query: queries[0],
|
||||
@@ -15,7 +16,7 @@ describe('ResultSet', () => {
|
||||
});
|
||||
it('renders with props', () => {
|
||||
expect(
|
||||
React.isValidElement(<ResultSet />)
|
||||
React.isValidElement(<ResultSet />),
|
||||
).to.equal(true);
|
||||
});
|
||||
it('renders a Table', () => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React from 'react';
|
||||
import SaveQuery from '../../../javascripts/SqlLab/components/SaveQuery';
|
||||
import { Overlay, Popover, FormControl } from 'react-bootstrap';
|
||||
import { shallow, mount } from 'enzyme';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import SaveQuery from '../../../javascripts/SqlLab/components/SaveQuery';
|
||||
|
||||
describe('SavedQuery', () => {
|
||||
const mockedProps = {
|
||||
@@ -16,12 +16,12 @@ describe('SavedQuery', () => {
|
||||
};
|
||||
it('is valid', () => {
|
||||
expect(
|
||||
React.isValidElement(<SaveQuery />)
|
||||
React.isValidElement(<SaveQuery />),
|
||||
).to.equal(true);
|
||||
});
|
||||
it('is valid with props', () => {
|
||||
expect(
|
||||
React.isValidElement(<SaveQuery {...mockedProps} />)
|
||||
React.isValidElement(<SaveQuery {...mockedProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
it('has an Overlay and a Popover', () => {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import React from 'react';
|
||||
import SqlEditorLeftBar from '../../../javascripts/SqlLab/components/SqlEditorLeftBar';
|
||||
import TableElement from '../../../javascripts/SqlLab/components/TableElement';
|
||||
import { mount } from 'enzyme';
|
||||
import { table, defaultQueryEditor } from './fixtures';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import { table, defaultQueryEditor } from './fixtures';
|
||||
import SqlEditorLeftBar from '../../../javascripts/SqlLab/components/SqlEditorLeftBar';
|
||||
import TableElement from '../../../javascripts/SqlLab/components/TableElement';
|
||||
|
||||
|
||||
describe('SqlEditorLeftBar', () => {
|
||||
const mockedProps = {
|
||||
@@ -14,7 +15,7 @@ describe('SqlEditorLeftBar', () => {
|
||||
};
|
||||
it('is valid', () => {
|
||||
expect(
|
||||
React.isValidElement(<SqlEditorLeftBar {...mockedProps} />)
|
||||
React.isValidElement(<SqlEditorLeftBar {...mockedProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
it('renders a TableElement', () => {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import React from 'react';
|
||||
import SqlEditor from '../../../javascripts/SqlLab/components/SqlEditor';
|
||||
import SqlEditorLeftBar from '../../../javascripts/SqlLab/components/SqlEditorLeftBar';
|
||||
import { shallow } from 'enzyme';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import { initialState, queries, table } from './fixtures';
|
||||
import SqlEditor from '../../../javascripts/SqlLab/components/SqlEditor';
|
||||
import SqlEditorLeftBar from '../../../javascripts/SqlLab/components/SqlEditorLeftBar';
|
||||
|
||||
describe('SqlEditor', () => {
|
||||
const mockedProps = {
|
||||
@@ -17,7 +18,7 @@ describe('SqlEditor', () => {
|
||||
};
|
||||
it('is valid', () => {
|
||||
expect(
|
||||
React.isValidElement(<SqlEditor {...mockedProps} />)
|
||||
React.isValidElement(<SqlEditor {...mockedProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
it('render a SqlEditorLeftBar', () => {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import React from 'react';
|
||||
import { TabbedSqlEditors } from '../../../javascripts/SqlLab/components/TabbedSqlEditors';
|
||||
import { Tab } from 'react-bootstrap';
|
||||
import { shallow } from 'enzyme';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import { initialState } from './fixtures';
|
||||
import { TabbedSqlEditors } from '../../../javascripts/SqlLab/components/TabbedSqlEditors';
|
||||
|
||||
describe('TabbedSqlEditors', () => {
|
||||
const mockedProps = {
|
||||
@@ -17,7 +18,7 @@ describe('TabbedSqlEditors', () => {
|
||||
};
|
||||
it('is valid', () => {
|
||||
expect(
|
||||
React.isValidElement(<TabbedSqlEditors {...mockedProps} />)
|
||||
React.isValidElement(<TabbedSqlEditors {...mockedProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
it('shallow mounts', () => {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import React from 'react';
|
||||
import Link from '../../../javascripts/SqlLab/components/Link';
|
||||
import TableElement from '../../../javascripts/SqlLab/components/TableElement';
|
||||
import ColumnElement from '../../../javascripts/SqlLab/components/ColumnElement';
|
||||
import { mockedActions, table } from './fixtures';
|
||||
import { mount, shallow } from 'enzyme';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import Link from '../../../javascripts/SqlLab/components/Link';
|
||||
import TableElement from '../../../javascripts/SqlLab/components/TableElement';
|
||||
import ColumnElement from '../../../javascripts/SqlLab/components/ColumnElement';
|
||||
import { mockedActions, table } from './fixtures';
|
||||
|
||||
describe('TableElement', () => {
|
||||
const mockedProps = {
|
||||
@@ -16,12 +16,12 @@ describe('TableElement', () => {
|
||||
};
|
||||
it('renders', () => {
|
||||
expect(
|
||||
React.isValidElement(<TableElement />)
|
||||
React.isValidElement(<TableElement />),
|
||||
).to.equal(true);
|
||||
});
|
||||
it('renders with props', () => {
|
||||
expect(
|
||||
React.isValidElement(<TableElement {...mockedProps} />)
|
||||
React.isValidElement(<TableElement {...mockedProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
it('has 2 Link elements', () => {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import React from 'react';
|
||||
import Timer from '../../../javascripts/components/Timer';
|
||||
import { shallow } from 'enzyme';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import Timer from '../../../javascripts/components/Timer';
|
||||
import { now } from '../../../javascripts/modules/dates';
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React from 'react';
|
||||
import VisualizeModal from '../../../javascripts/SqlLab/components/VisualizeModal';
|
||||
import { queries } from './fixtures';
|
||||
import { Modal } from 'react-bootstrap';
|
||||
import { shallow } from 'enzyme';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import { queries } from './fixtures';
|
||||
import VisualizeModal from '../../../javascripts/SqlLab/components/VisualizeModal';
|
||||
|
||||
describe('VisualizeModal', () => {
|
||||
const mockedProps = {
|
||||
@@ -17,7 +17,7 @@ describe('VisualizeModal', () => {
|
||||
});
|
||||
it('renders with props', () => {
|
||||
expect(
|
||||
React.isValidElement(<VisualizeModal {...mockedProps} />)
|
||||
React.isValidElement(<VisualizeModal {...mockedProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
it('renders a Modal', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as actions from '../../../javascripts/SqlLab/actions';
|
||||
import sinon from 'sinon';
|
||||
import * as actions from '../../../javascripts/SqlLab/actions';
|
||||
|
||||
export const mockedActions = sinon.stub(Object.assign({}, actions));
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import * as r from '../../../javascripts/SqlLab/reducers';
|
||||
import * as actions from '../../../javascripts/SqlLab/actions';
|
||||
import { beforeEach, describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import * as r from '../../../javascripts/SqlLab/reducers';
|
||||
import * as actions from '../../../javascripts/SqlLab/actions';
|
||||
import { alert, table, initialState } from './fixtures';
|
||||
|
||||
describe('sqlLabReducer', () => {
|
||||
|
||||
Reference in New Issue
Block a user