mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
fix: Issues with filters and metrics popovers (#11578)
* Fix bugs in AdhocFilterEditPopover * Fix bugs in AdhocMetricEditPopover * Remove handleMultiComparatorInputHeightChange function * Fix tests
This commit is contained in:
committed by
GitHub
parent
1490f3074d
commit
6d5d92a6fe
@@ -199,16 +199,4 @@ describe('AdhocFilterEditPopoverSimpleTabContent', () => {
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it('expands when its multi comparator input field expands', () => {
|
||||
const { wrapper, onHeightChange } = setup();
|
||||
|
||||
wrapper.instance().multiComparatorComponent = {
|
||||
select: { select: { controlRef: { clientHeight: 57 } } },
|
||||
};
|
||||
wrapper.instance().handleMultiComparatorInputHeightChange();
|
||||
|
||||
expect(onHeightChange.calledOnce).toBe(true);
|
||||
expect(onHeightChange.lastCall.args[0]).toBe(27);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -126,9 +126,9 @@ describe('AdhocFilterEditPopover', () => {
|
||||
wrapper.instance().onDragDown = sinon.spy();
|
||||
wrapper.instance().forceUpdate();
|
||||
|
||||
expect(wrapper.find('i.fa-expand')).toExist();
|
||||
expect(wrapper.find('.fa-expand')).toExist();
|
||||
expect(wrapper.instance().onDragDown.calledOnce).toBe(false);
|
||||
wrapper.find('i.fa-expand').simulate('mouseDown', {});
|
||||
wrapper.find('.fa-expand').simulate('mouseDown', {});
|
||||
expect(wrapper.instance().onDragDown.calledOnce).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -113,9 +113,9 @@ describe('AdhocMetricEditPopover', () => {
|
||||
wrapper.instance().onDragDown = sinon.spy();
|
||||
wrapper.instance().forceUpdate();
|
||||
|
||||
expect(wrapper.find('i.fa-expand')).toExist();
|
||||
expect(wrapper.find('.fa-expand')).toExist();
|
||||
expect(wrapper.instance().onDragDown.calledOnce).toBe(false);
|
||||
wrapper.find('i.fa-expand').simulate('mouseDown');
|
||||
wrapper.find('.fa-expand').simulate('mouseDown');
|
||||
expect(wrapper.instance().onDragDown.calledOnce).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user