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

!9465 修复Swiper XTS用例失败

Merge pull request !9465 from 胡清云/bugfix_xts_0725
......@@ -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();
});
......
......@@ -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');
......
......@@ -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大小及位置与父组件一致,翻页成功
......
......@@ -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.
......
......@@ -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');
......
......@@ -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');
......
......@@ -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');
......
......@@ -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');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册