Files
superset2/superset/assets/spec/javascripts/explore/components/ControlPanelsContainer_spec.jsx
Maxime Beauchemin c0db6dbb57 Moving some JS folders (#4820)
* Moving folders

* Pointing to new locations
2018-04-17 21:05:01 -07:00

32 lines
921 B
JavaScript

import React from 'react';
import { expect } from 'chai';
import { describe, it, beforeEach } from 'mocha';
import { shallow } from 'enzyme';
import { getFormDataFromControls, defaultControls }
from '../../../../src/explore/stores/store';
import {
ControlPanelsContainer,
} from '../../../../src/explore/components/ControlPanelsContainer';
import ControlPanelSection from '../../../../src/explore/components/ControlPanelSection';
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 ControlPanelSections', () => {
expect(wrapper.find(ControlPanelSection)).to.have.lengthOf(7);
});
});