mirror of
https://github.com/apache/superset.git
synced 2026-04-24 18:44:53 +00:00
* tests: adding required props to FilterableTable mockedProps * tests: adding required prop `height` to QuerySearch mockedProps * tests: adding required prop `height` to ResultSet mockedProps * tests: adding required prop `height` to SqlEditorLeftBar mockedProps * tests: fix warning in Timer component
27 lines
799 B
JavaScript
27 lines
799 B
JavaScript
import React from 'react';
|
|
import { mount } from 'enzyme';
|
|
import { describe, it } from 'mocha';
|
|
import { expect } from 'chai';
|
|
|
|
import { table, defaultQueryEditor } from './fixtures';
|
|
import SqlEditorLeftBar from '../../../javascripts/SqlLab/components/SqlEditorLeftBar';
|
|
import TableElement from '../../../javascripts/SqlLab/components/TableElement';
|
|
|
|
|
|
describe('SqlEditorLeftBar', () => {
|
|
const mockedProps = {
|
|
tables: [table],
|
|
queryEditor: defaultQueryEditor,
|
|
height: 0,
|
|
};
|
|
it('is valid', () => {
|
|
expect(
|
|
React.isValidElement(<SqlEditorLeftBar {...mockedProps} />),
|
|
).to.equal(true);
|
|
});
|
|
it('renders a TableElement', () => {
|
|
const wrapper = mount(<SqlEditorLeftBar {...mockedProps} />);
|
|
expect(wrapper.find(TableElement)).to.have.length(1);
|
|
});
|
|
});
|