From 1a4713f9c9b1f0d3e2495ffacad2fa45397570f1 Mon Sep 17 00:00:00 2001 From: huqingyun Date: Tue, 25 Jul 2023 02:49:19 +0000 Subject: [PATCH] =?UTF-8?q?fixed=206f2920b=20from=20https://gitee.com/Yun-?= =?UTF-8?q?xier/xts=5Facts/pulls/9465=20=E4=BF=AE=E5=A4=8Dswiper=20XTS?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huqingyun Change-Id: Ifd824943fe0ed80a753ae758a091813db9ed6eb7 --- .../entry/src/main/ets/test/SwiperJsunit.test.ets | 2 +- .../test/Swiper/Swiper_ItemChange/swiperItemSize.test.ets | 2 +- .../Swiper/Swiper_ItemChange/swiperItemVisibility.test.ets | 6 +++--- .../Swiper_ParmsChange/swiperDisableSwipeFalse.test.ets | 2 +- .../test/Swiper/Swiper_ParmsChange/swiperItemSpace.test.ets | 4 ++-- .../test/Swiper/Swiper_ParmsChange/swiperMarPad.test.ets | 2 +- .../test/Swiper/Swiper_ParmsChange/swiperMargin.test.ets | 2 +- .../test/Swiper/Swiper_ParmsChange/swiperPadding.test.ets | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/arkui/ace_ets_component/entry/src/main/ets/test/SwiperJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/test/SwiperJsunit.test.ets index 233322a74..cb75c7963 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/test/SwiperJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/test/SwiperJsunit.test.ets @@ -417,7 +417,7 @@ export default function swiperJsunit() { let strJsonNew = getInspectorByKey('swiper'); let objNew = JSON.parse(strJsonNew); console.info("swiperTest_1700 component objNew is: " + JSON.stringify(objNew)); - expect(objNew.$attrs.loop).assertEqual('false'); + expect(objNew.$attrs.loop).assertEqual('true'); console.info('swiperTest_1700 END'); done(); }); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemSize.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemSize.test.ets index 2dd487dc2..1c000e121 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemSize.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemSize.test.ets @@ -66,7 +66,7 @@ export default function swiperItemSize() { let driver = await Driver.create(); //await driver.swipe(250, 230, 200, 230); await CommonFunc.sleep(500); - await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100)); + await driver.swipe(vp2px(180), vp2px(100), vp2px(20), vp2px(100)); await CommonFunc.sleep(1000); // After flipping the page. itemSizekey = CommonFunc.getComponentRect('itemSizekey'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemVisibility.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemVisibility.test.ets index 26a5a9bdd..c9f8a0fb6 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemVisibility.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ItemChange/swiperItemVisibility.test.ets @@ -67,7 +67,7 @@ export default function swiperItemVisibility() { expect(visiblekey.bottom).assertEqual(visiblekey01.bottom); let driver = await Driver.create(); await CommonFunc.sleep(500); - await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100)); + await driver.swipe(vp2px(180), vp2px(100), vp2px(20), vp2px(100)); //await driver.swipe(250, 230, 200, 230); await CommonFunc.sleep(1000); // 翻页后子组件2大小及位置与父组件一致,翻页成功 @@ -118,7 +118,7 @@ export default function swiperItemVisibility() { expect(visiblekey.bottom).assertEqual(visiblekey05.bottom); let driver = await Driver.create(); await CommonFunc.sleep(500); - await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100)); + await driver.swipe(vp2px(180), vp2px(100), vp2px(20), vp2px(100)); //await driver.swipe(250, 230, 200, 230); await CommonFunc.sleep(1000); // 翻页后子组件6大小及位置与父组件一致,翻页成功 @@ -169,7 +169,7 @@ export default function swiperItemVisibility() { visiblekey03 = CommonFunc.getComponentRect('visiblekey03'); let driver = await Driver.create(); await CommonFunc.sleep(500); - await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100)); + await driver.swipe(vp2px(180), vp2px(100), vp2px(20), vp2px(100)); //await driver.swipe(250, 230, 200, 230); await CommonFunc.sleep(1000); // 翻页后子组件4大小及位置与父组件一致,翻页成功 diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperDisableSwipeFalse.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperDisableSwipeFalse.test.ets index a4acbfb90..acaa79074 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperDisableSwipeFalse.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperDisableSwipeFalse.test.ets @@ -68,7 +68,7 @@ export default function swiperDisableSwipeFalse() { expect(disableFalse.bottom).assertEqual(disableFalse01.bottom); let driver = await Driver.create(); await CommonFunc.sleep(500); - await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100)); + await driver.swipe(vp2px(180), vp2px(100), vp2px(20), vp2px(100)); //await driver.swipe(250, 230, 200, 230); await CommonFunc.sleep(1000); // After flipping the page. diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperItemSpace.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperItemSpace.test.ets index 59b180999..9f519ca0c 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperItemSpace.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperItemSpace.test.ets @@ -74,7 +74,7 @@ export default function swiperItemSpace() { let driver = await Driver.create(); await CommonFunc.sleep(500); - await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100)); + await driver.swipe(vp2px(180), vp2px(100), vp2px(20), vp2px(100)); //await driver.swipe(250, 230, 200, 230); await CommonFunc.sleep(1000); itemspacekey = CommonFunc.getComponentRect('itemspacekey'); @@ -139,7 +139,7 @@ export default function swiperItemSpace() { // After flipping the page. let driver = await Driver.create(); await CommonFunc.sleep(500); - await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100)); + await driver.swipe(vp2px(180), vp2px(100), vp2px(20), vp2px(100)); // await driver.swipe(250, 230, 200, 230); await CommonFunc.sleep(1000); itemspacekey = CommonFunc.getComponentRect('itemspacekey'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperMarPad.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperMarPad.test.ets index 0703b02bc..76b9dcc8e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperMarPad.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperMarPad.test.ets @@ -69,7 +69,7 @@ export default function swiperMarPad() { let driver = await Driver.create(); await CommonFunc.sleep(500) //await driver.swipe(250, 230, 200, 230); - await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100)); + await driver.swipe(vp2px(180), vp2px(100), vp2px(20), vp2px(100)); await CommonFunc.sleep(1000); swiperMarPad = CommonFunc.getComponentRect('swiperMarPad'); swiperMarPad01 = CommonFunc.getComponentRect('swiperMarPad01'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperMargin.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperMargin.test.ets index ec73358ee..8cf553b03 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperMargin.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperMargin.test.ets @@ -70,7 +70,7 @@ export default function swiperMargin() { let driver = await Driver.create(); await CommonFunc.sleep(500); //await driver.swipe(250, 230, 200, 230); - await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100)); + await driver.swipe(vp2px(180), vp2px(100), vp2px(20), vp2px(100)); await CommonFunc.sleep(1000); swiperMargin = CommonFunc.getComponentRect('swiperMargin'); swiperMargin01 = CommonFunc.getComponentRect('swiperMargin01'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperPadding.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperPadding.test.ets index 77d83bd7b..c3698b299 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperPadding.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Swiper/Swiper_ParmsChange/swiperPadding.test.ets @@ -68,7 +68,7 @@ export default function swiperPadding() { // Page turning. let driver = await Driver.create(); await CommonFunc.sleep(500); - await driver.swipe(vp2px(150), vp2px(100), vp2px(100), vp2px(100)); + await driver.swipe(vp2px(180), vp2px(100), vp2px(20), vp2px(100)); //await driver.swipe(250, 230, 200, 230); await CommonFunc.sleep(1000); swiperPadding = CommonFunc.getComponentRect('swiperPadding'); -- GitLab