test(IndexBar): update test cases

This commit is contained in:
chenjiahan
2021-01-03 14:39:30 +08:00
parent c33b526af2
commit ccc7f3be31
4 changed files with 410 additions and 129 deletions

View File

@@ -1,4 +1,4 @@
import { ComponentPublicInstance } from 'vue';
import { ComponentPublicInstance, nextTick } from 'vue';
import { VueWrapper } from '@vue/test-utils';
function getTouch(el: Element | Window, x: number, y: number) {
@@ -43,6 +43,8 @@ export function trigger(
});
el.dispatchEvent(event);
return nextTick();
}
// simulate drag gesture