feat(Rate): add touchable prop (#4361)
This commit is contained in:
@@ -137,3 +137,18 @@ test('size prop', () => {
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('untouchable', () => {
|
||||
const onChange = jest.fn();
|
||||
const wrapper = mount(Rate, {
|
||||
propsData: {
|
||||
touchable: false
|
||||
},
|
||||
listeners: {
|
||||
change: onChange
|
||||
}
|
||||
});
|
||||
|
||||
triggerDrag(wrapper, 100, 0);
|
||||
expect(onChange).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user