mirror of
https://github.com/apache/superset.git
synced 2026-04-09 19:35:21 +00:00
Explore to SQL Lab (#5101)
* WIP * Working version * Clean code * Fix lint * Fix unit test; show only for sqla * Working on UX * Dropdown working 66% * Working but needs CSS * Fixed table * Fix lint * Fix unit test * Fix languages path * Fixes * Fix Javascript lint
This commit is contained in:
committed by
Maxime Beauchemin
parent
48317fd8f9
commit
c445ef8c43
@@ -16,15 +16,17 @@ describe('DisplayQueryButton', () => {
|
||||
},
|
||||
chartStatus: 'success',
|
||||
queryEndpoint: 'localhost',
|
||||
latestQueryFormData: {
|
||||
datasource: '1__table',
|
||||
},
|
||||
};
|
||||
|
||||
it('is valid', () => {
|
||||
expect(React.isValidElement(<DisplayQueryButton {...defaultProps} />)).to.equal(true);
|
||||
});
|
||||
it('renders a button and a modal', () => {
|
||||
it('renders a dropdown', () => {
|
||||
const wrapper = mount(<DisplayQueryButton {...defaultProps} />);
|
||||
expect(wrapper.find(ModalTrigger)).to.have.lengthOf(1);
|
||||
wrapper.find('.modal-trigger').simulate('click');
|
||||
expect(wrapper.find(Modal)).to.have.lengthOf(1);
|
||||
expect(wrapper.find(ModalTrigger)).to.have.lengthOf(2);
|
||||
expect(wrapper.find(Modal)).to.have.lengthOf(2);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user