-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[explore] fix query text modal while loading (#2596)
* [explore] fix and clean Currently it's not possible to view queries while they are running, the spinner appears endlessly. I decided to rearrange things a bit while debugging so I could see clearly through it. * Adding NotImplemented methods to base classes * Fixing * Piling up
- Loading branch information
1 parent
2df6baa
commit db02b33
Showing
9 changed files
with
133 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 16 additions & 3 deletions
19
superset/assets/spec/javascripts/explorev2/components/DisplayQueryButton_spec.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,30 @@ | ||
import React from 'react'; | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { mount } from 'enzyme'; | ||
import { Modal } from 'react-bootstrap'; | ||
import ModalTrigger from './../../../../javascripts/components/ModalTrigger.jsx'; | ||
|
||
import DisplayQueryButton from '../../../../javascripts/explorev2/components/DisplayQueryButton'; | ||
|
||
describe('DisplayQueryButton', () => { | ||
const defaultProps = { | ||
slice: { | ||
viewSqlQuery: 'sql query string', | ||
animation: false, | ||
queryResponse: { | ||
query: 'SELECT * FROM foo', | ||
language: 'sql', | ||
}, | ||
chartStatus: 'success', | ||
queryEndpoint: 'localhost', | ||
}; | ||
|
||
it('renders', () => { | ||
it('is valid', () => { | ||
expect(React.isValidElement(<DisplayQueryButton {...defaultProps} />)).to.equal(true); | ||
}); | ||
it('renders a button and a modal', () => { | ||
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); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters