From 75dc8c8e4ed9dad0cc8c4f09c822fcb9238e9414 Mon Sep 17 00:00:00 2001 From: gwx1146427 Date: Fri, 10 Mar 2023 16:58:00 +0800 Subject: [PATCH] =?UTF-8?q?fixed=209d14d9e=20from=20https://gitee.com/gwx1?= =?UTF-8?q?146427/xts=5Facts/pulls/7903=20=E3=80=90account=E3=80=91?= =?UTF-8?q?=E3=80=90master=E3=80=91=E4=BF=AE=E6=94=B9=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E6=9D=83=E9=99=90=E5=92=8Capi=E7=BB=88=E5=AE=A1=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gwx1146427 --- .../signature/openharmony_sx.p7b | Bin 3710 -> 3690 bytes .../src/main/config.json | 4 + .../src/main/js/test/Authenticator.test.js | 9 +- .../signature/openharmony_sx.p7b | Bin 3703 -> 3683 bytes .../actsaccounttest/src/main/config.json | 4 + .../src/main/js/test/Authenticator.test.js | 13 +- .../entry/src/main/js/Common/utils.js | 4 +- .../src/main/js/ServiceAbility/service.js | 2 +- .../src/main/js/test/OsAccountQuery.test.js | 112 +++++++++--------- 9 files changed, 80 insertions(+), 68 deletions(-) mode change 100755 => 100644 account/appaccount/actsaccounttest/signature/openharmony_sx.p7b diff --git a/account/appaccount/actsaccountoperatetest/signature/openharmony_sx.p7b b/account/appaccount/actsaccountoperatetest/signature/openharmony_sx.p7b index 078b44ea6250a6a1a955cf3fdcfac4b435d49843..bf24b0686f03588c0c2d07fe81646c1536579443 100644 GIT binary patch delta 1393 zcmZ8hTZkJ~7$#|wc9mUPLFg5iDSfDHc26$TCPmRR*G!s|$t06xCq}lDWM*=i%*@VA zc4o6k+y(bVDwOyj^rhm9pinQ+7m-q`f>7GWB8c`uUwjZOSP?;;>}rd?95~_TGcF<{8U0KgKRUb*l5)21Xmm+&$qH!C624X zapn5aBbd8s&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JIh5@%ME@s$`MUMI}`IwsbzY+<)RW1uSZLx&ZuR^U5Y21Qyuep1hxf0 zmwDJmtVqRo>w1aK}krB z8kOV#mteV8N!j&@j!MYMh+Y`S!T$flU^5LZxw76?1Z~*pKu(kZPC3*Fb@>tEnoeCu zQaORT>#~QA_tEE!KdKhq=R$ZTk{NYKtw`q|v#x)5N2@>FFM<}6q5~#euvO7Xu_r4rH4X6x& zLbAI!lv)|Y3DHKJmD)Qi<#8q*?KWdI(P{UZ^dj!DJx6bLS9fL6zKo!&|e6Lvu? zoG}_HEt_rQcud#(qZPb5sj6m7+{%=?@)-6Jq}=`#P8BN<7R6Owv#fzddPSg}OSKnS zJC`!e?y#HX_7{>aA|7-BKp?)aba)tbME8HERSrn*($b|eU)MPf zs!*LcF2I9ovH^^29EgZ#IUtbfA*=Evt>JCK-9cT40I`5k0TRkA64}Kn1`V2_mBeDrn-xLYw39VHU!>KMgj*Z=RGU+%ZF7(+7sp~<7u9}jMK7$jI?19_HdsnH)%oaSY#8~W{Gw1m>$|$aR~A?acymO zA@J;D4=i-g`m<|+Q^+;BM*Kv)X!c~yHJa=C7MAUSXV^%ac-4px@#0kbEA%fxdq7$xsc@DzDJ3%)=K6PNZnmV0+x-Ry2~{$%*ovu-Ma4m|(6 z{_T1G)kh!4LVtvUfSUT&X3KLQP8gb@Rw!~hn0SqfJ~(TK0(2x0-n;X(a{c@HUyt6s z^4q10*JJP0zX;#{PWh;GO1SpZ8yDuO!=Z!ZV1Bt4IN%Qm6z^Yn=;o(?)ovWddtc4H z&-1VRa_rqJm#=A0U7COIlZ&Ubx1Yb|59^O#U3mMgH)s6U(W7UN-3Wg${ru-2u0M17 O&dt{G-;aFrZS)^TC(eNY diff --git a/account/appaccount/actsaccountoperatetest/src/main/config.json b/account/appaccount/actsaccountoperatetest/src/main/config.json index c30611b15..e90aa7db8 100644 --- a/account/appaccount/actsaccountoperatetest/src/main/config.json +++ b/account/appaccount/actsaccountoperatetest/src/main/config.json @@ -45,6 +45,10 @@ { "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" + }, + { + "name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND", + "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ], "abilities": [ 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 e1bce4553..43345b7b3 100644 --- a/account/appaccount/actsaccountoperatetest/src/main/js/test/Authenticator.test.js +++ b/account/appaccount/actsaccountoperatetest/src/main/js/test/Authenticator.test.js @@ -46,11 +46,12 @@ export default function ActsAccountAppAccess() { parameters: {}, }, - }, - ) - await sleep(1500); + }, (err, data) => { + console.debug("====>accountauthenticatorfeatureAbility.startAbilityForResult err:" + JSON.stringify(err)) + console.debug("====>accountauthenticatorfeatureAbility.startAbilityForResult data:" + JSON.stringify(data)) + done(); + }) console.debug("====>ActsAccountAuthenticator beforeAll end===="); - done(); }); beforeEach(async (done)=>{ console.debug("====>afterEach start===="); diff --git a/account/appaccount/actsaccounttest/signature/openharmony_sx.p7b b/account/appaccount/actsaccounttest/signature/openharmony_sx.p7b old mode 100755 new mode 100644 index 69d44e543e5000de7e08c0610f4a40b00be59e52..80f930a14ff82cb645bb8de7752d60d82d288eac GIT binary patch delta 1401 zcmZ8hO{g1H7$s@)w3R-rR4h_#84u_69G}y>tKF4@r!EvO+&Ub(FMN4-wL+j$I21}8rXN^2_|khv?mv&|PBa z@^19E$ZqtPbJVu(xC0x z#x~v|I=zAGISVQD@WKpHb2MWZpz0AL;_rntAqCkh9C^e3;?p)78yyJG&4qT)Gn0M znQgk20tIE7NDeEo$Fa7XuL_$9y)~YS?OBcQ;9`Ibx6rTGb2OK=1X^yjH*tAvqJ(SD zw|!NYwt#FWgrLp>V`;EZLmbb7rU_-W?`VS#&U^KeUH4O|TH}mwaCt)!yy^^ydu%BS zfsy4PKnzTSpdgWdSEW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!$gQH4-qiZtbukZrhS7iVai zs|;|`E!N&E10m%c_D*4ZfkI#kd^)`KHc+bjjOfEKp`Rx6P6G~B3J zaY<%_FJ!=A0+FXPD6I)D%%{4e?5^6ECPGQD_{km|^98MK?vu^Du8M))B1RcXaan(J zbM{(n<%tL8IW+z31EM=yS$t_WTvDfLGEHm{X@X2=TSV%? zz*~%w$yh>s`_o%r{dVmN`^V4aaccountauthenticatorbeforeAll start===="); await featureAbility.startAbility( { want: @@ -44,10 +45,12 @@ export default function ActsAccountAppAccess() { parameters: {}, }, - }, - ) - await sleep(1000) - done(); + }, (err, data) => { + console.debug("====>accountauthenticatorfeatureAbility.startAbility err:" + JSON.stringify(err)) + console.debug("====>accountauthenticatorfeatureAbility.startAbility data:" + JSON.stringify(data)) + done(); + }) + console.debug("====>accountauthenticatorfeatureAbility.startAbility end") }); beforeEach(async function (done) { console.debug("====>afterEach start===="); diff --git a/account/appaccount/sceneProject/actsaccountauthenticator/entry/src/main/js/Common/utils.js b/account/appaccount/sceneProject/actsaccountauthenticator/entry/src/main/js/Common/utils.js index 92f80e40e..5cbe9095e 100644 --- a/account/appaccount/sceneProject/actsaccountauthenticator/entry/src/main/js/Common/utils.js +++ b/account/appaccount/sceneProject/actsaccountauthenticator/entry/src/main/js/Common/utils.js @@ -261,7 +261,7 @@ class MyAuthenticator extends rpc.RemoteObject { case 5 : name = readString8(data) callback = new MyAuthenticatorCallback(data.readRemoteObject()) - this.authenticatorImpl.isAccountRemovable(name, callback) + this.authenticatorImpl.checkAccountRemovable(name, callback) break } return true @@ -345,7 +345,7 @@ class MyAuthenticatorImpl { callback.onResult(10016, {}) } - isAccountRemovable(name, callback) { + checkAccountRemovable(name, callback) { console.log(TAG + "name: " + name) var isRemovable = this.accountRemovability[name] if (isRemovable == undefined || isRemovable == false) { diff --git a/account/appaccount/sceneProject/actsaccountauthenticator/entry/src/main/js/ServiceAbility/service.js b/account/appaccount/sceneProject/actsaccountauthenticator/entry/src/main/js/ServiceAbility/service.js index 089ea590c..67c2f2db8 100644 --- a/account/appaccount/sceneProject/actsaccountauthenticator/entry/src/main/js/ServiceAbility/service.js +++ b/account/appaccount/sceneProject/actsaccountauthenticator/entry/src/main/js/ServiceAbility/service.js @@ -160,7 +160,7 @@ class MyAuthenticator extends account_appAccount.Authenticator { callback.onResult(10016, {}) } - isAccountRemovable(name, callback) { + checkAccountRemovable(name, callback) { console.log(TAG + "name: " + name) var isRemovable = false; try { diff --git a/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountQuery.test.js b/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountQuery.test.js index e2c1f3fa1..9fff8def8 100644 --- a/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountQuery.test.js +++ b/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountQuery.test.js @@ -34,20 +34,20 @@ export default function ActsOsAccountThirdPartyTest_third_4() { }) /* * @tc.number : ActsOsAccountQueryIdFormUid_0100 - * @tc.name : queryOsAccountLocalIdFromUid callback + * @tc.name : getOsAccountLocalIdForUid callback * @tc.desc : Verify that the user localId is obtained by uid */ it('ActsOsAccountQueryIdFormUid_0100', 0, async function (done) { console.debug("====>ActsOsAccountQueryIdFormUid_0100 start===="); var osAccountManager = osaccount.getAccountManager(); - var testLocalId = await osAccountManager.queryOsAccountLocalIdFromProcess(); + var testLocalId = await osAccountManager.getOsAccountLocalId(); console.debug("====>testLocalId:" + testLocalId) console.debug("====>get AccountManager finish===="); var bundleName = "com.example.actsosaccountthirdpartytest"; var bundleInfo = await bundle.getBundleInfo(bundleName, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES); var uid = bundleInfo.uid; console.debug("====>obtained uid:" + uid); - osAccountManager.queryOsAccountLocalIdFromUid(uid, (err, localId)=>{ + osAccountManager.getOsAccountLocalIdForUid(uid, (err, localId)=>{ console.debug("====>get localId err: " + JSON.stringify(err)); console.debug("====>localId obtained by uid:" + localId); expect(err).assertEqual(null); @@ -59,19 +59,19 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountQueryIdFormUid_0200 - * @tc.name : queryOsAccountLocalIdFromUid promise + * @tc.name : getOsAccountLocalIdForUid promise * @tc.desc : Verify that the user localId is obtained by uid */ it('ActsOsAccountQueryIdFormUid_0200', 0, async function (done) { console.debug("====>ActsOsAccountQueryIdFormUid_0200 start===="); var osAccountManager = osaccount.getAccountManager(); - var testLocalId = await osAccountManager.queryOsAccountLocalIdFromProcess(); + var testLocalId = await osAccountManager.getOsAccountLocalId(); console.debug("====>get AccountManager finish===="); var bundleName = "com.example.actsosaccountthirdpartytest"; var bundleInfo = await bundle.getBundleInfo(bundleName, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES); var uid = bundleInfo.uid; console.debug("====>obtained uid:" + uid); - var localId = await osAccountManager.queryOsAccountLocalIdFromUid(uid); + var localId = await osAccountManager.getOsAccountLocalIdForUid(uid); console.debug("====>localId obtained by uid:" + localId); expect(localId).assertEqual(testLocalId); console.debug("====>ActsOsAccountQueryIdFormUid_0200 end===="); @@ -80,7 +80,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountQueryIdFormUid_0300 - * @tc.name : queryOsAccountLocalIdFromUid callback + * @tc.name : getOsAccountLocalIdForUid callback * @tc.desc : Authentication failed to query user by uid -1 */ it('ActsOsAccountQueryIdFormUid_0300', 0, async function (done) { @@ -88,7 +88,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { var osAccountManager = osaccount.getAccountManager(); console.debug("====>get AccountManager finish===="); var incorrectUid = -1; - osAccountManager.queryOsAccountLocalIdFromUid(incorrectUid, (err, localId)=>{ + osAccountManager.getOsAccountLocalIdForUid(incorrectUid, (err, localId)=>{ console.debug("====>get localId err: " + JSON.stringify(err)); console.debug("====>localId obtained by uid:" + localId); expect(err.code).assertEqual(ERR_INVALID_PARAMETER); @@ -100,7 +100,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountQueryIdFormUid_0400 - * @tc.name : queryOsAccountLocalIdFromUid promise + * @tc.name : getOsAccountLocalIdForUid promise * @tc.desc : Authentication failed to query user by uid -1 */ it('ActsOsAccountQueryIdFormUid_0400', 0, async function (done) { @@ -109,7 +109,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { console.debug("====>get AccountManager finish===="); var incorrectUid = -1; try{ - await osAccountManager.queryOsAccountLocalIdFromUid(incorrectUid); + await osAccountManager.getOsAccountLocalIdForUid(incorrectUid); }catch(err){ console.debug("====>get localId by uid err:" +JSON.stringify(err)); expect(err.code).assertEqual(ERR_INVALID_PARAMETER); @@ -120,7 +120,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountQueryIdFormUid_0500 - * @tc.name : queryOsAccountLocalIdFromUid callback + * @tc.name : getOsAccountLocalIdForUid callback * @tc.desc : Authentication failed to query user by uid 2147483648 */ it('ActsOsAccountQueryIdFormUid_0500', 0, async function (done) { @@ -128,7 +128,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { var osAccountManager = osaccount.getAccountManager(); console.debug("====>get AccountManager finish===="); var incorrectUid = 2147483648; - osAccountManager.queryOsAccountLocalIdFromUid(incorrectUid, (err, localId)=>{ + osAccountManager.getOsAccountLocalIdForUid(incorrectUid, (err, localId)=>{ console.debug("====>get localId err: " + JSON.stringify(err)); console.debug("====>localId obtained by uid:" + localId); expect(err.code).assertEqual(ERR_INVALID_PARAMETER); @@ -140,7 +140,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountQueryIdFormUid_0600 - * @tc.name : queryOsAccountLocalIdFromUid promise + * @tc.name : getOsAccountLocalIdForUid promise * @tc.desc : Authentication failed to query user by uid 2147483648 */ it('ActsOsAccountQueryIdFormUid_0600', 0, async function (done) { @@ -149,7 +149,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { console.debug("====>get AccountManager finish===="); var incorrectUid = 2147483648; try{ - await osAccountManager.queryOsAccountLocalIdFromUid(incorrectUid); + await osAccountManager.getOsAccountLocalIdForUid(incorrectUid); }catch(err){ console.debug("====>get localId by uid err:" +JSON.stringify(err)); expect(err.code).assertEqual(ERR_INVALID_PARAMETER); @@ -160,7 +160,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountQueryIdFormProcess_0100 - * @tc.name : queryOsAccountLocalIdFromProcess callback + * @tc.name : getOsAccountLocalId callback * @tc.desc : Verify that the user localId obtained from the current process uid */ it('ActsOsAccountQueryIdFormProcess_0100', 0, async function (done) { @@ -169,9 +169,9 @@ export default function ActsOsAccountThirdPartyTest_third_4() { var bundleName = "com.example.actsosaccountthirdpartytest"; var bundleInfo = await bundle.getBundleInfo(bundleName, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES); var uid = bundleInfo.uid; - var testLocalId = await osAccountManager.queryOsAccountLocalIdFromUid(uid) + var testLocalId = await osAccountManager.getOsAccountLocalIdForUid(uid) console.debug("====>get AccountManager finish===="); - osAccountManager.queryOsAccountLocalIdFromProcess((err, localId)=>{ + osAccountManager.getOsAccountLocalId((err, localId)=>{ console.debug("====>get localId err: " + JSON.stringify(err)); console.debug("====>localId obtained by process:" + localId); expect(err).assertEqual(null); @@ -183,7 +183,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountQueryIdFormProcess_0200 - * @tc.name : queryOsAccountLocalIdFromProcess promise + * @tc.name : getOsAccountLocalId promise * @tc.desc : Verify that the user localId obtained from the current process uid */ it('ActsOsAccountQueryIdFormProcess_0200', 0, async function (done) { @@ -192,10 +192,10 @@ export default function ActsOsAccountThirdPartyTest_third_4() { var bundleName = "com.example.actsosaccountthirdpartytest"; var bundleInfo = await bundle.getBundleInfo(bundleName, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES); var uid = bundleInfo.uid; - var testLocalId = await osAccountManager.queryOsAccountLocalIdFromUid(uid) + var testLocalId = await osAccountManager.getOsAccountLocalIdForUid(uid) console.debug("====>testLocalId obtained by process:" + testLocalId) console.debug("====>get AccountManager finish===="); - var localId = await osAccountManager.queryOsAccountLocalIdFromProcess(); + var localId = await osAccountManager.getOsAccountLocalId(); console.debug("====>localId obtained by process:" + localId); expect(localId).assertEqual(testLocalId); console.debug("====>ActsOsAccountQueryIdFormProcess_0200 end===="); @@ -239,15 +239,15 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountQueryLocalIdSerial_0100 - * @tc.name : querySerialNumberByOsAccountLocalId callback + * @tc.name : getSerialNumberForOsAccountLocalId callback * @tc.desc : Verify query serialNumber by 100 user and query 100 user by serialNumber */ it('ActsOsAccountQueryLocalIdSerial_0100', 0, async function (done) { console.debug("====>ActsOsAccountQueryLocalIdSerial_0100 start===="); var osAccountManager = osaccount.getAccountManager(); - var testLocalId = await osAccountManager.queryOsAccountLocalIdFromProcess(); + var testLocalId = await osAccountManager.getOsAccountLocalId(); console.debug("====>get AccountManager finish===="); - osAccountManager.querySerialNumberByOsAccountLocalId(testLocalId, (err, serialNumber)=>{ + osAccountManager.getSerialNumberForOsAccountLocalId(testLocalId, (err, serialNumber)=>{ console.debug("====>ger serialNumber err:" + JSON.stringify(err)); console.debug("====>get serialNumber:" + serialNumber + " by localId: 100" ); expect(err).assertEqual(null); @@ -255,7 +255,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { var serialIntercept = serialNumberStr.substring(8); console.debug("====>truncate the last eight characters: " + serialIntercept); expect(serialIntercept).assertEqual("00000001"); - osAccountManager.queryOsAccountLocalIdBySerialNumber(serialNumber, (err, localId)=>{ + osAccountManager.getOsAccountLocalIdForSerialNumber(serialNumber, (err, localId)=>{ console.debug("====>ger localId err:" + JSON.stringify(err)); console.debug("====>get localId:" + localId + " by serialNumber: " + serialNumber); expect(err).assertEqual(null); @@ -268,21 +268,21 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountQueryLocalIdSerial_0200 - * @tc.name : querySerialNumberByOsAccountLocalId promise + * @tc.name : getSerialNumberForOsAccountLocalId promise * @tc.desc : Verify query serialNumber by 100 user and query 100 user by serialNumber */ it('ActsOsAccountQueryLocalIdSerial_0200', 0, async function (done) { console.debug("====>ActsOsAccountQueryLocalIdSerial_0200 start===="); var osAccountManager = osaccount.getAccountManager(); - var testLocalId = await osAccountManager.queryOsAccountLocalIdFromProcess(); + var testLocalId = await osAccountManager.getOsAccountLocalId(); console.debug("====>get AccountManager finish===="); - var serialNumber = await osAccountManager.querySerialNumberByOsAccountLocalId(testLocalId); + var serialNumber = await osAccountManager.getSerialNumberForOsAccountLocalId(testLocalId); console.debug("====>get serialNumber:" + serialNumber + " by localId: 100" ); var serialNumberStr = serialNumber.toString(); var serialIntercept = serialNumberStr.substring(8); console.debug("====>truncate the last eight characters: " + serialIntercept); expect(serialIntercept).assertEqual("00000001"); - var localId = await osAccountManager.queryOsAccountLocalIdBySerialNumber(serialNumber); + var localId = await osAccountManager.getOsAccountLocalIdForSerialNumber(serialNumber); console.debug("====>get localId:" + localId + " by serialNumber: " + serialNumber); expect(localId).assertEqual(testLocalId); console.debug("====>ActsOsAccountQueryLocalIdSerial_0200 end===="); @@ -291,14 +291,14 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountQueryLocalIdSerial_0300 - * @tc.name : queryOsAccountLocalIdBySerialNumber callback + * @tc.name : getOsAccountLocalIdForSerialNumber callback * @tc.desc : Verify query serialNumber by 0 user and query 0 user by serialNumber */ it('ActsOsAccountQueryLocalIdSerial_0300', 0, async function (done) { console.debug("====>ActsOsAccountQueryLocalIdSerial_0300 start===="); var osAccountManager = osaccount.getAccountManager(); console.debug("====>get AccountManager finish===="); - osAccountManager.querySerialNumberByOsAccountLocalId(0, (err, serialNumber)=>{ + osAccountManager.getSerialNumberForOsAccountLocalId(0, (err, serialNumber)=>{ console.debug("====>ger serialNumber err:" + JSON.stringify(err)); console.debug("====>get serialNumber:" + serialNumber + " by localId: 0" ); expect(err).assertEqual(null); @@ -306,7 +306,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { var serialIntercept = serialNumberStr.substring(8); console.debug("====>truncate the last eight characters: " + serialIntercept); expect(serialIntercept).assertEqual("00000000"); - osAccountManager.queryOsAccountLocalIdBySerialNumber(serialNumber, (err, localId)=>{ + osAccountManager.getOsAccountLocalIdForSerialNumber(serialNumber, (err, localId)=>{ console.debug("====>ger localId err:" + JSON.stringify(err)); console.debug("====>get localId:" + localId + " by serialNumber: " + serialNumber); expect(err).assertEqual(null); @@ -319,20 +319,20 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountQueryLocalIdSerial_0400 - * @tc.name : queryOsAccountLocalIdBySerialNumber promise + * @tc.name : getOsAccountLocalIdForSerialNumber promise * @tc.desc : Verify query serialNumber by 0 user and query 0 user by serialNumber */ it('ActsOsAccountQueryLocalIdSerial_0400', 0, async function (done) { console.debug("====>ActsOsAccountQueryLocalIdSerial_0400 start===="); var osAccountManager = osaccount.getAccountManager(); console.debug("====>get AccountManager finish===="); - var serialNumber = await osAccountManager.querySerialNumberByOsAccountLocalId(0); + var serialNumber = await osAccountManager.getSerialNumberForOsAccountLocalId(0); console.debug("====>get serialNumber:" + serialNumber + " by localId: 0" ); var serialNumberStr = serialNumber.toString(); var serialIntercept = serialNumberStr.substring(8); console.debug("====>truncate the last eight characters: " + serialIntercept); expect(serialIntercept).assertEqual("00000000"); - var localId = await osAccountManager.queryOsAccountLocalIdBySerialNumber(serialNumber); + var localId = await osAccountManager.getOsAccountLocalIdForSerialNumber(serialNumber); console.debug("====>get localId:" + localId + " by serialNumber: " + serialNumber); expect(localId).assertEqual(0); console.debug("====>ActsOsAccountQueryLocalIdSerial_0400 end===="); @@ -341,7 +341,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountQueryLocalIdSerial_0500 - * @tc.name : querySerialNumberByOsAccountLocalId callback + * @tc.name : getSerialNumberForOsAccountLocalId callback * @tc.desc : Verify the query for the newly created user serialNumber and query the owning user through the * serialNumber */ @@ -368,11 +368,11 @@ export default function ActsOsAccountThirdPartyTest_third_4() { expect(data.isActived).assertEqual(false); expect(data.isCreateCompleted).assertEqual(true) localId = data.localId; - osAccountManager.querySerialNumberByOsAccountLocalId(localId, (err, serialNumber)=>{ + osAccountManager.getSerialNumberForOsAccountLocalId(localId, (err, serialNumber)=>{ console.debug("====>queryOsAccountById err:" + JSON.stringify(err)); console.debug("====>get serialNumber:" + serialNumber + " by localId: " + localId); expect(err).assertEqual(null); - osAccountManager.queryOsAccountLocalIdBySerialNumber(serialNumber, (err, getlocalId)=>{ + osAccountManager.getOsAccountLocalIdForSerialNumber(serialNumber, (err, getlocalId)=>{ console.debug("====>ger localId err:" + JSON.stringify(err)); console.debug("====>get localId:" + getlocalId + " by serialNumber: " + serialNumber); expect(err).assertEqual(null); @@ -390,7 +390,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountQueryLocalIdSerial_0600 - * @tc.name : queryOsAccountLocalIdBySerialNumber promise + * @tc.name : getOsAccountLocalIdForSerialNumber promise * @tc.desc : Verify the query for the newly created user serialNumber and query the owning user through the * serialNumber */ @@ -403,9 +403,9 @@ export default function ActsOsAccountThirdPartyTest_third_4() { console.debug("====>create os account OsAccountInfo: " + JSON.stringify(OsAccountInfo)); expect(OsAccountInfo.localName).assertEqual("accountIdSerialB"); localId = OsAccountInfo.localId; - var serialNumber = await osAccountManager.querySerialNumberByOsAccountLocalId(localId); + var serialNumber = await osAccountManager.getSerialNumberForOsAccountLocalId(localId); console.debug("====>get serialNumber:" + serialNumber + " by localId: " + localId); - var getlocalId = await osAccountManager.queryOsAccountLocalIdBySerialNumber(serialNumber); + var getlocalId = await osAccountManager.getOsAccountLocalIdForSerialNumber(serialNumber); console.debug("====>get localId:" + getlocalId + " by serialNumber: " + serialNumber); expect(getlocalId).assertEqual(localId); await osAccountManager.removeOsAccount(localId); @@ -509,13 +509,13 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountGetActivedOsAccountIds_0100 - * @tc.name : getActivatedOsAccountIds callback + * @tc.name : getActivatedOsAccountLocalIds callback * @tc.desc : query activated osAccount Ids */ it('ActsOsAccountGetActivedOsAccountIds_0100', 0, async function (done) { console.debug("====>ActsOsAccountGetActivedOsAccountIds_0100 start===="); var osAccountManager = osaccount.getAccountManager(); - osAccountManager.getActivatedOsAccountIds((err,dataArray)=>{ + osAccountManager.getActivatedOsAccountLocalIds((err,dataArray)=>{ console.info("====>ActsOsAccountGQueryActicedOsAccountIds_0100 err :" + JSON.stringify(err)); expect(err).assertEqual(null) console.info("====>ActsOsAccountGQueryActicedOsAccountIds_0100 dataArray:" + dataArray); @@ -526,13 +526,13 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountGetActivedOsAccountIds_0200 - * @tc.name : getActivatedOsAccountIds promise + * @tc.name : getActivatedOsAccountLocalIds promise * @tc.desc : query activated osAccount Ids */ it('ActsOsAccountGetActivedOsAccountIds_0200', 0, async function (done) { console.debug("====>ActsOsAccountGetActivedOsAccountIds_0200 start===="); var osAccountManager = osaccount.getAccountManager(); - osAccountManager.getActivatedOsAccountIds().then((dataArray)=>{ + osAccountManager.getActivatedOsAccountLocalIds().then((dataArray)=>{ console.debug("====>ActsOsAccountGetActivedOsAccountIds_0200 data" + JSON.stringify(dataArray)) expect(dataArray.length).assertEqual(1) done(); @@ -584,13 +584,13 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /** * @tc.number ActsOsAccountQueryDomainTest_0300 - * @tc.name Test createOsAccountForDomain queryOsAccountLocalIdFromDomain callback - * @tc.desc Test createOsAccountForDomain queryOsAccountLocalIdFromDomain API functionality + * @tc.name Test createOsAccountForDomain getOsAccountLocalIdForDomain callback + * @tc.desc Test createOsAccountForDomain getOsAccountLocalIdForDomain API functionality */ it('ActsOsAccountQueryDomainTest_0300', 0, async function (done) { console.debug("====>ActsOsAccountQueryDomainTest_0100 start===="); var osAccountManager = osaccount.getAccountManager(); - osAccountManager.queryOsAccountLocalIdFromDomain({domain: "", accountName: ""}, (err)=>{ + osAccountManager.getOsAccountLocalIdForDomain({domain: "", accountName: ""}, (err)=>{ console.debug("====>ActsOsAccountQueryDomainTest_0300 err:" + JSON.stringify(err)); expect(err.code != 0).assertEqual(true) console.debug("====>ActsOsAccountQueryDomainTest_0300 end===="); @@ -600,13 +600,13 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /** * @tc.number ActsOsAccountQueryDomainTest_0400 - * @tc.name Test createOsAccountForDomain queryOsAccountLocalIdFromDomain pormise - * @tc.desc Test createOsAccountForDomain queryOsAccountLocalIdFromDomain API functionality + * @tc.name Test createOsAccountForDomain getOsAccountLocalIdForDomain pormise + * @tc.desc Test createOsAccountForDomain getOsAccountLocalIdForDomain API functionality */ it('ActsOsAccountQueryDomainTest_0400', 0, async function (done) { console.debug("====>ActsOsAccountQueryDomainTest_0400 start===="); var osAccountManager = osaccount.getAccountManager(); - osAccountManager.queryOsAccountLocalIdFromDomain({domain: "", accountName: ""}).then((accountID)=>{ + osAccountManager.getOsAccountLocalIdForDomain({domain: "", accountName: ""}).then((accountID)=>{ console.debug("ActsOsAccountQueryDomainTest_0400 accountID:" + JSON.stringify(accountID)) done(); }).catch((err)=>{ @@ -659,15 +659,15 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountCheckConstraints_3300 - * @tc.name : checkConstraintEnabled callback + * @tc.name : checkOsAccountConstraintEnabled callback * @tc.desc : the application call interface does not meet the permissions */ it('ActsOsAccountCheckConstraints_3300', 0, async function(done){ console.debug("====>ActsOsAccountCheckConstraints_3300 start===="); var AccountManager = osaccount.getAccountManager(); console.debug("====>get os AccountManager finish===="); - AccountManager.checkConstraintEnabled(100, "constraint.bluetooth", (err, result)=>{ - console.debug("====>checkConstraintEnabled err:" + JSON.stringify(err)); + AccountManager.checkOsAccountConstraintEnabled(100, "constraint.bluetooth", (err, result)=>{ + console.debug("====>checkOsAccountConstraintEnabled err:" + JSON.stringify(err)); expect(err).assertEqual(null); expect(result).assertTrue(); console.debug("====>ActsOsAccountCheckConstraints_3300 end===="); @@ -677,7 +677,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { /* * @tc.number : ActsOsAccountPermission_3400 - * @tc.name : checkConstraintEnabled promise + * @tc.name : checkOsAccountConstraintEnabled promise * @tc.desc : the application call interface does not meet the permissions */ it('ActsOsAccountCheckConstraints_3400', 0, async function(done){ @@ -685,11 +685,11 @@ export default function ActsOsAccountThirdPartyTest_third_4() { var AccountManager = osaccount.getAccountManager(); console.debug("====>get os AccountManager finish===="); try{ - await AccountManager.checkConstraintEnabled(100, "constraint.bluetooth"); + await AccountManager.checkOsAccountConstraintEnabled(100, "constraint.bluetooth"); done(); } catch(err){ - console.debug("====>checkConstraintEnabled err:" + JSON.stringify(err)); + console.debug("====>checkOsAccountConstraintEnabled err:" + JSON.stringify(err)); expect(err).assertEqual(null); console.debug("====>ActsOsAccountCheckConstraints_3400 end===="); done(); -- GitLab