mirror of
https://github.com/apache/superset.git
synced 2026-04-09 19:35:21 +00:00
* [toasts] get rid of notify globals, refactor messageToasts for use by entire app * [remove notify] use arrow func in ajax call * fix lint + tests * actually fix tests from messageToast refactor * add 'test:one' npm script * debugger * [toasts] convert bootstrap flash messages to toasts in explore + sqllab * [toasts][tests] import from right file
28 lines
793 B
JavaScript
28 lines
793 B
JavaScript
import React from 'react';
|
|
import configureStore from 'redux-mock-store';
|
|
import { expect } from 'chai';
|
|
import { describe, it } from 'mocha';
|
|
import { shallow } from 'enzyme';
|
|
|
|
import { OverlayTrigger } from 'react-bootstrap';
|
|
import URLShortLinkButton from '../../../src/components/URLShortLinkButton';
|
|
|
|
describe('URLShortLinkButton', () => {
|
|
const defaultProps = {
|
|
url: 'mockURL',
|
|
emailSubject: 'Mock Subject',
|
|
emailContent: 'mock content',
|
|
};
|
|
|
|
function setup() {
|
|
const mockStore = configureStore([]);
|
|
const store = mockStore({});
|
|
return shallow(<URLShortLinkButton {...defaultProps} />, { context: { store } }).dive();
|
|
}
|
|
|
|
it('renders OverlayTrigger', () => {
|
|
const wrapper = setup();
|
|
expect(wrapper.find(OverlayTrigger)).have.length(1);
|
|
});
|
|
});
|