test(Slider): update test cases

This commit is contained in:
chenjiahan
2021-01-07 20:46:47 +08:00
parent eb47a3948d
commit fd8ac0a582
5 changed files with 181 additions and 250 deletions

View File

@@ -52,11 +52,13 @@ export function triggerDrag(
el: VueWrapper<ComponentPublicInstance> | HTMLElement,
x = 0,
y = 0
): void {
) {
trigger(el, 'touchstart', 0, 0);
trigger(el, 'touchmove', x / 4, y / 4);
trigger(el, 'touchmove', x / 3, y / 3);
trigger(el, 'touchmove', x / 2, y / 2);
trigger(el, 'touchmove', x, y);
trigger(el, 'touchend', x, y);
return nextTick();
}