diff --git a/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountGet.test.js b/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountGet.test.js index 23ba58d28d70d1a90f88134905096611bc7ebdef..8811d86bd6a867f25396220c91e72cbc2a16316c 100644 --- a/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountGet.test.js +++ b/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountGet.test.js @@ -416,7 +416,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() { * @tc.name : getCreatedOsAccountsCount callback * @tc.desc : Verify to obtain the number os all os accounts created */ - it('ActsOsAccountGetCount_0100', 0, async function (done) { + it('ActsOsAccountGetCount_0100', 0, async function (done) { console.debug("====>ActsOsAccountGetCount_0100 start===="); var osAccountManager = osaccount.getAccountManager(); console.debug("====>get AccountManager finish===="); @@ -434,17 +434,17 @@ export default function ActsOsAccountThirdPartyTest_third_2() { localIdFir = data.localId; expect(err).assertEqual(null); expect(data.localName).assertEqual("osAccountNameIdSerialE"); - osAccountManager.createOsAccount("osAccountIdSerialF", osaccount.OsAccountType.NORMAL, (err, data)=>{ - console.debug("====>create second os account err: " + JSON.stringify(err)); - console.debug("====>create second os account OsAccountInfo: " + JSON.stringify(data)); - localIdSec = data.localId; - expect(err).assertEqual(null); - expect(data.localName).assertEqual("osAccountIdSerialF"); + // osAccountManager.createOsAccount("osAccountIdSerialF", osaccount.OsAccountType.NORMAL, (err, data)=>{ + // console.debug("====>create second os account err: " + JSON.stringify(err)); + // console.debug("====>create second os account OsAccountInfo: " + JSON.stringify(data)); + // localIdSec = data.localId; + // expect(err).assertEqual(null); + // expect(data.localName).assertEqual("osAccountIdSerialF"); osAccountManager.getCreatedOsAccountsCount((err, count)=>{ - console.debug("====>obtains the number of all os accounts created err:" + JSON.stringify(err)); + console.debug("====>obtains the number of all os accounts created err:" + JSON.stringify(err)); console.debug("====>obtains the number of all os accounts created count:" + count); expect(err).assertEqual(null); - count = count - 2; + count = count - 1; expect(count).assertEqual(obtainCount); osAccountManager.removeOsAccount(localIdFir, (err)=>{ console.debug("====>remove localId: " + localIdFir + " err:" + JSON.stringify(err)); @@ -453,18 +453,19 @@ export default function ActsOsAccountThirdPartyTest_third_2() { console.debug("====>obtains the number accounts created err:" + JSON.stringify(err)); console.debug("====>obtains the number accounts created data:" + data); expect(err).assertEqual(null); - data = data - 1; + // data = data; expect(data).assertEqual(obtainCount); - osAccountManager.removeOsAccount(localIdSec, (err)=>{ - console.debug("====>remove localId: " + localIdSec + " err:" + JSON.stringify(err)); - expect(err).assertEqual(null); - console.debug("====>ActsOsAccountGetCount_0100 end===="); + // osAccountManager.removeOsAccount(localIdSec, (err)=>{ + // console.debug("====>remove localId: " + localIdSec + " err:" + JSON.stringify(err)); + // expect(err).assertEqual(null); + + // }) + console.debug("====>ActsOsAccountGetCount_0100 end===="); done(); - }) }) }) }) - }) + // }) }) }) }) @@ -484,22 +485,22 @@ export default function ActsOsAccountThirdPartyTest_third_2() { console.debug("====>create first os account OsAccountInfo: " + JSON.stringify(osAccountFir)); var localIdFir = osAccountFir.localId; expect(osAccountFir.localName).assertEqual("osAccountIdSerialG"); - var osAccountSec = await osAccountManager.createOsAccount("osAccountIdSerialH", osaccount.OsAccountType.NORMAL); - console.debug("====>create second os account OsAccountInfo: " + JSON.stringify(osAccountSec)); - var localIdSec = osAccountSec.localId; - expect(osAccountSec.localName).assertEqual("osAccountIdSerialH"); + // var osAccountSec = await osAccountManager.createOsAccount("osAccountIdSerialH", osaccount.OsAccountType.NORMAL); + // console.debug("====>create second os account OsAccountInfo: " + JSON.stringify(osAccountSec)); + // var localIdSec = osAccountSec.localId; + // expect(osAccountSec.localName).assertEqual("osAccountIdSerialH"); var countFir = await osAccountManager.getCreatedOsAccountsCount(); console.debug("====>obtains the number of all os accounts created count:" + countFir); - countFir = countFir - 2; + countFir = countFir - 1; expect(countFir).assertEqual(obtainCount); await osAccountManager.removeOsAccount(localIdFir); console.debug("====>remove localId: " + localIdFir); var countSec = await osAccountManager.getCreatedOsAccountsCount(); console.debug("====>obtains the number accounts created count:" + countSec); - countSec = countSec - 1; + // countSec = countSec ; expect(countSec).assertEqual(obtainCount); - await osAccountManager.removeOsAccount(localIdSec); - console.debug("====>remove localId: " + localIdSec); + // await osAccountManager.removeOsAccount(localIdSec); + // console.debug("====>remove localId: " + localIdSec); console.debug("====>ActsOsAccountGetCount_0200 end===="); done(); }) 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 7c6759d517b21a412d1e220a6b5ce2fb55c0c6b3..e2c1f3fa129ecd0d16b071e93cecc12d6d005977 100644 --- a/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountQuery.test.js +++ b/account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountQuery.test.js @@ -418,7 +418,7 @@ export default function ActsOsAccountThirdPartyTest_third_4() { * @tc.name : getOsAccountCount callback * @tc.desc : Verify to obtain the number os all os accounts created */ - it('ActsOsAccountQueryCounts_0100', 0, async function (done) { + it('ActsOsAccountQueryCounts_0100', 0, async function (done) { console.debug("====>ActsOsAccountQueryCounts_0100 start===="); var osAccountManager = osaccount.getAccountManager(); console.debug("====>get AccountManager finish===="); @@ -436,37 +436,37 @@ export default function ActsOsAccountThirdPartyTest_third_4() { localIdFir = data.localId; expect(err).assertEqual(null); expect(data.localName).assertEqual("osAccountNameIdSerialE"); - osAccountManager.createOsAccount("osAccountIdSerialF", osaccount.OsAccountType.NORMAL, (err, data)=>{ - console.debug("====>create second os account err: " + JSON.stringify(err)); - console.debug("====>create second os account OsAccountInfo: " + JSON.stringify(data)); - localIdSec = data.localId; - expect(err).assertEqual(null); - expect(data.localName).assertEqual("osAccountIdSerialF"); + // osAccountManager.createOsAccount("osAccountIdSerialF", osaccount.OsAccountType.NORMAL, (err, data)=>{ + // console.debug("====>create second os account err: " + JSON.stringify(err)); + // console.debug("====>create second os account OsAccountInfo: " + JSON.stringify(data)); + // localIdSec = data.localId; + // expect(err).assertEqual(null); + // expect(data.localName).assertEqual("osAccountIdSerialF"); osAccountManager.getOsAccountCount((err, count)=>{ console.debug("====>obtains the number of all os accounts created err:" + JSON.stringify(err)); console.debug("====>obtains the number of all os accounts created count:" + count); expect(err).assertEqual(null); - count = count - 2; + count = count - 1; expect(count).assertEqual(obtainCount); osAccountManager.removeOsAccount(localIdFir, (err)=>{ console.debug("====>remove localId: " + localIdFir + " err:" + JSON.stringify(err)); expect(err).assertEqual(null); osAccountManager.getOsAccountCount((err, data)=>{ - console.debug("====>obtains the number accounts created err:" + JSON.stringify(err)); + console.debug("====>obtains the number accounts created err:" + JSON.stringify(err)); console.debug("====>obtains the number accounts created data:" + data); - expect(err).assertEqual(null); - data = data - 1; - expect(data).assertEqual(obtainCount); - osAccountManager.removeOsAccount(localIdSec, (err)=>{ - console.debug("====>remove localId: " + localIdSec + " err:" + JSON.stringify(err)); - expect(err).assertEqual(null); + expect(err).assertEqual(null); + // data = data - 1; + expect(data).assertEqual(obtainCount); + // osAccountManager.removeOsAccount(localIdSec, (err)=>{ + // console.debug("====>remove localId: " + localIdSec + " err:" + JSON.stringify(err)); + // expect(err).assertEqual(null); console.debug("====>ActsOsAccountQueryCounts_0100 end===="); done(); - }) - }) + // }) + }) }) }) - }) + // }) }) }) }) @@ -486,26 +486,27 @@ export default function ActsOsAccountThirdPartyTest_third_4() { console.debug("====>create first os account OsAccountInfo: " + JSON.stringify(osAccountFir)); var localIdFir = osAccountFir.localId; expect(osAccountFir.localName).assertEqual("osAccountIdSerialG"); - var osAccountSec = await osAccountManager.createOsAccount("osAccountIdSerialH", osaccount.OsAccountType.NORMAL); - console.debug("====>create second os account OsAccountInfo: " + JSON.stringify(osAccountSec)); - var localIdSec = osAccountSec.localId; - expect(osAccountSec.localName).assertEqual("osAccountIdSerialH"); + // var osAccountSec = await osAccountManager.createOsAccount("osAccountIdSerialH", osaccount.OsAccountType.NORMAL); + // console.debug("====>create second os account OsAccountInfo: " + JSON.stringify(osAccountSec)); + // var localIdSec = osAccountSec.localId; + // expect(osAccountSec.localName).assertEqual("osAccountIdSerialH"); var countFir = await osAccountManager.getOsAccountCount(); console.debug("====>obtains the number of all os accounts created count:" + countFir); - countFir = countFir - 2; + countFir = countFir - 1; expect(countFir).assertEqual(obtainCount); await osAccountManager.removeOsAccount(localIdFir); console.debug("====>remove localId: " + localIdFir); - var countSec = await osAccountManager.getOsAccountCount(); - console.debug("====>obtains the number accounts created count:" + countSec); - countSec = countSec - 1; - expect(countSec).assertEqual(obtainCount); - await osAccountManager.removeOsAccount(localIdSec); - console.debug("====>remove localId: " + localIdSec); + // var countSec = await osAccountManager.getOsAccountCount(); + // console.debug("====>obtains the number accounts created count:" + countSec); + // countSec = countSec - 1; + // expect(countSec).assertEqual(obtainCount); + // await osAccountManager.removeOsAccount(localIdSec); + // console.debug("====>remove localId: " + localIdSec); console.debug("====>ActsOsAccountQueryCounts_0200 end===="); done(); }) + /* * @tc.number : ActsOsAccountGetActivedOsAccountIds_0100 * @tc.name : getActivatedOsAccountIds callback