From 5c24b16be0af08d50974a6b430926960a353cd47 Mon Sep 17 00:00:00 2001 From: gwx1146427 Date: Tue, 14 Mar 2023 20:46:32 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90account=E3=80=91=E3=80=90OpenHarmony-3?= =?UTF-8?q?.2-Release=E3=80=91=E7=B3=BB=E7=BB=9F=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E8=B6=85=E6=97=B6=E5=92=8C=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gwx1146427 --- .../src/main/js/test/ChangeOnOff.js | 4 ++++ .../src/main/js/test/List.test.js | 2 +- .../actsaccounttest/src/main/js/test/List.test.js | 2 +- .../actsaccounttest/src/main/js/test/OnOff.js | 14 ++++++++++++++ .../entry/src/main/js/default/pages/index/index.js | 12 +++++++----- 5 files changed, 27 insertions(+), 7 deletions(-) mode change 100755 => 100644 account/appaccount/actsaccounttest/src/main/js/test/List.test.js mode change 100755 => 100644 account/appaccount/sceneProject/actsaccountsceneonoff/entry/src/main/js/default/pages/index/index.js diff --git a/account/appaccount/actsaccountoperatetest/src/main/js/test/ChangeOnOff.js b/account/appaccount/actsaccountoperatetest/src/main/js/test/ChangeOnOff.js index a5b5cf93c..33979c5cb 100644 --- a/account/appaccount/actsaccountoperatetest/src/main/js/test/ChangeOnOff.js +++ b/account/appaccount/actsaccountoperatetest/src/main/js/test/ChangeOnOff.js @@ -60,6 +60,7 @@ export default function ActsAccountOnOff() { */ it('ActsAccountOnOff_0300', 0, async function (done) { testInit(); + await sleep(500); console.debug("====>ActsAccountOnOff_0300 start===="); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); @@ -124,6 +125,7 @@ export default function ActsAccountOnOff() { */ it('ActsAccountOnOff_0400', 0, async function (done) { testInit(); + await sleep(500); console.debug("====>ActsAccountOnOff_0400 start===="); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); @@ -192,6 +194,7 @@ export default function ActsAccountOnOff() { */ it('ActsAccountOnOff_0500', 0, async function (done) { testInit(); + await sleep(500); console.debug("====>ActsAccountOnOff_0500 start===="); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); @@ -251,6 +254,7 @@ export default function ActsAccountOnOff() { */ it('ActsAccountOnOff_0600', 0, async function (done) { testInit(); + await sleep(500); console.debug("====>ActsAccountOnOff_0600 start===="); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); diff --git a/account/appaccount/actsaccountoperatetest/src/main/js/test/List.test.js b/account/appaccount/actsaccountoperatetest/src/main/js/test/List.test.js index edf602357..ebfe6a1b1 100644 --- a/account/appaccount/actsaccountoperatetest/src/main/js/test/List.test.js +++ b/account/appaccount/actsaccountoperatetest/src/main/js/test/List.test.js @@ -32,7 +32,7 @@ export default function testsuite() { ActsAccountRemoveAccount() ActsAccountErrPermission() ActsAccountAuthToken() - ActsAccountOnOff() ActsAccountAuthenticator() ActsAccountErrCode() + ActsAccountOnOff() } \ No newline at end of file diff --git a/account/appaccount/actsaccounttest/src/main/js/test/List.test.js b/account/appaccount/actsaccounttest/src/main/js/test/List.test.js old mode 100755 new mode 100644 index 649bd9330..3396de320 --- a/account/appaccount/actsaccounttest/src/main/js/test/List.test.js +++ b/account/appaccount/actsaccounttest/src/main/js/test/List.test.js @@ -33,6 +33,6 @@ export default function testsuite() { ActsAccountSetGetExtraInfo() ActsAccountNoPermission() ActsAccountOAuthToken() - ActsAccountChangeOnOff() ActsAccountAuthenticator() + ActsAccountChangeOnOff() } \ No newline at end of file diff --git a/account/appaccount/actsaccounttest/src/main/js/test/OnOff.js b/account/appaccount/actsaccounttest/src/main/js/test/OnOff.js index b04f0b29c..ac696ae56 100644 --- a/account/appaccount/actsaccounttest/src/main/js/test/OnOff.js +++ b/account/appaccount/actsaccounttest/src/main/js/test/OnOff.js @@ -60,6 +60,7 @@ export default function ActsAccountChangeOnOff() { */ it('ActsAccountChangeOnOff_0100', 0, async function (done) { testInit(); + await sleep(1000); console.debug("====>ActsAccountChangeOnOff_0100 start===="); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); @@ -129,6 +130,7 @@ export default function ActsAccountChangeOnOff() { */ it('ActsAccountChangeOnOff_0200', 0, async function (done) { testInit(); + await sleep(1000); console.debug("====>ActsAccountChangeOnOff_0200 start===="); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); @@ -193,6 +195,7 @@ export default function ActsAccountChangeOnOff() { */ it('ActsAccountChangeOnOff_0300', 0, async function (done) { testInit(); + await sleep(1000); console.debug("====>ActsAccountChangeOnOff_0300 start===="); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); @@ -257,6 +260,7 @@ export default function ActsAccountChangeOnOff() { */ it('ActsAccountChangeOnOff_0400', 0, async function (done) { testInit(); + await sleep(1000); console.debug("====>ActsAccountChangeOnOff_0400 start===="); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); @@ -325,6 +329,7 @@ export default function ActsAccountChangeOnOff() { */ it('ActsAccountChangeOnOff_0500', 0, async function (done) { testInit(); + await sleep(1000); console.debug("====>ActsAccountChangeOnOff_0500 start===="); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); @@ -384,6 +389,7 @@ export default function ActsAccountChangeOnOff() { */ it('ActsAccountChangeOnOff_0600', 0, async function (done) { testInit(); + await sleep(1000); console.debug("====>ActsAccountChangeOnOff_0600 start===="); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); @@ -456,6 +462,7 @@ export default function ActsAccountChangeOnOff() { */ it('ActsAccountChangeOnOff_0700', 0, async function (done) { testInit(); + await sleep(1000); console.debug("====>ActsAccountChangeOnOff_0700 start===="); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); @@ -520,6 +527,7 @@ export default function ActsAccountChangeOnOff() { it('ActsAccountChangeOnOff_0800', 0, async function (done) { console.debug("====>ActsAccountChangeOnOff_0800 start===="); let dataMap = new Map(); + await sleep(1000); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); console.debug("====>add account ActsAccountChangeOnOff_0800 start"); @@ -575,6 +583,7 @@ export default function ActsAccountChangeOnOff() { it('ActsAccountChangeOnOff_0900', 0, async function (done) { console.debug("====>ActsAccountChangeOnOff_0900 start===="); let dataMap = new Map(); + await sleep(1000); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); console.debug("====>add first account ActsAccountChangeOnOff_0900 start"); @@ -642,6 +651,7 @@ export default function ActsAccountChangeOnOff() { console.debug("====>ActsAccountChangeOnOff_1000 start===="); let dataMapFir = new Map(); let dataMapSec = new Map(); + await sleep(1000); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); console.debug("====>add account ActsAccountChangeOnOff_1000 start"); @@ -718,6 +728,7 @@ export default function ActsAccountChangeOnOff() { it('ActsAccountChangeOnOff_1100', 0, async function (done) { console.debug("====>ActsAccountChangeOnOff_1100 start===="); let dataMap = new Map(); + await sleep(1000); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); console.debug("====>add account ActsAccountChangeOnOff_1100 start"); @@ -778,6 +789,7 @@ export default function ActsAccountChangeOnOff() { it('ActsAccountChangeOnOff_1200', 0, async function (done) { console.debug("====>ActsAccountChangeOnOff_1200 start===="); let dataMap = new Map(); + await sleep(1000); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); console.debug("====>add account ActsAccountChangeOnOff_1200 start"); @@ -838,6 +850,7 @@ export default function ActsAccountChangeOnOff() { */ it('ActsAccountChangeOnOff_1300', 0, async function (done) { console.debug("====>ActsAccountChangeOnOff_1300 start===="); + await sleep(1000); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); console.debug("====>add account ActsAccountChangeOnOff_1300 start"); @@ -884,6 +897,7 @@ export default function ActsAccountChangeOnOff() { */ it('ActsAccountChangeOnOff_1400', 0, async function (done) { console.debug("====>ActsAccountChangeOnOff_1400 start===="); + await sleep(1000); var appAccountManager = account.createAppAccountManager(); console.debug("====>creat appAccountManager finish"); console.debug("====>add account ActsAccountChangeOnOff_1400 start"); diff --git a/account/appaccount/sceneProject/actsaccountsceneonoff/entry/src/main/js/default/pages/index/index.js b/account/appaccount/sceneProject/actsaccountsceneonoff/entry/src/main/js/default/pages/index/index.js old mode 100755 new mode 100644 index 669177e2b..f68c91678 --- a/account/appaccount/sceneProject/actsaccountsceneonoff/entry/src/main/js/default/pages/index/index.js +++ b/account/appaccount/sceneProject/actsaccountsceneonoff/entry/src/main/js/default/pages/index/index.js @@ -36,9 +36,10 @@ export default { data: { }, onShow() { - this.title = "scene on off"; + // this.title = "scene on off"; }, onInit() { + this.title = "scene on off"; console.debug("====>change on off scene start===="); var appAccountManager = account.createAppAccountManager(); var commonEventSubscribeInfo = { @@ -51,11 +52,12 @@ export default { console.debug("====>publish call back scene err:" + JSON.stringify(err)); console.debug("====>scene off start===="); appAccountManager.off('accountChange', function (){ - appAccountManager.off('change', function (){ - console.debug("====>scene off finish===="); - }); + console.debug("====>scene off accountChange finish===="); + }); + appAccountManager.off('change', function (){ + console.debug("====>scene off change finish===="); }); - // featureAbility.terminateSelf() + featureAbility.terminateSelf() } // Subscribe to the callback of account information changes, verify the received account information, and send -- GitLab