Skip to content

Commit

Permalink
remove dead logic
Browse files Browse the repository at this point in the history
This is no longer relevant since #19010.
  • Loading branch information
oliviertassinari committed May 2, 2020
1 parent d169f16 commit 6b5bf53
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions packages/material-ui/src/Slider/Slider.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,39 +129,6 @@ describe('<Slider />', () => {
});
});

// TODO: use fireEvent for all the events.
// describe.skip('when mouse reenters window', () => {
// it('should update if mouse is still clicked', () => {
// const handleChange = spy();
// const { container } = render(<Slider onChange={handleChange} value={50} />);

// fireEvent.mouseDown(container.firstChild);
// document.body.dispatchEvent(new window.MouseEvent('mouseleave'));
// const mouseEnter = new window.Event('mouseenter');
// mouseEnter.buttons = 1;
// document.body.dispatchEvent(mouseEnter);
// expect(handleChange.callCount).to.equal(1);

// document.body.dispatchEvent(new window.MouseEvent('mousemove'));
// expect(handleChange.callCount).to.equal(2);
// });

// it('should not update if mouse is not clicked', () => {
// const handleChange = spy();
// const { container } = render(<Slider onChange={handleChange} value={50} />);

// fireEvent.mouseDown(container.firstChild);
// document.body.dispatchEvent(new window.MouseEvent('mouseleave'));
// const mouseEnter = new window.Event('mouseenter');
// mouseEnter.buttons = 0;
// document.body.dispatchEvent(mouseEnter);
// expect(handleChange.callCount).to.equal(1);

// document.body.dispatchEvent(new window.MouseEvent('mousemove'));
// expect(handleChange.callCount).to.equal(1);
// });
// });

describe('range', () => {
it('should support keyboard', () => {
const { getAllByRole } = render(<Slider defaultValue={[20, 30]} />);
Expand Down

0 comments on commit 6b5bf53

Please sign in to comment.