Skip to content

Commit

Permalink
test: remove abandoned test
Browse files Browse the repository at this point in the history
  • Loading branch information
cuixiaorui committed Dec 27, 2020
1 parent 4f473a1 commit f92146a
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions packages/element3/packages/slider/__tests__/Slider.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,40 +121,6 @@ describe('Slider', () => {
})
})

it('drag', (done) => {
const slider = ref(0)
const vertical = ref(false)
const wrapper = mount(Slider, {
props: {
modelValue: slider,
vertical: vertical,
height: '200px',
'onUpdate:modelValue': (val) => {
slider.value = val
}
}
})
const sliderBtn = wrapper.findComponent(SliderButton)
sliderBtn.trigger('mousedown', { clientX: 0, preventDefault() {} })
sliderBtn.vm.onDragging({ clientX: 100 })
sliderBtn.vm.onDragEnd()
nextTick(() => {
expect(slider.value > 0).toBeTruthy()
slider.value = 0
vertical.value = true
nextTick(() => {
expect(slider.value === 0).toBeTruthy()
sliderBtn.trigger('mousedown', { clientY: 0, preventDefault() {} })
sliderBtn.vm.onDragging({ clientY: -100 })
sliderBtn.vm.onDragEnd()
nextTick(() => {
expect(slider.value > 0).toBeTruthy()
done()
})
})
})
})

it('accessibility', (done) => {
const slider = ref(0.1)
const wrapper = mount(Slider, {
Expand Down

0 comments on commit f92146a

Please sign in to comment.