You need to sign in or sign up before continuing.
提交 5a82c2f9 编写于 作者: 辛宝Otto's avatar 辛宝Otto 🥊

fix: 调整自动化测试滑动屏幕的距离,确保滑动生效

上级 50605506
......@@ -27,19 +27,23 @@ describe('touch-events-test', () => {
it('touch-event-case1', async () => {
// const windowInfo = await program.callUniMethod('getWindowInfo');
// const halfWidth = windowInfo.windowWidth / 2
let x = 40
let y = 150
// 滑动事件
await program.swipe({
startPoint: {x: x, y: y},
endPoint: {x: x+200,y: y},
endPoint: {x: x + 300, y: y},
// endPoint: {x: x + halfWidth + 20, y: y},
duration: 300
})
await page.waitFor(1500);
const swiperChangeEvent = await page.data('swiperChangeEvent')
console.log("swiperChangeEvent:", swiperChangeEvent)
// console.log("swiperChangeEvent:", swiperChangeEvent)
expect(swiperChangeEvent).toBe(true)
})
......
......@@ -34,7 +34,7 @@ describe('touch-events-test', () => {
it('test-custom-refresher', async () => {
let x = 100
let y = 180
let y = 250
await page.setData({
triggered: false,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册