Files
superset2/superset/assets/spec/javascripts/sqllab/VisualizeModal_spec.jsx
Maxime Beauchemin 366ecefbaa 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
2017-04-13 15:04:09 -07:00

28 lines
796 B
JavaScript

import React from 'react';
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 = {
show: true,
query: queries[0],
};
it('renders', () => {
expect(React.isValidElement(<VisualizeModal />)).to.equal(true);
});
it('renders with props', () => {
expect(
React.isValidElement(<VisualizeModal {...mockedProps} />),
).to.equal(true);
});
it('renders a Modal', () => {
const wrapper = shallow(<VisualizeModal {...mockedProps} />);
expect(wrapper.find(Modal)).to.have.length(1);
});
});