diff --git a/account/appaccount/actsaccountoperatetest/src/main/js/test/ErrPermission.test.js b/account/appaccount/actsaccountoperatetest/src/main/js/test/ErrPermission.test.js index a6f1061732e797ea114834b5895743120753558a..f3112b54978fe57419c6525d5f92beac4d0fca20 100644 --- a/account/appaccount/actsaccountoperatetest/src/main/js/test/ErrPermission.test.js +++ b/account/appaccount/actsaccountoperatetest/src/main/js/test/ErrPermission.test.js @@ -148,7 +148,11 @@ export default function ActsAccountErrPermission() { expect(err).assertEqual(null); appAccountManager.getAllAccounts((err, data)=>{ 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)=>{ console.debug("====>delete Account ActsAccountErrPermission_0500 err:" + JSON.stringify(err)); expect(err).assertEqual(null); @@ -181,6 +185,11 @@ export default function ActsAccountErrPermission() { console.debug("====>ActsAccountErrPermission_0600 end===="); 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(); }); /* diff --git a/account/appaccount/actsgetaccountsbyowner/src/main/js/test/Getaccountsbyowner.test.js b/account/appaccount/actsgetaccountsbyowner/src/main/js/test/Getaccountsbyowner.test.js index 07e7c355e13d71068d109fc39757272c1784b4c5..0decb4a21cd12797751295eb5afda3fb8d98fd9b 100644 --- a/account/appaccount/actsgetaccountsbyowner/src/main/js/test/Getaccountsbyowner.test.js +++ b/account/appaccount/actsgetaccountsbyowner/src/main/js/test/Getaccountsbyowner.test.js @@ -171,8 +171,9 @@ export default function GetAccountsByOwner() { console.debug("====>creat finish===="); var emptyBundle = ""; appAccountManager.getAccountsByOwner(emptyBundle, (err, data)=>{ + console.debug("====>getAccountsByOwner 0500 data:" + JSON.stringify(data)); console.debug("====>getAccountsByOwner 0500 err:" + JSON.stringify(err)); - expect(err.code == 12300002).assertEqual(true); + expect(err).assertEqual(null); console.debug("====>GetAccountsByOwner_0500 end===="); done(); }) @@ -190,10 +191,11 @@ export default function GetAccountsByOwner() { var emptyBundle = ""; try{ var data = await appAccountManager.getAccountsByOwner(emptyBundle); - } - catch(err){ + console.debug("====>getAccountsByOwner 0600 data:" + JSON.stringify(data)); + done(); + } catch(err) { console.debug("====>getAccountsByOwner 0600 err:" + JSON.stringify(err)); - expect(err.code == 12300002).assertEqual(true); + expect(err).assertEqual(null); console.debug("====>GetAccountsByOwner_0600 end===="); done(); }