Skip to content

Commit 13aa6a3

Browse files
committed
add test case on range picker select affections
1 parent 2ccf224 commit 13aa6a3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/range.spec.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,4 +1036,15 @@ describe('Picker.Range', () => {
10361036
testOrderOnTime(false, '23:00:00', '02:00:00');
10371037
testOrderOnTime(true, '02:00:00', '23:00:00');
10381038
});
1039+
1040+
// https://github.com/ant-design/ant-design/issues/21084
1041+
it('should not jump back to current date after select', () => {
1042+
const onPanelChange = jest.fn();
1043+
const wrapper = mount(<MomentRangePicker onPanelChange={onPanelChange} />);
1044+
wrapper.openPicker();
1045+
wrapper.clickButton('super-prev');
1046+
wrapper.selectCell(3);
1047+
wrapper.selectCell(4);
1048+
matchValues(wrapper, '1989-09-03', '1989-09-04');
1049+
});
10391050
});

0 commit comments

Comments
 (0)