mirror of
https://github.com/apache/superset.git
synced 2026-04-18 07:35:09 +00:00
fix: clean up prop type errors in jest tests (#11120)
This commit is contained in:
committed by
GitHub
parent
662fb43350
commit
d95b7c2a73
@@ -22,14 +22,25 @@ import { SuperChart } from '@superset-ui/core';
|
||||
|
||||
import ChartRenderer from 'src/chart/ChartRenderer';
|
||||
|
||||
const requiredProps = {
|
||||
chartId: 1,
|
||||
datasource: {},
|
||||
formData: {},
|
||||
vizType: 'foo',
|
||||
};
|
||||
|
||||
describe('ChartRenderer', () => {
|
||||
it('should render SuperChart', () => {
|
||||
const wrapper = shallow(<ChartRenderer refreshOverlayVisible={false} />);
|
||||
const wrapper = shallow(
|
||||
<ChartRenderer {...requiredProps} refreshOverlayVisible={false} />,
|
||||
);
|
||||
expect(wrapper.find(SuperChart)).toExist();
|
||||
});
|
||||
|
||||
it('should not render SuperChart when refreshOverlayVisible is true', () => {
|
||||
const wrapper = shallow(<ChartRenderer refreshOverlayVisible />);
|
||||
const wrapper = shallow(
|
||||
<ChartRenderer {...requiredProps} refreshOverlayVisible />,
|
||||
);
|
||||
expect(wrapper.find(SuperChart)).not.toExist();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user