Skip to content

Commit

Permalink
fix:modify test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyf665 committed Nov 26, 2024
1 parent 922b1b4 commit df6676b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/new-range.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -722,11 +722,9 @@ describe('NewPicker.Range', () => {
const { container } = render(<DayRangePicker onChange={onChange} showTime />);
openPicker(container);
selectCell(15);
fireEvent.click(document.querySelector('ul').querySelector('li'));
fireEvent.click(document.querySelector('.rc-picker-ok button'));

selectCell(16);
fireEvent.click(document.querySelector('ul').querySelector('li'));
fireEvent.click(document.querySelector('.rc-picker-ok button'));

expect(onChange).toHaveBeenCalledWith(expect.anything(), [
Expand All @@ -742,6 +740,8 @@ describe('NewPicker.Range', () => {
expect(container.querySelectorAll('input')[1]).not.toHaveFocus();

fireEvent.click(document.querySelector('.rc-picker-ok button'));
openPicker(container, 1);
expect(container.querySelectorAll('input')[1]).toHaveFocus();
selectCell(2);
fireEvent.click(document.querySelector('.rc-picker-ok button'));
expect(onChange).toHaveBeenCalledWith(expect.anything(), [
Expand Down

0 comments on commit df6676b

Please sign in to comment.