未验证 提交 842cbcb4 编写于 作者: O openharmony_ci 提交者: Gitee

!9465 修复Swiper XTS用例失败

Merge pull request !9465 from 胡清云/bugfix_xts_0725
...@@ -417,7 +417,7 @@ export default function swiperJsunit() { ...@@ -417,7 +417,7 @@ export default function swiperJsunit() {
let strJsonNew = getInspectorByKey('swiper'); let strJsonNew = getInspectorByKey('swiper');
let objNew = JSON.parse(strJsonNew); let objNew = JSON.parse(strJsonNew);
console.info("swiperTest_1700 component objNew is: " + JSON.stringify(objNew)); 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'); console.info('swiperTest_1700 END');
done(); done();
}); });
......
...@@ -66,7 +66,7 @@ export default function swiperItemSize() { ...@@ -66,7 +66,7 @@ export default function swiperItemSize() {
let driver = await Driver.create(); let driver = await Driver.create();
//await driver.swipe(250, 230, 200, 230); //await driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(500); 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); await CommonFunc.sleep(1000);
// After flipping the page. // After flipping the page.
itemSizekey = CommonFunc.getComponentRect('itemSizekey'); itemSizekey = CommonFunc.getComponentRect('itemSizekey');
......
...@@ -67,7 +67,7 @@ export default function swiperItemVisibility() { ...@@ -67,7 +67,7 @@ export default function swiperItemVisibility() {
expect(visiblekey.bottom).assertEqual(visiblekey01.bottom); expect(visiblekey.bottom).assertEqual(visiblekey01.bottom);
let driver = await Driver.create(); let driver = await Driver.create();
await CommonFunc.sleep(500); 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 driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000); await CommonFunc.sleep(1000);
// 翻页后子组件2大小及位置与父组件一致,翻页成功 // 翻页后子组件2大小及位置与父组件一致,翻页成功
...@@ -118,7 +118,7 @@ export default function swiperItemVisibility() { ...@@ -118,7 +118,7 @@ export default function swiperItemVisibility() {
expect(visiblekey.bottom).assertEqual(visiblekey05.bottom); expect(visiblekey.bottom).assertEqual(visiblekey05.bottom);
let driver = await Driver.create(); let driver = await Driver.create();
await CommonFunc.sleep(500); 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 driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000); await CommonFunc.sleep(1000);
// 翻页后子组件6大小及位置与父组件一致,翻页成功 // 翻页后子组件6大小及位置与父组件一致,翻页成功
...@@ -169,7 +169,7 @@ export default function swiperItemVisibility() { ...@@ -169,7 +169,7 @@ export default function swiperItemVisibility() {
visiblekey03 = CommonFunc.getComponentRect('visiblekey03'); visiblekey03 = CommonFunc.getComponentRect('visiblekey03');
let driver = await Driver.create(); let driver = await Driver.create();
await CommonFunc.sleep(500); 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 driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000); await CommonFunc.sleep(1000);
// 翻页后子组件4大小及位置与父组件一致,翻页成功 // 翻页后子组件4大小及位置与父组件一致,翻页成功
......
...@@ -68,7 +68,7 @@ export default function swiperDisableSwipeFalse() { ...@@ -68,7 +68,7 @@ export default function swiperDisableSwipeFalse() {
expect(disableFalse.bottom).assertEqual(disableFalse01.bottom); expect(disableFalse.bottom).assertEqual(disableFalse01.bottom);
let driver = await Driver.create(); let driver = await Driver.create();
await CommonFunc.sleep(500); 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 driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000); await CommonFunc.sleep(1000);
// After flipping the page. // After flipping the page.
......
...@@ -74,7 +74,7 @@ export default function swiperItemSpace() { ...@@ -74,7 +74,7 @@ export default function swiperItemSpace() {
let driver = await Driver.create(); let driver = await Driver.create();
await CommonFunc.sleep(500); 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 driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000); await CommonFunc.sleep(1000);
itemspacekey = CommonFunc.getComponentRect('itemspacekey'); itemspacekey = CommonFunc.getComponentRect('itemspacekey');
...@@ -139,7 +139,7 @@ export default function swiperItemSpace() { ...@@ -139,7 +139,7 @@ export default function swiperItemSpace() {
// After flipping the page. // After flipping the page.
let driver = await Driver.create(); let driver = await Driver.create();
await CommonFunc.sleep(500); 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 driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000); await CommonFunc.sleep(1000);
itemspacekey = CommonFunc.getComponentRect('itemspacekey'); itemspacekey = CommonFunc.getComponentRect('itemspacekey');
......
...@@ -69,7 +69,7 @@ export default function swiperMarPad() { ...@@ -69,7 +69,7 @@ export default function swiperMarPad() {
let driver = await Driver.create(); let driver = await Driver.create();
await CommonFunc.sleep(500) await CommonFunc.sleep(500)
//await driver.swipe(250, 230, 200, 230); //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); await CommonFunc.sleep(1000);
swiperMarPad = CommonFunc.getComponentRect('swiperMarPad'); swiperMarPad = CommonFunc.getComponentRect('swiperMarPad');
swiperMarPad01 = CommonFunc.getComponentRect('swiperMarPad01'); swiperMarPad01 = CommonFunc.getComponentRect('swiperMarPad01');
......
...@@ -70,7 +70,7 @@ export default function swiperMargin() { ...@@ -70,7 +70,7 @@ export default function swiperMargin() {
let driver = await Driver.create(); let driver = await Driver.create();
await CommonFunc.sleep(500); await CommonFunc.sleep(500);
//await driver.swipe(250, 230, 200, 230); //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); await CommonFunc.sleep(1000);
swiperMargin = CommonFunc.getComponentRect('swiperMargin'); swiperMargin = CommonFunc.getComponentRect('swiperMargin');
swiperMargin01 = CommonFunc.getComponentRect('swiperMargin01'); swiperMargin01 = CommonFunc.getComponentRect('swiperMargin01');
......
...@@ -68,7 +68,7 @@ export default function swiperPadding() { ...@@ -68,7 +68,7 @@ export default function swiperPadding() {
// Page turning. // Page turning.
let driver = await Driver.create(); let driver = await Driver.create();
await CommonFunc.sleep(500); 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 driver.swipe(250, 230, 200, 230);
await CommonFunc.sleep(1000); await CommonFunc.sleep(1000);
swiperPadding = CommonFunc.getComponentRect('swiperPadding'); swiperPadding = CommonFunc.getComponentRect('swiperPadding');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册