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

!7770 电话用例整改,适配错误码

Merge pull request !7770 from zhangfuzhi/monthly_20221018
......@@ -57,11 +57,11 @@ export default function ObjectInterfaceTest() {
afterAll(async function () {
contact.queryContacts((err, data) => {
if (err) {
console.info("contactsApi_selectContact_test_100 err = " + JSON.stringify(err));
console.info("afterAll err = " + JSON.stringify(err));
expect(false).assertTrue();
return;
}
console.info("contactsApi_selectContact_test_100 data = " + JSON.stringify(data));
console.info("afterAll data = " + JSON.stringify(data));
if (data.length == 0) {
return;
}
......@@ -70,7 +70,7 @@ export default function ObjectInterfaceTest() {
promise.then(() => {
console.info("deleteContact success");
}).catch((err) => {
console.info("contactsApi_selectContact_test_100 err = " + JSON.stringify(err));
console.info("afterAll err = " + JSON.stringify(err));
});
}
sleep(3000);
......@@ -1530,12 +1530,12 @@ export default function ObjectInterfaceTest() {
done();
});
});
}).catch((err) => {
console.info("contactsApi_updateContact_test_300 err = " + JSON.stringify(err));
expect(false).assertTrue();
done();
return;
});
}).catch((err) => {
console.info("contactsApi_updateContact_test_300 err = " + JSON.stringify(err));
expect(false).assertTrue();
done();
return;
});
});
sleep(500);
......@@ -1673,11 +1673,11 @@ export default function ObjectInterfaceTest() {
contact.selectContact((err, data) => {
if (err) {
console.info("contactsApi_selectContact_test_100 err = " + JSON.stringify(err));
expect(false).assertTrue();
done();
return;
}
console.info("contactsApi_selectContact_test_100 data = " + JSON.stringify(data));
expect(false).assertTrue();
done();
});
});
......@@ -1685,10 +1685,10 @@ export default function ObjectInterfaceTest() {
it("contactsApi_selectContact_test_200", 0, async function (done) {
let promise = contact.selectContact();
promise.then((data) => {
console.info("contactsApi_selectContact_test_100 data = " + JSON.stringify(data));
console.info("contactsApi_selectContact_test_200 data = " + JSON.stringify(data));
done();
}).catch((err) => {
console.info("contactsApi_selectContact_test_100 err = " + JSON.stringify(err));
console.info("contactsApi_selectContact_test_200 err = " + JSON.stringify(err));
expect(false).assertTrue();
done();
});
......
......@@ -32,7 +32,7 @@ describe("Telephony_NetManager_NetWorkTest", function () {
},
fail : function(data,code){
console.info("NetManager code "+ code);
expect(code == 602).assertTrue();
expect(code == 201).assertTrue();
done();
},
complete : function(){
......@@ -53,7 +53,7 @@ describe("Telephony_NetManager_NetWorkTest", function () {
},
fail : function(data,code){
console.info("NetManager code "+ code);
expect(code == 602).assertTrue();
expect(code == 201).assertTrue();
done();
},
complete : function(){
......@@ -74,7 +74,7 @@ describe("Telephony_NetManager_NetWorkTest", function () {
},
fail : function(data,code){
console.info("NetManager code "+ code);
expect(code == 602).assertTrue();
expect(code == 201).assertTrue();
done();
}
});
......@@ -93,7 +93,7 @@ describe("Telephony_NetManager_NetWorkTest", function () {
},
fail : function(data,code){
console.info("NetManager code "+ code);
expect(code == 602).assertTrue();
expect(code == 201).assertTrue();
done();
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册