mirror of
https://github.com/apache/superset.git
synced 2026-04-09 03:16:07 +00:00
32 lines
914 B
JavaScript
32 lines
914 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/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(6);
|
|
});
|
|
});
|