mirror of
https://github.com/apache/superset.git
synced 2026-04-13 05:07:53 +00:00
* Adding support for client side validators on controls * Applying validators to more fields * Addressing comments
37 lines
937 B
JavaScript
37 lines
937 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 { defaultFormData, initialState } from '../../../../javascripts/explorev2/stores/store';
|
|
|
|
import {
|
|
ControlPanelsContainer,
|
|
} from '../../../../javascripts/explorev2/components/ControlPanelsContainer';
|
|
import { fields } from '../../../../javascripts/explorev2/stores/fields';
|
|
|
|
const defaultProps = {
|
|
datasource_id: 1,
|
|
datasource_type: 'type',
|
|
exploreState: initialState(),
|
|
form_data: defaultFormData(),
|
|
fields,
|
|
actions: {
|
|
fetchFieldOptions: () => {
|
|
// noop
|
|
},
|
|
},
|
|
};
|
|
|
|
describe('ControlPanelsContainer', () => {
|
|
let wrapper;
|
|
|
|
beforeEach(() => {
|
|
wrapper = shallow(<ControlPanelsContainer {...defaultProps} />);
|
|
});
|
|
|
|
it('renders a Panel', () => {
|
|
expect(wrapper.find(Panel)).to.have.lengthOf(1);
|
|
});
|
|
});
|