diff --git a/account/appaccount/actsaccountoperatetest/signature/openharmony_sx.p7b b/account/appaccount/actsaccountoperatetest/signature/openharmony_sx.p7b index 078b44ea6250a6a1a955cf3fdcfac4b435d49843..bf24b0686f03588c0c2d07fe81646c1536579443 100644 Binary files a/account/appaccount/actsaccountoperatetest/signature/openharmony_sx.p7b and b/account/appaccount/actsaccountoperatetest/signature/openharmony_sx.p7b differ diff --git a/account/appaccount/actsaccountoperatetest/src/main/config.json b/account/appaccount/actsaccountoperatetest/src/main/config.json index c30611b150d96aa52394cba994497d0ad10ac25c..e90aa7db8721f472fa3de0b07d3f2521b67374b9 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 e1bce4553d3b9eba58cfdb1a12ca7d50cb6489c1..43345b7b3ab719490cd6d9feb2a364bba38b40ad 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 Binary files a/account/appaccount/actsaccounttest/signature/openharmony_sx.p7b and b/account/appaccount/actsaccounttest/signature/openharmony_sx.p7b differ diff --git a/account/appaccount/actsaccounttest/src/main/config.json b/account/appaccount/actsaccounttest/src/main/config.json index b758218b02a4acd78fac346de0f284cd9f07e129..915a24db9de68cbeb4902753d08688392033d3dd 100644 --- a/account/appaccount/actsaccounttest/src/main/config.json +++ b/account/appaccount/actsaccounttest/src/main/config.json @@ -42,6 +42,10 @@ "name":"ohos.permission.REMOVE_CACHE_FILES", "reason":"need use ohos.permission.REMOVE_CACHE_FILES" }, + { + "name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND", + "reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND" + }, { "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" diff --git a/account/appaccount/actsaccounttest/src/main/js/test/Authenticator.test.js b/account/appaccount/actsaccounttest/src/main/js/test/Authenticator.test.js index 9a5e705b9f7ad705cc7a4281352234b6b98a19c3..3d408bf296cada44532c731f283858bfb12b39d5 100644 --- a/account/appaccount/actsaccounttest/src/main/js/test/Authenticator.test.js +++ b/account/appaccount/actsaccounttest/src/main/js/test/Authenticator.test.js @@ -32,7 +32,8 @@ export default function ActsAccountAppAccess() { console.info(`sleep #{time} over ...`) }) } - beforeAll(async function (done) { + beforeAll(async function (done) { + console.debug("====>accountauthenticatorbeforeAll 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 92f80e40eb35ccb3cec2e0e05042ece5451d3df5..5cbe9095e449f2fc8d30d840ea0e7b38c6ffae60 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 089ea590ce19304df8efef74f9cd7b073d9221a2..67c2f2db8d88ae17b8a7f0a9f57ad1562c097542 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 e2c1f3fa129ecd0d16b071e93cecc12d6d005977..9fff8def8dab94dc6db267b988ffce6527d6f0e3 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();