提交 dc3e9ccb 编写于 作者: L lichenchen

账号getAllAccount接口改动xts用例配合修改

Signed-off-by: Nlichenchen <lichenchen15@huawei.com>
上级 5eb35d13
...@@ -148,7 +148,11 @@ export default function ActsAccountErrPermission() { ...@@ -148,7 +148,11 @@ export default function ActsAccountErrPermission() {
expect(err).assertEqual(null); expect(err).assertEqual(null);
appAccountManager.getAllAccounts((err, data)=>{ appAccountManager.getAllAccounts((err, data)=>{
console.debug("====>getAllAccounts 0500 err:" + JSON.stringify(err)); console.debug("====>getAllAccounts 0500 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_PERMISSION_DENIED); console.debug("====>getAllAccounts 0500 data:" + JSON.stringify(data));
expect(err).assertEqual(null);
expect(data.length).assertEqual(1);
expect(data[0].name).assertEqual("accessibleAccount_callback_nopermission");
expect(data[0].owner).assertEqual("com.example.actsaccountoperatetest");
appAccountManager.removeAccount("accessibleAccount_callback_nopermission", (err)=>{ appAccountManager.removeAccount("accessibleAccount_callback_nopermission", (err)=>{
console.debug("====>delete Account ActsAccountErrPermission_0500 err:" + JSON.stringify(err)); console.debug("====>delete Account ActsAccountErrPermission_0500 err:" + JSON.stringify(err));
expect(err).assertEqual(null); expect(err).assertEqual(null);
...@@ -181,6 +185,11 @@ export default function ActsAccountErrPermission() { ...@@ -181,6 +185,11 @@ export default function ActsAccountErrPermission() {
console.debug("====>ActsAccountErrPermission_0600 end===="); console.debug("====>ActsAccountErrPermission_0600 end====");
done(); done();
} }
expect(data.length).assertEqual(1);
expect(data[0].name).assertEqual("accessibleAccount_promise_nopermission");
expect(data[0].owner).assertEqual("com.example.actsaccountoperatetest");
console.debug("====>getAllAccounts 0600 err:" + JSON.stringify(data));
done();
}); });
/* /*
......
...@@ -171,8 +171,9 @@ export default function GetAccountsByOwner() { ...@@ -171,8 +171,9 @@ export default function GetAccountsByOwner() {
console.debug("====>creat finish===="); console.debug("====>creat finish====");
var emptyBundle = ""; var emptyBundle = "";
appAccountManager.getAccountsByOwner(emptyBundle, (err, data)=>{ appAccountManager.getAccountsByOwner(emptyBundle, (err, data)=>{
console.debug("====>getAccountsByOwner 0500 data:" + JSON.stringify(data));
console.debug("====>getAccountsByOwner 0500 err:" + JSON.stringify(err)); console.debug("====>getAccountsByOwner 0500 err:" + JSON.stringify(err));
expect(err.code == 12300002).assertEqual(true); expect(err).assertEqual(null);
console.debug("====>GetAccountsByOwner_0500 end===="); console.debug("====>GetAccountsByOwner_0500 end====");
done(); done();
}) })
...@@ -190,10 +191,11 @@ export default function GetAccountsByOwner() { ...@@ -190,10 +191,11 @@ export default function GetAccountsByOwner() {
var emptyBundle = ""; var emptyBundle = "";
try{ try{
var data = await appAccountManager.getAccountsByOwner(emptyBundle); var data = await appAccountManager.getAccountsByOwner(emptyBundle);
} console.debug("====>getAccountsByOwner 0600 data:" + JSON.stringify(data));
catch(err){ done();
} catch(err) {
console.debug("====>getAccountsByOwner 0600 err:" + JSON.stringify(err)); console.debug("====>getAccountsByOwner 0600 err:" + JSON.stringify(err));
expect(err.code == 12300002).assertEqual(true); expect(err).assertEqual(null);
console.debug("====>GetAccountsByOwner_0600 end===="); console.debug("====>GetAccountsByOwner_0600 end====");
done(); done();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部