mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
feat: [SQLLAB] add checkbox to control autocomplete (#9338)
* [SQLLAB] add checkbox to control autocomplete * autocomplete -> autocompleteEnabled * fix defaultProps * fix spec
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import { Checkbox } from 'react-bootstrap';
|
||||
|
||||
import { defaultQueryEditor, initialState, queries, table } from './fixtures';
|
||||
import {
|
||||
@@ -105,4 +106,13 @@ describe('SqlEditor', () => {
|
||||
queryEditor.queryLimit,
|
||||
);
|
||||
});
|
||||
it('allows toggling autocomplete', () => {
|
||||
const wrapper = shallow(<SqlEditor {...mockedProps} />);
|
||||
expect(wrapper.find(AceEditorWrapper).props().autocomplete).toBe(true);
|
||||
wrapper
|
||||
.find(Checkbox)
|
||||
.props()
|
||||
.onChange();
|
||||
expect(wrapper.find(AceEditorWrapper).props().autocomplete).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user