mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
refactor: Refactor QueryTable to use react-table (#11216)
* Refactor QueryTable to use react-table * Fix lodash import * Fix tests * Fix imports and QuerySearch styles * Update superset-frontend/src/SqlLab/components/QuerySearch.jsx Co-authored-by: Evan Rusackas <evan@preset.io> * Update superset-frontend/src/SqlLab/components/QuerySearch.jsx Co-authored-by: Evan Rusackas <evan@preset.io> * Lint fix * Refactored QueryTable into functional component * Remove calculating content height * Lint fix Co-authored-by: Evan Rusackas <evan@preset.io>
This commit is contained in:
committed by
GitHub
parent
a1f8429b4e
commit
735123d1f5
@@ -21,7 +21,6 @@ import configureStore from 'redux-mock-store';
|
||||
import thunk from 'redux-thunk';
|
||||
|
||||
import { shallow } from 'enzyme';
|
||||
import sinon from 'sinon';
|
||||
|
||||
import App from 'src/SqlLab/components/App';
|
||||
import TabbedSqlEditors from 'src/SqlLab/components/TabbedSqlEditors';
|
||||
@@ -41,14 +40,6 @@ describe('SqlLab App', () => {
|
||||
expect(React.isValidElement(<App />)).toBe(true);
|
||||
});
|
||||
|
||||
it('should handler resize', () => {
|
||||
const inner = wrapper.dive();
|
||||
sinon.spy(inner.instance(), 'getHeight');
|
||||
inner.instance().handleResize();
|
||||
expect(inner.instance().getHeight.callCount).toBe(1);
|
||||
inner.instance().getHeight.restore();
|
||||
});
|
||||
|
||||
it('should render', () => {
|
||||
const inner = wrapper.dive();
|
||||
expect(inner.find('.SqlLab')).toHaveLength(1);
|
||||
|
||||
Reference in New Issue
Block a user