提交 83cff202 编写于 作者: L limeng

fixed d13fdfde from https://gitee.com/limeng1210/xts_acts/pulls/9905

ListItem长距离左滑删除xts测试用例失败
Signed-off-by: Nlimeng <limeng208@huawei.com>
上级 29995ca9
...@@ -72,7 +72,7 @@ export default function ListDeleteTest() { ...@@ -72,7 +72,7 @@ export default function ListDeleteTest() {
expect(obj.$attrs.startDeleteAreaDistance).assertEqual("0.00vp"); expect(obj.$attrs.startDeleteAreaDistance).assertEqual("0.00vp");
expect(obj.$attrs.endDeleteAreaDistance).assertEqual("0.00vp"); expect(obj.$attrs.endDeleteAreaDistance).assertEqual("0.00vp");
let rectCenter = getRectCenterVp(obj.$rect) let rectCenter = getRectCenter(obj.$rect)
let driver = Driver.create() let driver = Driver.create()
await driver.swipe(rectCenter[0], rectCenter[1], 0, rectCenter[1]) await driver.swipe(rectCenter[0], rectCenter[1], 0, rectCenter[1])
...@@ -102,9 +102,12 @@ export default function ListDeleteTest() { ...@@ -102,9 +102,12 @@ export default function ListDeleteTest() {
expect(obj.$attrs.startDeleteAreaDistance).assertEqual("0.00vp"); expect(obj.$attrs.startDeleteAreaDistance).assertEqual("0.00vp");
expect(obj.$attrs.endDeleteAreaDistance).assertEqual("0.00vp"); expect(obj.$attrs.endDeleteAreaDistance).assertEqual("0.00vp");
let rectCenter = getRectCenterVp(obj.$rect) let rectCenter = getRectCenter(obj.$rect)
let driver = Driver.create() let driver = Driver.create()
await driver.swipe(rectCenter[0] - 200, rectCenter[1], rectCenter[0] + 200, rectCenter[1]) await driver.swipe(Math.round(rectCenter[0] - 200),
Math.round(rectCenter[1]),
Math.round(rectCenter[0] + 200),
Math.round(rectCenter[1]))
let strJsonButtonDel = getInspectorByKey(baseKey + '_Button_Del'); let strJsonButtonDel = getInspectorByKey(baseKey + '_Button_Del');
let objButtonDel = JSON.parse(strJsonButtonDel); let objButtonDel = JSON.parse(strJsonButtonDel);
...@@ -145,7 +148,7 @@ export default function ListDeleteTest() { ...@@ -145,7 +148,7 @@ export default function ListDeleteTest() {
} }
events_emitter.on(event, callback); events_emitter.on(event, callback);
let rectCenter = getRectCenter(obj.$rect) let rectCenter = getRectCenter(obj.$rect)
await driver.swipe(Math.round(rectCenter[0]) + 200, Math.round(rectCenter[1]), await driver.swipe(Math.round(rectCenter[0] + 200), Math.round(rectCenter[1]),
0, Math.round(rectCenter[1])) 0, Math.round(rectCenter[1]))
console.info(`${SUITE} ${CASE} END`); console.info(`${SUITE} ${CASE} END`);
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册