mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
Fix test's warnings (#2697)
* 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
This commit is contained in:
parent
a58adc862e
commit
3cd16cf368
@ -4,7 +4,12 @@ import { expect } from 'chai';
|
|||||||
import FilterableTable from '../../../../javascripts/components/FilterableTable/FilterableTable';
|
import FilterableTable from '../../../../javascripts/components/FilterableTable/FilterableTable';
|
||||||
|
|
||||||
describe('FilterableTable', () => {
|
describe('FilterableTable', () => {
|
||||||
|
const mockedProps = {
|
||||||
|
orderedColumnKeys: [],
|
||||||
|
data: [],
|
||||||
|
height: 0,
|
||||||
|
};
|
||||||
it('is valid element', () => {
|
it('is valid element', () => {
|
||||||
expect(React.isValidElement(<FilterableTable />)).to.equal(true);
|
expect(React.isValidElement(<FilterableTable {...mockedProps} />)).to.equal(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -11,6 +11,7 @@ import QuerySearch from '../../../javascripts/SqlLab/components/QuerySearch';
|
|||||||
describe('QuerySearch', () => {
|
describe('QuerySearch', () => {
|
||||||
const mockedProps = {
|
const mockedProps = {
|
||||||
actions: {},
|
actions: {},
|
||||||
|
height: 0,
|
||||||
};
|
};
|
||||||
it('is valid', () => {
|
it('is valid', () => {
|
||||||
expect(
|
expect(
|
||||||
|
@ -9,14 +9,10 @@ import { queries } from './fixtures';
|
|||||||
describe('ResultSet', () => {
|
describe('ResultSet', () => {
|
||||||
const mockedProps = {
|
const mockedProps = {
|
||||||
query: queries[0],
|
query: queries[0],
|
||||||
|
height: 0,
|
||||||
};
|
};
|
||||||
it('renders', () => {
|
it('is valid', () => {
|
||||||
expect(React.isValidElement(<ResultSet />)).to.equal(true);
|
expect(React.isValidElement(<ResultSet {...mockedProps} />)).to.equal(true);
|
||||||
});
|
|
||||||
it('renders with props', () => {
|
|
||||||
expect(
|
|
||||||
React.isValidElement(<ResultSet />),
|
|
||||||
).to.equal(true);
|
|
||||||
});
|
});
|
||||||
it('renders a Table', () => {
|
it('renders a Table', () => {
|
||||||
const wrapper = shallow(<ResultSet {...mockedProps} />);
|
const wrapper = shallow(<ResultSet {...mockedProps} />);
|
||||||
|
@ -12,6 +12,7 @@ describe('SqlEditorLeftBar', () => {
|
|||||||
const mockedProps = {
|
const mockedProps = {
|
||||||
tables: [table],
|
tables: [table],
|
||||||
queryEditor: defaultQueryEditor,
|
queryEditor: defaultQueryEditor,
|
||||||
|
height: 0,
|
||||||
};
|
};
|
||||||
it('is valid', () => {
|
it('is valid', () => {
|
||||||
expect(
|
expect(
|
||||||
|
@ -14,10 +14,7 @@ describe('Timer', () => {
|
|||||||
isRunning: true,
|
isRunning: true,
|
||||||
state: 'warning',
|
state: 'warning',
|
||||||
};
|
};
|
||||||
it('renders', () => {
|
it('is valid', () => {
|
||||||
expect(React.isValidElement(<Timer />)).to.equal(true);
|
|
||||||
});
|
|
||||||
it('renders with props', () => {
|
|
||||||
expect(React.isValidElement(<Timer {...mockedProps} />))
|
expect(React.isValidElement(<Timer {...mockedProps} />))
|
||||||
.to.equal(true);
|
.to.equal(true);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user