Files
superset2/superset/assets/spec/javascripts/explorev2/components/ControlPanelsContainer_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

32 lines
865 B
JavaScript

import React from 'react';
import { expect } from 'chai';
import { describe, it, beforeEach } from 'mocha';
import { shallow } from 'enzyme';
import { Panel } from 'react-bootstrap';
import { getFormDataFromControls, defaultControls }
from '../../../../javascripts/explorev2/stores/store';
import {
ControlPanelsContainer,
} from '../../../../javascripts/explorev2/components/ControlPanelsContainer';
const defaultProps = {
datasource_type: 'table',
actions: {},
controls: defaultControls,
form_data: getFormDataFromControls(defaultControls),
isDatasourceMetaLoading: false,
exploreState: {},
};
describe('ControlPanelsContainer', () => {
let wrapper;
beforeEach(() => {
wrapper = shallow(<ControlPanelsContainer {...defaultProps} />);
});
it('renders a Panel', () => {
expect(wrapper.find(Panel)).to.have.lengthOf(1);
});
});