mirror of
https://github.com/apache/superset.git
synced 2026-04-22 01:24:43 +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
@@ -5,6 +5,7 @@ import sinon from 'sinon';
|
||||
import { expect } from 'chai';
|
||||
import { describe, it, beforeEach } from 'mocha';
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import CheckboxControl from '../../../../javascripts/explorev2/components/controls/CheckboxControl';
|
||||
|
||||
const defaultProps = {
|
||||
@@ -18,7 +18,7 @@ describe('ExploreActionButtons', () => {
|
||||
|
||||
it('renders', () => {
|
||||
expect(
|
||||
React.isValidElement(<ExploreActionButtons {...defaultProps} />)
|
||||
React.isValidElement(<ExploreActionButtons {...defaultProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ describe('FilterControl', () => {
|
||||
|
||||
it('renders Filters', () => {
|
||||
expect(
|
||||
React.isValidElement(<FilterControl {...defaultProps} />)
|
||||
React.isValidElement(<FilterControl {...defaultProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
|
||||
@@ -34,7 +34,7 @@ describe('Filter', () => {
|
||||
|
||||
it('renders Filters', () => {
|
||||
expect(
|
||||
React.isValidElement(<Filter {...defaultProps} />)
|
||||
React.isValidElement(<Filter {...defaultProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
|
||||
@@ -24,7 +24,7 @@ describe('RunQueryActionButton', () => {
|
||||
|
||||
it('is a valid react element', () => {
|
||||
expect(
|
||||
React.isValidElement(<RunQueryActionButton {...defaultProps} />)
|
||||
React.isValidElement(<RunQueryActionButton {...defaultProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
|
||||
@@ -2,11 +2,12 @@ import React from 'react';
|
||||
import { expect } from 'chai';
|
||||
import { describe, it, beforeEach } from 'mocha';
|
||||
import { shallow } from 'enzyme';
|
||||
import { defaultFormData } from '../../../../javascripts/explorev2/stores/store';
|
||||
import { SaveModal } from '../../../../javascripts/explorev2/components/SaveModal';
|
||||
import { Modal, Button, Radio } from 'react-bootstrap';
|
||||
import sinon from 'sinon';
|
||||
|
||||
import { defaultFormData } from '../../../../javascripts/explorev2/stores/store';
|
||||
import { SaveModal } from '../../../../javascripts/explorev2/components/SaveModal';
|
||||
|
||||
const defaultProps = {
|
||||
can_edit: true,
|
||||
onHide: () => ({}),
|
||||
@@ -1,7 +1,7 @@
|
||||
import { it, describe } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
import URI from 'urijs';
|
||||
import { getExploreUrl } from '../../../javascripts/explorev2/exploreUtils.js';
|
||||
import { getExploreUrl } from '../../../javascripts/explorev2/exploreUtils';
|
||||
|
||||
describe('utils', () => {
|
||||
const formData = {
|
||||
@@ -19,41 +19,41 @@ describe('utils', () => {
|
||||
|
||||
compareURI(
|
||||
URI(getExploreUrl(formData, 'base', false, 'http://superset.com')),
|
||||
URI('/superset/explore/table/1/').search({ form_data: sFormData })
|
||||
URI('/superset/explore/table/1/').search({ form_data: sFormData }),
|
||||
);
|
||||
});
|
||||
it('getExploreUrl generates proper json url', () => {
|
||||
compareURI(
|
||||
URI(getExploreUrl(formData, 'json', false, 'superset.com')),
|
||||
URI('/superset/explore_json/table/1/').search({ form_data: sFormData })
|
||||
URI('/superset/explore_json/table/1/').search({ form_data: sFormData }),
|
||||
);
|
||||
});
|
||||
it('getExploreUrl generates proper json forced url', () => {
|
||||
compareURI(
|
||||
URI(getExploreUrl(formData, 'json', true, 'superset.com')),
|
||||
URI('/superset/explore_json/table/1/')
|
||||
.search({ form_data: sFormData, force: 'true' })
|
||||
.search({ form_data: sFormData, force: 'true' }),
|
||||
);
|
||||
});
|
||||
it('getExploreUrl generates proper csv URL', () => {
|
||||
compareURI(
|
||||
URI(getExploreUrl(formData, 'csv', false, 'superset.com')),
|
||||
URI('/superset/explore_json/table/1/')
|
||||
.search({ form_data: sFormData, csv: 'true' })
|
||||
.search({ form_data: sFormData, csv: 'true' }),
|
||||
);
|
||||
});
|
||||
it('getExploreUrl generates proper standalone URL', () => {
|
||||
compareURI(
|
||||
URI(getExploreUrl(formData, 'standalone', false, 'superset.com')),
|
||||
URI('/superset/explore/table/1/')
|
||||
.search({ form_data: sFormData, standalone: 'true' })
|
||||
.search({ form_data: sFormData, standalone: 'true' }),
|
||||
);
|
||||
});
|
||||
it('getExploreUrl preserves main URLs params', () => {
|
||||
compareURI(
|
||||
URI(getExploreUrl(formData, 'json', false, 'superset.com?foo=bar')),
|
||||
URI('/superset/explore_json/table/1/')
|
||||
.search({ foo: 'bar', form_data: sFormData })
|
||||
.search({ foo: 'bar', form_data: sFormData }),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user