mirror of
https://github.com/apache/superset.git
synced 2026-04-17 23:25:05 +00:00
feat(viz): add query mode switch to table chart (#10113)
1, Replace table chart rendering from jquery.DataTables to react-table: apache-superset/superset-ui#623 2. Rearrange the control panel, replace GROUP BY and NOT GROUP BY with a "Query Mode" switch: apache-superset/superset-ui#609
This commit is contained in:
@@ -46,14 +46,16 @@ describe('Toast', () => {
|
||||
expect(alert.childAt(0).childAt(1).text()).toBe(props.toast.text);
|
||||
});
|
||||
|
||||
it('should call onCloseToast upon alert dismissal', done => {
|
||||
const onCloseToast = id => {
|
||||
expect(id).toBe(props.toast.id);
|
||||
done();
|
||||
};
|
||||
const wrapper = setup({ onCloseToast });
|
||||
const handleClosePress = wrapper.instance().handleClosePress;
|
||||
expect(wrapper.find(Alert).prop('onDismiss')).toBe(handleClosePress);
|
||||
handleClosePress(); // there is a timeout for onCloseToast to be called
|
||||
it('should call onCloseToast upon alert dismissal', () => {
|
||||
return new Promise(done => {
|
||||
const onCloseToast = id => {
|
||||
expect(id).toBe(props.toast.id);
|
||||
done();
|
||||
};
|
||||
const wrapper = setup({ onCloseToast });
|
||||
const handleClosePress = wrapper.instance().handleClosePress;
|
||||
expect(wrapper.find(Alert).prop('onDismiss')).toBe(handleClosePress);
|
||||
handleClosePress(); // there is a timeout for onCloseToast to be called
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user