mirror of
https://github.com/apache/superset.git
synced 2026-04-22 01:24:43 +00:00
* Query search page under SQL Lab tab * Modifications based on comments * Hash * Added spec and endpoint test with modifications based on second round comments * Changed permission menu in https://github.com/airbnb/caravel/pull/1095/files
31 lines
883 B
JavaScript
31 lines
883 B
JavaScript
import React from 'react';
|
|
import Select from 'react-select';
|
|
import { Button } from 'react-bootstrap';
|
|
import QuerySearch from '../../../javascripts/SqlLab/components/QuerySearch';
|
|
import { shallow } from 'enzyme';
|
|
import { describe, it } from 'mocha';
|
|
import { expect } from 'chai';
|
|
|
|
describe('QuerySearch', () => {
|
|
it('should render', () => {
|
|
expect(
|
|
React.isValidElement(<QuerySearch />)
|
|
).to.equal(true);
|
|
});
|
|
|
|
it('should have two Select', () => {
|
|
const wrapper = shallow(<QuerySearch />);
|
|
expect(wrapper.find(Select)).to.have.length(2);
|
|
});
|
|
|
|
it('should have one input for searchText', () => {
|
|
const wrapper = shallow(<QuerySearch />);
|
|
expect(wrapper.find('input')).to.have.length(1);
|
|
});
|
|
|
|
it('should have one Button', () => {
|
|
const wrapper = shallow(<QuerySearch />);
|
|
expect(wrapper.find(Button)).to.have.length(1);
|
|
});
|
|
});
|