diff --git a/account/OsAccountTest_js/src/main/js/test/ActsDSGetSet.test.js b/account/OsAccountTest_js/src/main/js/test/ActsDSGetSet.test.js index 2ff3b0e2451440151ec12e9d723bdd96cdd503a3..bb0c249890a552db8e1936046486a40593c86754 100644 --- a/account/OsAccountTest_js/src/main/js/test/ActsDSGetSet.test.js +++ b/account/OsAccountTest_js/src/main/js/test/ActsDSGetSet.test.js @@ -41,7 +41,6 @@ export default function ActsDAGetSetTest() { */ it('ActsDADeviceId_0100', 0, async function(done){ console.log("====>ActsDADeviceId_0100 test query distribtued id start"); - const distributedId = '5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5'; //'12345'sha256的值 const accountAbility = account.getDistributedAccountAbility(); accountAbility.setOsAccountDistributedInfo(LOGININFO, (err)=>{ console.log("====>ActsDADeviceId_0100 set distributedInfo err:" + JSON.stringify(err)); @@ -49,12 +48,19 @@ export default function ActsDAGetSetTest() { console.log("====>ActsDADeviceId_0100 get distributedInfo err:" + JSON.stringify(err)); console.log("====>ActsDADeviceId_0100 get distributedInfo:" + JSON.stringify(distributedInfo)); expect(distributedInfo.name).assertEqual('ZhangSan'); - expect(distributedInfo.id).assertEqual(distributedId); - accountAbility.setOsAccountDistributedInfo(LOGOUTINFO, (err)=>{ - console.debug('====>ActsDADeviceId_0100 logout_result:'+ JSON.stringify(err)) - expect(err).assertEqual(null) - console.log("====>test query distribtued id end"); - done(); + expect(distributedInfo.id !== 'ohosAnonymousUid').assertTrue() + let uid = distributedInfo.id + accountAbility.getOsAccountDistributedInfo((err, distributedInfo)=>{ + console.log("====>ActsDADeviceId_0100 get distributedInfo err:" + JSON.stringify(err)); + console.log("====>ActsDADeviceId_0100 get distributedInfo:" + JSON.stringify(distributedInfo)); + expect(distributedInfo.name).assertEqual('ZhangSan'); + expect(distributedInfo.id).assertEqual(uid) + accountAbility.setOsAccountDistributedInfo(LOGOUTINFO, (err)=>{ + console.debug('====>ActsDADeviceId_0100 logout_result:'+ JSON.stringify(err)) + expect(err).assertEqual(null) + console.log("====>test query distribtued id end"); + done(); + }) }) }) }) @@ -162,7 +168,7 @@ export default function ActsDAGetSetTest() { console.debug('====>setOsAccountDistributedInfo_test001 ccerr:' + JSON.stringify(err)) console.debug('====>setOsAccountDistributedInfo_test001 data:' + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -205,7 +211,7 @@ export default function ActsDAGetSetTest() { console.debug('====>setOsAccountDistributedInfo_test002 get ccerr:' + JSON.stringify(err)) console.debug("====>setOsAccountDistributedInfo_test002 get data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -262,7 +268,7 @@ export default function ActsDAGetSetTest() { console.debug("====>setOsAccountDistributedInfo_test004 query_err:" + JSON.stringify(err)) console.debug("====>setOsAccountDistributedInfo_test004 query_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -303,7 +309,7 @@ export default function ActsDAGetSetTest() { console.debug("====>updateOsAccountDistributedInfo_test005 get_err:" + JSON.stringify(err)) console.debug("====>updateOsAccountDistributedInfo_test005 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -344,7 +350,7 @@ export default function ActsDAGetSetTest() { console.debug("====>setOsAccountDistributedInfo_test006 get_err:" + JSON.stringify(err)) console.debug("====>setOsAccountDistributedInfo_test006 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -386,7 +392,7 @@ export default function ActsDAGetSetTest() { console.debug("====>setOsAccountDistributedInfo_test007 get_err:" + JSON.stringify(err)) console.debug("====>setOsAccountDistributedInfo_test007 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -427,7 +433,7 @@ export default function ActsDAGetSetTest() { console.debug("====>setOsAccountDistributedInfo_test008 get_err:" + JSON.stringify(err)) console.debug("====>setOsAccountDistributedInfo_test008 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -639,7 +645,7 @@ export default function ActsDAGetSetTest() { console.debug("====>setOsAccountDistributedInfoByLocalId_test0100 get_err:" + JSON.stringify(err)) console.debug("====>setOsAccountDistributedInfoByLocalId_test0100 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -680,7 +686,7 @@ export default function ActsDAGetSetTest() { console.debug("====>setOsAccountDistributedInfoByLocalId_test0200 get_err:" + JSON.stringify(err)) console.debug("====>setOsAccountDistributedInfoByLocalId_test0200 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -762,7 +768,7 @@ export default function ActsDAGetSetTest() { console.debug("====>DistributedAccountOptionalParameter_0100 get_err:" + JSON.stringify(err)) console.debug("====>DistributedAccountOptionalParameter_0100 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -805,7 +811,7 @@ export default function ActsDAGetSetTest() { console.debug("====>DistributedAccountOptionalParameter_0200 get_err:" + JSON.stringify(err)) console.debug("====>DistributedAccountOptionalParameter_0200 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -852,7 +858,7 @@ export default function ActsDAGetSetTest() { console.debug("====>DistributedAccountOptionalParameter_0300 get_err:" + JSON.stringify(err)) console.debug("====>DistributedAccountOptionalParameter_0300 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -895,7 +901,7 @@ export default function ActsDAGetSetTest() { console.debug("====>DistributedAccountOptionalParameter_0400 get_err:" + JSON.stringify(err)) console.debug("====>DistributedAccountOptionalParameter_0400 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -938,7 +944,7 @@ export default function ActsDAGetSetTest() { console.debug("====>DistributedAccountOptionalParameter_0500 get_err:" + JSON.stringify(err)) console.debug("====>DistributedAccountOptionalParameter_0500 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -977,7 +983,7 @@ export default function ActsDAGetSetTest() { console.debug("====>DistributedAccountOptionalParameter_0600 get_err:" + JSON.stringify(err)) console.debug("====>DistributedAccountOptionalParameter_0600 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -1024,7 +1030,7 @@ export default function ActsDAGetSetTest() { console.debug("====>DistributedAccountOptionalParameter_0700 get_err:" + JSON.stringify(err)) console.debug("====>DistributedAccountOptionalParameter_0700 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -1067,7 +1073,7 @@ export default function ActsDAGetSetTest() { console.debug("====>DistributedAccountOptionalParameter_0800 get_err:" + JSON.stringify(err)) console.debug("====>DistributedAccountOptionalParameter_0800 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -1114,7 +1120,7 @@ export default function ActsDAGetSetTest() { console.debug("====>DistributedAccountOptionalParameter_0900 get_err:" + JSON.stringify(err)) console.debug("====>DistributedAccountOptionalParameter_0900 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', @@ -1157,7 +1163,7 @@ export default function ActsDAGetSetTest() { console.debug("====>DistributedAccountOptionalParameter_1000 get_err:" + JSON.stringify(err)) console.debug("====>DistributedAccountOptionalParameter_1000 get_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() expect(data.status).assertEqual(1) let obj = { id: '12345', diff --git a/account/OsAccountTest_js/src/main/js/test/OsAccount.test.js b/account/OsAccountTest_js/src/main/js/test/OsAccount.test.js index 94aee96fee45d88d00bac8664a7dcc639ad15f5a..f57905d96a86ecd9aa7903b19adac900bb902cdd 100644 --- a/account/OsAccountTest_js/src/main/js/test/OsAccount.test.js +++ b/account/OsAccountTest_js/src/main/js/test/OsAccount.test.js @@ -42,7 +42,6 @@ export default function AccountTest() { console.debug('====>ActsDistributedAccountDeviceId_0100 start====') try { console.log("====>test query distribtued id start"); - const distributedId = '5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5'; //'12345'sha256的值 const accountAbility = account.getDistributedAccountAbility(); accountAbility.updateOsAccountDistributedInfo(LOGININFO, (err)=>{ console.log("====>update distributedInfo err:" + JSON.stringify(err)); @@ -50,13 +49,20 @@ export default function AccountTest() { console.log("====>query distributedInfo err:" + JSON.stringify(err)); console.log("====>query distributedInfo:" + JSON.stringify(distributedInfo)); expect(distributedInfo.name).assertEqual('ZhangSan'); - expect(distributedInfo.id).assertEqual(distributedId); - console.debug('success') - accountAbility.updateOsAccountDistributedInfo(LOGOUTINFO, (err)=>{ - console.debug('====>ActsDistributedAccountDeviceId_0100 logout_result:'+ JSON.stringify(err)) - expect(err).assertEqual(undefined) - console.log("====>test query distribtued id end"); - done(); + expect(distributedInfo.id !== 'ohosAnonymousUid').assertTrue() + let uid = distributedInfo.id + accountAbility.queryOsAccountDistributedInfo((err, distributedInfo)=>{ + console.log("====>query distributedInfo err:" + JSON.stringify(err)); + console.log("====>query distributedInfo:" + JSON.stringify(distributedInfo)); + expect(distributedInfo.name).assertEqual('ZhangSan'); + expect(distributedInfo.id).assertEqual(uid) + console.debug('success') + accountAbility.updateOsAccountDistributedInfo(LOGOUTINFO, (err)=>{ + console.debug('====>ActsDistributedAccountDeviceId_0100 logout_result:'+ JSON.stringify(err)) + expect(err).assertEqual(undefined) + console.log("====>test query distribtued id end"); + done(); + }) }) }) }) @@ -157,7 +163,7 @@ export default function AccountTest() { accountAbility.queryOsAccountDistributedInfo(async function (err, data) { console.debug('====>account_updateOsAccountDistributedInfo_test001 data:' + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() let obj = { id: '12345', name: 'ZhangSan', @@ -195,7 +201,7 @@ export default function AccountTest() { accountAbility.queryOsAccountDistributedInfo(async function (err, data) { console.debug("====>account_updateOsAccountDistributedInfo_test002 data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() let obj = { id: '12345', name: 'ZhangSan', @@ -266,7 +272,7 @@ export default function AccountTest() { console.debug("====>account_updateOsAccountDistributedInfo_test004 query_err:" + JSON.stringify(err)) console.debug("====>account_updateOsAccountDistributedInfo_test004 query_data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() let obj = { id: '12345', name: 'ZhangSan', @@ -307,7 +313,7 @@ export default function AccountTest() { accountAbility.queryOsAccountDistributedInfo(async function (err, data) { console.debug('====>account_updateOsAccountDistributedInfo_test005 data:' + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() let obj = { id: '12345', name: 'ZhangSan', @@ -352,7 +358,7 @@ export default function AccountTest() { accountAbility.queryOsAccountDistributedInfo(async function (err, data) { console.debug("====>account_updateOsAccountDistributedInfo_test006 data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() let obj = { id: '12345', name: 'ZhangSan', @@ -393,7 +399,7 @@ export default function AccountTest() { accountAbility.queryOsAccountDistributedInfo(async function (err, data) { console.debug('====>account_updateOsAccountDistributedInfo_test007 data:' + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() let obj = { id: '12345', name: 'ZhangSan', @@ -434,7 +440,7 @@ export default function AccountTest() { accountAbility.queryOsAccountDistributedInfo(async function (err, data) { console.debug("====>account_updateOsAccountDistributedInfo_test008 data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() let obj = { id: '12345', name: 'ZhangSan', @@ -471,7 +477,7 @@ export default function AccountTest() { accountAbility.queryOsAccountDistributedInfo(async function (err, data) { console.debug('====>account_updateOsAccountDistributedInfo_test009 data:' + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() let obj = { id: '12345', name: 'ZhangSan', @@ -508,7 +514,7 @@ export default function AccountTest() { accountAbility.queryOsAccountDistributedInfo(async function (err, data) { console.debug("====>account_updateOsAccountDistributedInfo_test010 data:" + JSON.stringify(data)) expect(data.name).assertEqual('ZhangSan') - expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') + expect(data.id !== 'ohosAnonymousUid').assertTrue() let obj = { id: '12345', name: 'ZhangSan', diff --git a/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountCheck.test.js b/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountCheck.test.js index 505e2c9d1cf43dfe272f93ee9fb9e3d8e82c06c2..fa3af97545ef5f9b06e84c156baec724dc3636cd 100644 --- a/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountCheck.test.js +++ b/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountCheck.test.js @@ -33,7 +33,6 @@ export default function ActsOsAccountThirdPartyTest_third_3() { console.debug("====>ActsOsAccountDeviceId_0100 start===="); var AccountManager = osAccount.getAccountManager(); console.debug("====>get os AccountManager finish===="); - const deviceId = '5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5'; const accountAbility = distributedAccount.getDistributedAccountAbility(); accountAbility.updateOsAccountDistributedInfo( { @@ -46,7 +45,7 @@ export default function ActsOsAccountThirdPartyTest_third_3() { console.debug("====>queryDistributedVirtualDeviceId err:" + JSON.stringify(err)); console.debug("====>queryDistributedVirtualDeviceId deviceId:" + id); expect(err).assertEqual(null); - expect(id).assertEqual(deviceId); + expect(id !== 'ohosAnonymousUid').assertTrue() console.debug("====>ActsOsAccountDeviceId_0100 end===="); done(); }) @@ -62,7 +61,6 @@ export default function ActsOsAccountThirdPartyTest_third_3() { console.debug("====>ActsOsAccountDeviceId_0200 start===="); var AccountManager = osAccount.getAccountManager(); console.debug("====>get os AccountManager finish===="); - const deviceId = '5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5'; const accountAbility = distributedAccount.getDistributedAccountAbility(); accountAbility.updateOsAccountDistributedInfo( { @@ -74,7 +72,7 @@ export default function ActsOsAccountThirdPartyTest_third_3() { console.debug("====>queryDistributedVirtualDeviceId start===="); var id = await AccountManager.queryDistributedVirtualDeviceId(); console.debug("====>queryDistributedVirtualDeviceId:" + id); - expect(id).assertEqual(deviceId); + expect(id !== 'ohosAnonymousUid').assertTrue() console.debug("====>ActsOsAccountDeviceId_0200 end===="); done(); }) diff --git a/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountIs.test.js b/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountIs.test.js index d943aaca915872060549db57b47800f3d07ddcae..e4dce9daefbb7c55247cc59dd4ab7f9e00dcf338 100755 --- a/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountIs.test.js +++ b/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountIs.test.js @@ -29,7 +29,6 @@ export default function ActsOsAccountThirdPartyTest_third_1() { console.debug("====>ActsOsAccountDeviceId_0100 start===="); var AccountManager = osAccount.getAccountManager(); console.debug("====>get os AccountManager finish===="); - const deviceId = '5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5'; const accountAbility = distributedAccount.getDistributedAccountAbility(); accountAbility.updateOsAccountDistributedInfo( { @@ -42,7 +41,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() { console.debug("====>getDistributedVirtualDeviceId err:" + JSON.stringify(err)); console.debug("====>getDistributedVirtualDeviceId deviceId:" + id); expect(err).assertEqual(null); - expect(id).assertEqual(deviceId); + expect(id !== 'ohosAnonymousUid').assertTrue() console.debug("====>ActsOsAccountDeviceId_0100 end===="); done(); }) @@ -58,7 +57,6 @@ export default function ActsOsAccountThirdPartyTest_third_1() { console.debug("====>ActsOsAccountDeviceId_0200 start===="); var AccountManager = osAccount.getAccountManager(); console.debug("====>get os AccountManager finish===="); - const deviceId = '5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5'; const accountAbility = distributedAccount.getDistributedAccountAbility(); accountAbility.updateOsAccountDistributedInfo( { @@ -70,7 +68,7 @@ export default function ActsOsAccountThirdPartyTest_third_1() { console.debug("====>getDistributedVirtualDeviceId start===="); var id = await AccountManager.getDistributedVirtualDeviceId(); console.debug("====>getDistributedVirtualDeviceId:" + id); - expect(id).assertEqual(deviceId); + expect(id !== 'ohosAnonymousUid').assertTrue() console.debug("====>ActsOsAccountDeviceId_0200 end===="); done(); })