mirror of
https://github.com/apache/superset.git
synced 2026-04-16 22:55:52 +00:00
refactor: Bootstrap to AntD - Form - iteration 4 (#14546)
This commit is contained in:
committed by
GitHub
parent
3eef38f309
commit
331eb10fb9
@@ -18,10 +18,10 @@
|
||||
*/
|
||||
/* eslint-disable no-unused-expressions */
|
||||
import React from 'react';
|
||||
import { FormControl } from 'react-bootstrap';
|
||||
import sinon from 'sinon';
|
||||
import { shallow } from 'enzyme';
|
||||
import { TextAreaEditor } from 'src/components/AsyncAceEditor';
|
||||
import { TextArea } from 'src/common/components';
|
||||
|
||||
import TextAreaControl from 'src/explore/components/controls/TextAreaControl';
|
||||
|
||||
@@ -38,11 +38,11 @@ describe('SelectControl', () => {
|
||||
});
|
||||
|
||||
it('renders a FormControl', () => {
|
||||
expect(wrapper.find(FormControl)).toExist();
|
||||
expect(wrapper.find(TextArea)).toExist();
|
||||
});
|
||||
|
||||
it('calls onChange when toggled', () => {
|
||||
const select = wrapper.find(FormControl);
|
||||
const select = wrapper.find(TextArea);
|
||||
select.simulate('change', { target: { value: 'x' } });
|
||||
expect(defaultProps.onChange.calledWith('x')).toBe(true);
|
||||
});
|
||||
@@ -51,7 +51,7 @@ describe('SelectControl', () => {
|
||||
const props = { ...defaultProps };
|
||||
props.language = 'markdown';
|
||||
wrapper = shallow(<TextAreaControl {...props} />);
|
||||
expect(wrapper.find(FormControl)).not.toExist();
|
||||
expect(wrapper.find(TextArea)).not.toExist();
|
||||
expect(wrapper.find(TextAreaEditor)).toExist();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user