From 83cff2025c65dd730d4a9600df2adf86ba376167 Mon Sep 17 00:00:00 2001 From: limeng Date: Mon, 28 Aug 2023 15:31:32 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20d13fdfd=20from=20https://gitee.com/lime?= =?UTF-8?q?ng1210/xts=5Facts/pulls/9905=20ListItem=E9=95=BF=E8=B7=9D?= =?UTF-8?q?=E7=A6=BB=E5=B7=A6=E6=BB=91=E5=88=A0=E9=99=A4xts=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: limeng --- .../src/main/ets/test/ListDelete.test.ets | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arkui/ace_ets_component_api/src/main/ets/test/ListDelete.test.ets b/arkui/ace_ets_component_api/src/main/ets/test/ListDelete.test.ets index baf3601d9..d99f87b52 100644 --- a/arkui/ace_ets_component_api/src/main/ets/test/ListDelete.test.ets +++ b/arkui/ace_ets_component_api/src/main/ets/test/ListDelete.test.ets @@ -72,7 +72,7 @@ export default function ListDeleteTest() { expect(obj.$attrs.startDeleteAreaDistance).assertEqual("0.00vp"); expect(obj.$attrs.endDeleteAreaDistance).assertEqual("0.00vp"); - let rectCenter = getRectCenterVp(obj.$rect) + let rectCenter = getRectCenter(obj.$rect) let driver = Driver.create() await driver.swipe(rectCenter[0], rectCenter[1], 0, rectCenter[1]) @@ -102,9 +102,12 @@ export default function ListDeleteTest() { expect(obj.$attrs.startDeleteAreaDistance).assertEqual("0.00vp"); expect(obj.$attrs.endDeleteAreaDistance).assertEqual("0.00vp"); - let rectCenter = getRectCenterVp(obj.$rect) + let rectCenter = getRectCenter(obj.$rect) 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 objButtonDel = JSON.parse(strJsonButtonDel); @@ -145,7 +148,7 @@ export default function ListDeleteTest() { } events_emitter.on(event, callback); 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])) console.info(`${SUITE} ${CASE} END`); }); -- GitLab