From 405c7b78a09e7a5f5c1253759762206bf4dfc127 Mon Sep 17 00:00:00 2001 From: 123 <834689456@qq.com> Date: Tue, 15 Aug 2023 09:50:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E5=B8=83=E5=BC=8F=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 123 <834689456@qq.com> Change-Id: Ia0aaa8e54149d804addb09046bb418465933ee9e --- .../src/main/js/test/ActsDSGetSet.test.js | 58 ++++++++++--------- .../src/main/js/test/OsAccount.test.js | 40 +++++++------ .../src/main/js/test/OsAccountCheck.test.js | 6 +- .../src/main/js/test/OsAccountIs.test.js | 6 +- 4 files changed, 59 insertions(+), 51 deletions(-) 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 2ff3b0e24..bb0c24989 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 94aee96fe..f57905d96 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 505e2c9d1..fa3af9754 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 d943aaca9..e4dce9dae 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(); }) -- GitLab