From ea40ef3e0656d0c93691216023c72e0c8d17853a Mon Sep 17 00:00:00 2001 From: gaoxi Date: Sat, 18 Jun 2022 14:35:51 +0800 Subject: [PATCH] hmos update Signed-off-by: gaoxi --- .../entry/src/main/js/test/Credential.test.js | 22 +++++++++++++++++++ .../entry/src/main/js/test/OAuthToken.test.js | 12 +++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) 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 cf5714246..445d0c127 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 82685f048..2a1e0a098 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 -- GitLab