mirror of
https://github.com/apache/superset.git
synced 2026-04-07 18:35:15 +00:00
Eslint error cleanup (#10657)
* moving two console errors to logger errors * nixing unused map index * nixing unused param * linting * changing an alert to a toast * fixing tests * lint fix * one letter change, just to see if iti gets CI to pass this test.
This commit is contained in:
@@ -20,12 +20,17 @@ import React from 'react';
|
||||
import { shallow, mount } from 'enzyme';
|
||||
import { OverlayTrigger } from 'react-bootstrap';
|
||||
import sinon from 'sinon';
|
||||
import { Provider } from 'react-redux';
|
||||
import configureStore from 'redux-mock-store';
|
||||
|
||||
import EmbedCodeButton from 'src/explore/components/EmbedCodeButton';
|
||||
import * as exploreUtils from 'src/explore/exploreUtils';
|
||||
import * as common from 'src/utils/common';
|
||||
|
||||
describe('EmbedCodeButton', () => {
|
||||
const mockStore = configureStore([]);
|
||||
const store = mockStore({});
|
||||
|
||||
const defaultProps = {
|
||||
latestQueryFormData: { datasource: '107__table' },
|
||||
};
|
||||
@@ -41,11 +46,16 @@ describe('EmbedCodeButton', () => {
|
||||
expect(wrapper.find(OverlayTrigger)).toExist();
|
||||
});
|
||||
|
||||
it('should create shorten, standalone, explore url', () => {
|
||||
it('should create a short, standalone, explore url', () => {
|
||||
const spy1 = sinon.spy(exploreUtils, 'getExploreLongUrl');
|
||||
const spy2 = sinon.spy(common, 'getShortUrl');
|
||||
|
||||
const wrapper = mount(<EmbedCodeButton {...defaultProps} />);
|
||||
const wrapper = mount(<EmbedCodeButton {...defaultProps} />, {
|
||||
wrappingComponent: Provider,
|
||||
wrappingComponentProps: {
|
||||
store,
|
||||
},
|
||||
});
|
||||
wrapper.setState({
|
||||
height: '1000',
|
||||
width: '2000',
|
||||
|
||||
Reference in New Issue
Block a user