From df5e0a4d5c6b28c803f5a13b34e31bf2c254e3ff Mon Sep 17 00:00:00 2001 From: zhaimengchao Date: Thu, 30 Mar 2023 17:43:06 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90account=E3=80=91=E3=80=90master?= =?UTF-8?q?=E3=80=91=E7=94=A8=E4=BE=8B=E6=89=A7=E8=A1=8C=E6=97=B6=E5=BA=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaimengchao --- .../src/main/js/test/Authenticator.test.js | 2 +- .../src/main/js/test/Authenticator.test.js | 2 +- .../main/js/test/Getaccountsbyowner.test.js | 75 +++++-------------- 3 files changed, 21 insertions(+), 58 deletions(-) diff --git a/account/appaccount/actsaccountoperatetest/src/main/js/test/Authenticator.test.js b/account/appaccount/actsaccountoperatetest/src/main/js/test/Authenticator.test.js index 3c00204c0..a0829fd83 100644 --- a/account/appaccount/actsaccountoperatetest/src/main/js/test/Authenticator.test.js +++ b/account/appaccount/actsaccountoperatetest/src/main/js/test/Authenticator.test.js @@ -47,7 +47,7 @@ export default function ActsAccountAppAccess() { console.debug("====>afterEach start===="); var appAccountManager = account.getAccountManager(); var accounts = await appAccountManager.getAllAccountByOwner(owner) - for (i=0;iafterEach start===="); var appAccountManager = account.getAccountManager(); var accounts = await appAccountManager.getAllAccountByOwner(owner) - for (i=0;istartAbility first start===="); + await featureAbility.startAbility( + { + want: + { + deviceId: "", + bundleName: "com.example.actsscenegetallaccounts", + abilityName: "com.example.actsscenegetallaccounts.MainAbility", + action: "action1", + parameters: + {}, + }, + }, + ); + sleep(TIMEOUT); + done(); + }); + describe('GetAccountsByOwner', function () { async function sleep(delay) { let timeoutId = null; @@ -266,20 +285,6 @@ export default function GetAccountsByOwner() { console.debug("====>creat finish===="); console.debug("====>add account 0900 start===="); await appAccountManager.createAccount("Account_application_callback"); - console.debug("====>startAbility 0900 start===="); - await featureAbility.startAbility( - { - want: - { - deviceId: "", - bundleName: "com.example.actsscenegetallaccounts", - abilityName: "com.example.actsscenegetallaccounts.MainAbility", - action: "action1", - parameters: - {}, - }, - }, - ); function getAllCallback(err, data){ console.debug("====>getAccountsByOwner 0900 err:" + JSON.stringify(err)); console.debug("====>getAccountsByOwner 0900 data:" + JSON.stringify(data)); @@ -310,20 +315,6 @@ export default function GetAccountsByOwner() { console.debug("====>creat finish===="); console.debug("====>add account 1000 start===="); await appAccountManager.createAccount("Account_application_promise"); - console.debug("====>startAbility 1000 start===="); - await featureAbility.startAbility( - { - want: - { - deviceId: "", - bundleName: "com.example.actsscenegetallaccounts", - abilityName: "com.example.actsscenegetallaccounts.MainAbility", - action: "action1", - parameters: - {}, - }, - }, - ); sleep(TIMEOUT) console.debug("====>getAccountsByOwner 1000 start===="); try{ @@ -361,20 +352,6 @@ export default function GetAccountsByOwner() { var appAccountManager = account.createAppAccountManager(); console.debug("====>creat finish===="); var specifiedBundle = "com.example.actsscenegetallaccounts"; - console.debug("====>startAbility 1100 start===="); - await featureAbility.startAbility( - { - want: - { - deviceId: "", - bundleName: "com.example.actsscenegetallaccounts", - abilityName: "com.example.actsscenegetallaccounts.MainAbility", - action: "action1", - parameters: - {}, - }, - }, - ); function getAllCallback(err, data){ console.debug("====>getAccountsByOwner 1100 err:" + JSON.stringify(err)); console.debug("====>getAccountsByOwner 1100 data:" + JSON.stringify(data)); @@ -400,20 +377,6 @@ export default function GetAccountsByOwner() { var appAccountManager = account.createAppAccountManager(); console.debug("====>creat finish===="); var specifiedBundle = "com.example.actsscenegetallaccounts"; - console.debug("====>startAbility 1200 start===="); - await featureAbility.startAbility( - { - want: - { - deviceId: "", - bundleName: "com.example.actsscenegetallaccounts", - abilityName: "com.example.actsscenegetallaccounts.MainAbility", - action: "action1", - parameters: - {}, - }, - }, - ); await sleep(TIMEOUT) console.debug("====>getAccountsByOwner 1200 start===="); try{ -- GitLab