diff --git a/account/appaccount/actsaccounttest/entry/src/main/js/test/Credential.test.js b/account/appaccount/actsaccounttest/entry/src/main/js/test/Credential.test.js index cf57142461da796fad9cf51db83f4fbd04d9052b..445d0c1272fdcef7277daa3aa77ee71e2eaf9204 100755 --- a/account/appaccount/actsaccounttest/entry/src/main/js/test/Credential.test.js +++ b/account/appaccount/actsaccounttest/entry/src/main/js/test/Credential.test.js @@ -41,6 +41,28 @@ describe('ActsAccountCredential', function () { done(); }) + afterEach(async function (done) { + console.info("====>afterEach enter===="); + var selfBundle = "com.example.actsaccounttest"; + var appAccountManager = account.createAppAccountManager(); + console.info("====>getAllAccounts for clean===="); + try{ + var acclist = await appAccountManager.getAllAccounts(selfBundle); + } + catch(err){ + console.error("====>getAllAccounts err:" + JSON.stringify(err)); + expect().assertFail(); + done(); + } + console.info("====>account list length: " + acclist.length); + if(acclist.length > 0){ + for(var i = 0;i < acclist.length; i++){ + await appAccountManager.deleteAccount(acclist[i].name); + } + } + done(); + }) + /* * @tc.number : ActsAccountCredential_0100 * @tc.name : The correct calls setAssociatedData and getAccountCredential get the credential diff --git a/account/appaccount/actsaccounttest/entry/src/main/js/test/OAuthToken.test.js b/account/appaccount/actsaccounttest/entry/src/main/js/test/OAuthToken.test.js index 82685f048445308d8768bc3b5c4680c8d92ed929..2a1e0a098d47a8b9478ecf3a93474cada68bbcbf 100644 --- a/account/appaccount/actsaccounttest/entry/src/main/js/test/OAuthToken.test.js +++ b/account/appaccount/actsaccounttest/entry/src/main/js/test/OAuthToken.test.js @@ -3385,4 +3385,14 @@ describe('ActsAccountOAuthToken', function () { }); done(); }); -}) +it('ActsAccountOAuthToken_28500', 0, async function (done) { + console.debug("====>ActsAccountOAuthToken_28500 start===="); + var appAccountManager = account.createAppAccountManager(); + var dataInfo = await appAccountManager.getAuthenticatorInfo("com.example.actsaccountOauthtoken").catch((err)=>{ + console.debug("====>ActsAccountOAuthToken_28500 getAuthenticatorInfo err:" + JSON.stringify(err)); + expect(err.code).assertEqual(0); + }); + console.debug("====>ActsAccountOAuthToken_28500 getAuthenticatorInfo dataInfo:" + JSON.stringify(dataInfo)); + done(); + }); +}) \ No newline at end of file