mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-29 03:48:26 +08:00
16 lines
580 B
JavaScript
16 lines
580 B
JavaScript
import React from 'react';
|
|
import { render, mount } from 'enzyme';
|
|
import Slider from '..';
|
|
|
|
describe('Slider', () => {
|
|
it('should show tooltip when hovering slider handler', () => {
|
|
const wrapper = mount(
|
|
<Slider defaultValue={30} />
|
|
);
|
|
wrapper.find('.ant-slider-handle').at(0).simulate('mouseEnter');
|
|
expect(render(wrapper.find('Trigger').instance().getComponent())).toMatchSnapshot();
|
|
wrapper.find('.ant-slider-handle').at(0).simulate('mouseLeave');
|
|
expect(render(wrapper.find('Trigger').instance().getComponent())).toMatchSnapshot();
|
|
});
|
|
});
|