提交 48935181 编写于 作者: DCloud_iOS_XHY's avatar DCloud_iOS_XHY

touch-events-bubbles 示例调整坐标点,适配 iOS16机型

(cherry picked from commit 27501b7b)
上级 77ab66ad
......@@ -28,12 +28,12 @@ describe('touch-events-test', () => {
let iconRect = await page.data('iconRect')
let x = iconRect.x + iconRect.width / 2.0
let y = iconRect.y + 5
let y = iconRect.y + 25
// 滑动事件
await program.swipe({
startPoint: {x: x, y: y},
endPoint: {x: x,y: y+35},
endPoint: {x: x,y: y+15},
duration: 200
})
......@@ -47,12 +47,12 @@ describe('touch-events-test', () => {
let viewEleRect = await page.data('viewEleRect')
let x = viewEleRect.x + viewEleRect.width / 2.0
let y = viewEleRect.y + 5
let y = viewEleRect.y + 25
// 滑动事件
await program.swipe({
startPoint: {x: x, y: y},
endPoint: {x: x,y: y+35},
endPoint: {x: x,y: y+15},
duration: 200
})
......
......@@ -52,17 +52,33 @@
this.touchendValue = []
},
isPassTest1() {
let result = this.touchstartValue.join("") == "view1-3view1-2view1" &&
this.touchmoveValue.join("") == "view1-3view1-2view1" &&
this.touchendValue.join("") == "view1-3view1-2view1"
let touchStart = this.touchstartValue.join("")
let touchMove = this.touchmoveValue.join("")
let touchEnd = this.touchendValue.join("")
console.log("touchStart: ", touchStart)
console.log("touchMove: ", touchMove)
console.log("touchEnd: ", touchEnd)
let result = touchStart == "view1-3view1-2view1" &&
touchMove == "view1-3view1-2view1" &&
touchEnd == "view1-3view1-2view1"
console.log('isPassTest1', result)
this.ret1 = result
this.clearValue()
},
isPassTest2() {
let result = this.touchstartValue.join("") == "view2-3view2" &&
this.touchmoveValue.join("") == "view2" &&
this.touchendValue.join("") == "view2-3view2-2view2"
let touchStart = this.touchstartValue.join("")
let touchMove = this.touchmoveValue.join("")
let touchEnd = this.touchendValue.join("")
console.log("touchStart: ", touchStart)
console.log("touchMove: ", touchMove)
console.log("touchEnd: ", touchEnd)
let result = touchStart == "view2-3view2" &&
touchMove == "view2" &&
touchEnd == "view2-3view2-2view2"
console.log('isPassTest2', result)
this.ret2 = result
this.clearValue()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册