mirror of
https://github.com/apache/superset.git
synced 2026-04-21 17:14:57 +00:00
[sqllab] some frontend tests (#1400)
* [sqllab] some frontend tests * linting * Addressing comments * Addressing unaddressed comments * Touchups
This commit is contained in:
committed by
GitHub
parent
7c5933732b
commit
940659bc14
@@ -7,24 +7,27 @@ import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
describe('QuerySearch', () => {
|
||||
it('should render', () => {
|
||||
const mockedProps = {
|
||||
actions: {},
|
||||
};
|
||||
it('is valid', () => {
|
||||
expect(
|
||||
React.isValidElement(<QuerySearch />)
|
||||
React.isValidElement(<QuerySearch {...mockedProps} />)
|
||||
).to.equal(true);
|
||||
});
|
||||
|
||||
it('should have two Select', () => {
|
||||
const wrapper = shallow(<QuerySearch />);
|
||||
const wrapper = shallow(<QuerySearch {...mockedProps} />);
|
||||
expect(wrapper.find(Select)).to.have.length(2);
|
||||
});
|
||||
|
||||
it('should have one input for searchText', () => {
|
||||
const wrapper = shallow(<QuerySearch />);
|
||||
const wrapper = shallow(<QuerySearch {...mockedProps} />);
|
||||
expect(wrapper.find('input')).to.have.length(1);
|
||||
});
|
||||
|
||||
it('should have one Button', () => {
|
||||
const wrapper = shallow(<QuerySearch />);
|
||||
const wrapper = shallow(<QuerySearch {...mockedProps} />);
|
||||
expect(wrapper.find(Button)).to.have.length(1);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user