提交 4acdc12e 编写于 作者: L limeng

ListItem长距离左滑删除xts用例失败修正

Signed-off-by: Nlimeng <limeng208@huawei.com>
上级 f489e7c3
...@@ -67,32 +67,25 @@ export default function SR000HTP23Test() { ...@@ -67,32 +67,25 @@ export default function SR000HTP23Test() {
console.info(`${SUITE} ${CASE} START`); console.info(`${SUITE} ${CASE} START`);
let baseKey = 'MyList1_ListItem0' let baseKey = 'MyList1_ListItem0'
setTimeout(async () => { let strJson = getInspectorByKey(baseKey);
try { let obj = JSON.parse(strJson);
let strJson = getInspectorByKey(baseKey); expect(obj.$attrs.startDeleteAreaDistance).assertEqual("0.00vp");
let obj = JSON.parse(strJson); expect(obj.$attrs.endDeleteAreaDistance).assertEqual("0.00vp");
expect(obj.$attrs.startDeleteAreaDistance).assertEqual("0.00vp"); // expect(obj.$attrs.swipeAction.edgeEffect).assertEqual("SwipeEdgeEffect.None");
expect(obj.$attrs.endDeleteAreaDistance).assertEqual("0.00vp");
// expect(obj.$attrs.swipeAction.edgeEffect).assertEqual("SwipeEdgeEffect.None"); let rectCenter = getRectCenterVp(obj.$rect)
let driver = Driver.create()
let rectCenter = getRectCenterVp(obj.$rect) await driver.swipe(rectCenter[0], rectCenter[1], 0, rectCenter[1])
let driver = Driver.create()
await driver.swipe(rectCenter[0], rectCenter[1], 0, rectCenter[1]) let strJsonButtonDel = getInspectorByKey(baseKey + '_Button_Del');
let objButtonDel = JSON.parse(strJsonButtonDel);
let strJsonButtonDel = getInspectorByKey(baseKey + '_Button_Del'); expect(objButtonDel.$attrs.visibility).assertEqual("Visibility.Visible");
let objButtonDel = JSON.parse(strJsonButtonDel); let strJsonButtonSet = getInspectorByKey(baseKey + '_Button_Set');
expect(objButtonDel.$attrs.visibility).assertEqual("Visibility.Visible"); let objButtonSet = JSON.parse(strJsonButtonSet);
let strJsonButtonSet = getInspectorByKey(baseKey + '_Button_Set'); expect(objButtonSet.$attrs.visibility).assertEqual("Visibility.Visible");
let objButtonSet = JSON.parse(strJsonButtonSet);
expect(objButtonSet.$attrs.visibility).assertEqual("Visibility.Visible"); console.info(`${SUITE} ${CASE} END`);
done();
console.info(`${SUITE} ${CASE} END`);
} catch (err) {
expect().assertFail();
console.info(`${SUITE} ${CASE} ERROR:` + JSON.stringify(err));
}
done();
}, 500)
}); });
/* /*
...@@ -105,32 +98,25 @@ export default function SR000HTP23Test() { ...@@ -105,32 +98,25 @@ export default function SR000HTP23Test() {
console.info(`${SUITE} ${CASE} START`); console.info(`${SUITE} ${CASE} START`);
let baseKey = 'MyList2_ListItem0' let baseKey = 'MyList2_ListItem0'
setTimeout(async () => { let strJson = getInspectorByKey(baseKey);
try { let obj = JSON.parse(strJson);
let strJson = getInspectorByKey(baseKey); expect(obj.$attrs.startDeleteAreaDistance).assertEqual("0.00vp");
let obj = JSON.parse(strJson); expect(obj.$attrs.endDeleteAreaDistance).assertEqual("0.00vp");
expect(obj.$attrs.startDeleteAreaDistance).assertEqual("0.00vp"); // expect(obj.$attrs.swipeAction.edgeEffect).assertEqual("SwipeEdgeEffect.None");
expect(obj.$attrs.endDeleteAreaDistance).assertEqual("0.00vp");
// expect(obj.$attrs.swipeAction.edgeEffect).assertEqual("SwipeEdgeEffect.None"); let rectCenter = getRectCenterVp(obj.$rect)
let driver = Driver.create()
let rectCenter = getRectCenterVp(obj.$rect) await driver.swipe(rectCenter[0], rectCenter[1], 600, rectCenter[1])
let driver = Driver.create()
await driver.swipe(rectCenter[0], rectCenter[1], 600, rectCenter[1]) let strJsonButtonDel = getInspectorByKey(baseKey + '_Button_Del');
let objButtonDel = JSON.parse(strJsonButtonDel);
let strJsonButtonDel = getInspectorByKey(baseKey + '_Button_Del'); expect(objButtonDel.$attrs.visibility).assertEqual("Visibility.Visible");
let objButtonDel = JSON.parse(strJsonButtonDel); let strJsonButtonSet = getInspectorByKey(baseKey + '_Button_Set');
expect(objButtonDel.$attrs.visibility).assertEqual("Visibility.Visible"); let objButtonSet = JSON.parse(strJsonButtonSet);
let strJsonButtonSet = getInspectorByKey(baseKey + '_Button_Set'); expect(objButtonSet.$attrs.visibility).assertEqual("Visibility.Visible");
let objButtonSet = JSON.parse(strJsonButtonSet);
expect(objButtonSet.$attrs.visibility).assertEqual("Visibility.Visible"); console.info(`${SUITE} ${CASE} END`);
done();
console.info(`${SUITE} ${CASE} END`);
} catch (err) {
expect().assertFail();
console.info(`${SUITE} ${CASE} ERROR:` + JSON.stringify(err));
}
done();
}, 500)
}); });
/* /*
...@@ -143,32 +129,25 @@ export default function SR000HTP23Test() { ...@@ -143,32 +129,25 @@ export default function SR000HTP23Test() {
console.info(`${SUITE} ${CASE} START`); console.info(`${SUITE} ${CASE} START`);
let baseKey = 'MyList3_ListItem0' let baseKey = 'MyList3_ListItem0'
setTimeout(async () => { let strJson = getInspectorByKey(baseKey);
try { let obj = JSON.parse(strJson);
let strJson = getInspectorByKey(baseKey); expect(obj.$attrs.startDeleteAreaDistance).assertEqual("0.00vp");
let obj = JSON.parse(strJson); expect(obj.$attrs.endDeleteAreaDistance).assertEqual("0.00vp");
expect(obj.$attrs.startDeleteAreaDistance).assertEqual("0.00vp"); expect(obj.$attrs.swipeAction.edgeEffect).assertEqual("SwipeEdgeEffect.Spring");
expect(obj.$attrs.endDeleteAreaDistance).assertEqual("0.00vp");
expect(obj.$attrs.swipeAction.edgeEffect).assertEqual("SwipeEdgeEffect.Spring"); let rectCenter = getRectCenterVp(obj.$rect)
let driver = Driver.create()
let rectCenter = getRectCenterVp(obj.$rect) await driver.swipe(rectCenter[0], rectCenter[1], 0, rectCenter[1])
let driver = Driver.create()
await driver.swipe(rectCenter[0], rectCenter[1], 0, rectCenter[1]) let strJsonButtonDel = getInspectorByKey(baseKey + '_Button_Del');
let objButtonDel = JSON.parse(strJsonButtonDel);
let strJsonButtonDel = getInspectorByKey(baseKey + '_Button_Del'); expect(objButtonDel.$attrs.visibility).assertEqual("Visibility.Visible");
let objButtonDel = JSON.parse(strJsonButtonDel); let strJsonButtonSet = getInspectorByKey(baseKey + '_Button_Set');
expect(objButtonDel.$attrs.visibility).assertEqual("Visibility.Visible"); let objButtonSet = JSON.parse(strJsonButtonSet);
let strJsonButtonSet = getInspectorByKey(baseKey + '_Button_Set'); expect(objButtonSet.$attrs.visibility).assertEqual("Visibility.Visible");
let objButtonSet = JSON.parse(strJsonButtonSet);
expect(objButtonSet.$attrs.visibility).assertEqual("Visibility.Visible"); console.info(`${SUITE} ${CASE} END`);
done();
console.info(`${SUITE} ${CASE} END`);
} catch (err) {
expect().assertFail();
console.info(`${SUITE} ${CASE} ERROR:` + JSON.stringify(err));
}
done();
}, 500)
}); });
/* /*
...@@ -181,32 +160,25 @@ export default function SR000HTP23Test() { ...@@ -181,32 +160,25 @@ export default function SR000HTP23Test() {
console.info(`${SUITE} ${CASE} START`); console.info(`${SUITE} ${CASE} START`);
let baseKey = 'MyList4_ListItem0' let baseKey = 'MyList4_ListItem0'
setTimeout(async () => { let strJson = getInspectorByKey(baseKey);
try { let obj = JSON.parse(strJson);
let strJson = getInspectorByKey(baseKey); expect(obj.$attrs.startDeleteAreaDistance).assertEqual("0.00vp");
let obj = JSON.parse(strJson); expect(obj.$attrs.endDeleteAreaDistance).assertEqual("0.00vp");
expect(obj.$attrs.startDeleteAreaDistance).assertEqual("0.00vp"); expect(obj.$attrs.swipeAction.edgeEffect).assertEqual("SwipeEdgeEffect.Spring");
expect(obj.$attrs.endDeleteAreaDistance).assertEqual("0.00vp");
expect(obj.$attrs.swipeAction.edgeEffect).assertEqual("SwipeEdgeEffect.Spring"); let rectCenter = getRectCenterVp(obj.$rect)
let driver = Driver.create()
let rectCenter = getRectCenterVp(obj.$rect) await driver.swipe(0, rectCenter[1], rectCenter[0], rectCenter[1])
let driver = Driver.create()
await driver.swipe(0, rectCenter[1], rectCenter[0], rectCenter[1]) let strJsonButtonDel = getInspectorByKey(baseKey + '_Button_Del');
let objButtonDel = JSON.parse(strJsonButtonDel);
let strJsonButtonDel = getInspectorByKey(baseKey + '_Button_Del'); expect(objButtonDel.$attrs.visibility).assertEqual("Visibility.Visible");
let objButtonDel = JSON.parse(strJsonButtonDel); let strJsonButtonSet = getInspectorByKey(baseKey + '_Button_Set');
expect(objButtonDel.$attrs.visibility).assertEqual("Visibility.Visible"); let objButtonSet = JSON.parse(strJsonButtonSet);
let strJsonButtonSet = getInspectorByKey(baseKey + '_Button_Set'); expect(objButtonSet.$attrs.visibility).assertEqual("Visibility.Visible");
let objButtonSet = JSON.parse(strJsonButtonSet);
expect(objButtonSet.$attrs.visibility).assertEqual("Visibility.Visible"); console.info(`${SUITE} ${CASE} END`);
done();
console.info(`${SUITE} ${CASE} END`);
} catch (err) {
expect().assertFail();
console.info(`${SUITE} ${CASE} ERROR:` + JSON.stringify(err));
}
done();
}, 500)
}); });
/* /*
......
...@@ -62,7 +62,6 @@ export default function SR000HTP2OTest() { ...@@ -62,7 +62,6 @@ export default function SR000HTP2OTest() {
console.info(`${SUITE} ${CASE} START`) console.info(`${SUITE} ${CASE} START`)
let strJson = getInspectorByKey('SR000HTP2O_Navigation1') let strJson = getInspectorByKey('SR000HTP2O_Navigation1')
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
sleep(2)
expect(obj.$type).assertEqual('Navigation') expect(obj.$type).assertEqual('Navigation')
console.info(`${SUITE} ${CASE} END`) console.info(`${SUITE} ${CASE} END`)
done() done()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册