提交 88c6ea4f 编写于 作者: 1 15829070344

【账号】新接口用例覆盖,账号js层参数解析失败无返回结果问题处理

Signed-off-by: N15829070344 <hehaitao5@huawei.com>
上级 1e78ab78
......@@ -13,7 +13,8 @@
"ActsAccountTest.hap",
"ActsAccountSceneAppAccess.hap",
"ActsAccountSceneOnOff.hap",
"ActsAccountOauthtoken.hap"
"ActsAccountOauthtoken.hap",
"ActsAccountAuthenticator.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import account from '@ohos.account.appAccount'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
const NAMELIMIT = 512;
const LENGTHLIMIT = 1024;
const name = 'zhangsan'
const owner = 'com.example.accountauthenticator'
export default function ActsAccountAppAccess() {
describe('ActsAccountAuthenticator', function () {
/*
* @tc.number : ActsAccountCheckAccountLabels_0100
* @tc.name : Check Account Labels callback form
* @tc.desc :
*/
it('ActsAccountCheckAccountLabels_0100', 0, async function (done) {
console.debug("====>ActsAccountCheckAccountLabels_0100 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>start finish====");
appAccountManager.addAccount(name, 'test_extraInfo', (err)=>{
console.debug("====>ActsAccountCheckAccountLabels_0100 add_account_err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.checkAccountLabels(name, owner, ['level4'], (err, data)=>{
console.debug("====>ActsAccountCheckAccountLabels_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined);
console.debug("====>ActsAccountCheckAccountLabels_0100 data:" + JSON.stringify(data));
appAccountManager.deleteAccount(name, (err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0100 deleteAccount_err:" + JSON.stringify(err))
expect(err.code).assertEqual(0);
console.debug("====>ActsAccountCheckAccountLabels_0100 end====");
done();
})
});
});
});
/*
* @tc.number : ActsAccountCheckAccountLabels_0200
* @tc.name : Check Account Labels callback form
* @tc.desc :
*/
it('ActsAccountCheckAccountLabels_0200', 0, async function (done) {
console.debug("====>ActsAccountCheckAccountLabels_0200 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountCheckAccountLabels_0200 add_account_err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.checkAccountLabels(name, owner, ['20-30'], (err, data)=>{
console.debug("====>ActsAccountCheckAccountLabels_0200 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined);
console.debug("====>ActsAccountCheckAccountLabels_0200 data:" + JSON.stringify(data));
appAccountManager.deleteAccount(name, (err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0200 deleteAccount_err:" + JSON.stringify(err))
expect(err.code).assertEqual(0);
console.debug("====>ActsAccountCheckAccountLabels_0200 end====");
done();
})
});
});
});
/*
* @tc.number : ActsAccountCheckAccountLabels_0300
* @tc.name : Check Account Labels callback form
* @tc.desc :
*/
it('ActsAccountCheckAccountLabels_0300', 0, async function (done) {
console.debug("====>ActsAccountCheckAccountLabels_0300 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>start finish====");
appAccountManager.addAccount('CheckAccountLabels_0300', (err)=>{
console.debug("====>ActsAccountCheckAccountLabels_0300 add_account_err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.checkAccountLabels('CheckAccountLabels_0300', owner, ['male'], (err, data)=>{
console.debug("====>ActsAccountCheckAccountLabels_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined);
console.debug("====>ActsAccountCheckAccountLabels_0300 data:" + JSON.stringify(data));
expect(data).assertEqual(false)
appAccountManager.deleteAccount("CheckAccountLabels_0300", (err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0300 deleteAccount_err:" + JSON.stringify(err))
expect(err.code).assertEqual(0);
console.debug("====>ActsAccountCheckAccountLabels_0300 end====");
done();
})
});
});
});
/*
* @tc.number : ActsAccountCheckAccountLabels_0400
* @tc.name : Check Account Labels promise form
* @tc.desc :
*/
it('ActsAccountCheckAccountLabels_0400', 0, async function (done) {
console.debug("====>ActsAccountCheckAccountLabels_0400 start====");
var appAccountManager = account.createAppAccountManager();
await appAccountManager.addAccount(name, 'test_extraInfo').then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0400 add_account_success");
appAccountManager.checkAccountLabels(name, owner, ['level4']).then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0400 data:" + JSON.stringify(data));
appAccountManager.deleteAccount(name).then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0400 delete_account_success");
}).catch((err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0400 delete_account_err");
});
done();
}).catch((err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0400 err:" + JSON.stringify(err))
expect(typeof(err) != undefined).assertTrue();
done();
})
}).catch((err) => {
console.debug("====>ActsAccountCheckAccountLabels_0400 add_account_err:" + JSON.stringify(err))
expect(err.code!=0).assertTrue();
done();
})
});
/*
* @tc.number : ActsAccountCheckAccountLabels_0500
* @tc.name : Check Account Labels promise form
* @tc.desc :
*/
it('ActsAccountCheckAccountLabels_0500', 0, async function (done) {
console.debug("====>ActsAccountCheckAccountLabels_0500 start====");
var appAccountManager = account.createAppAccountManager();
await appAccountManager.addAccount(name, 'test_extraInfo').then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0500 add_account_success");
appAccountManager.checkAccountLabels(name, owner, ['20-30']).then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0500 data:" + JSON.stringify(data));
expect(account.Constants.KEY_REQUIRED_LABELS).assertEqual('requiredLabels')
expect(account.Constants.KEY_BOOLEAN_RESULT).assertEqual('booleanResult')
appAccountManager.deleteAccount(name).then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0500 delete_account_success");
}).catch((err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0500 delete_account_err");
});
done()
}).catch((err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0500 err:" + JSON.stringify(err))
expect(typeof(err) != undefined).assertTrue();
done();
})
}).catch((err) => {
console.debug("====>ActsAccountCheckAccountLabels_0500 add_account_err:" + JSON.stringify(err))
expect().assertFail();
done();
})
});
/*
* @tc.number : ActsAccountCheckAccountLabels_0600
* @tc.name : Check Account Labels promise form
* @tc.desc :
*/
it('ActsAccountCheckAccountLabels_0600', 0, async function (done) {
console.debug("====>ActsAccountCheckAccountLabels_0600 start====");
var appAccountManager = account.createAppAccountManager();
await appAccountManager.addAccount('CheckAccountLabels_0600', 'test_extraInfo').then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0600 add_account_success:" + JSON.stringify(data));
appAccountManager.checkAccountLabels('CheckAccountLabels_0600', owner, ['male']).then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0600 data:" + JSON.stringify(data));
appAccountManager.deleteAccount('CheckAccountLabels_0600').then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0600 delete_account_success");
}).catch((err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0600 delete_account_err");
});
done()
}).catch((err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0600 err:" + JSON.stringify(err))
expect().assertFail();
done();
})
}).catch((err) => {
console.debug("====>ActsAccountCheckAccountLabels_0600 add_account_err:" + JSON.stringify(err))
expect().assertFail();
done();
})
});
/*
* @tc.number : ActsAccountCheckAppAccess_0100
* @tc.name : Check App Access callback form
* @tc.desc :
*/
it('ActsAccountCheckAppAccess_0100', 0, async function (done) {
console.debug("====>ActsAccountCheckAppAccess_0100 start====");
var appAccountManager = account.createAppAccountManager();
appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountCheckAppAccess_0100 add_account_err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.checkAppAccess(name, owner, (err, data)=>{
console.debug("====>ActsAccountCheckAppAccess_0100 first_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined);
console.debug("====>ActsAccountCheckAppAccess_0100 first_data:" + JSON.stringify(data));
expect(data).assertEqual(false)
appAccountManager.enableAppAccess(name, owner, (err, data) =>{
console.debug("====>ActsAccountCheckAppAccess_0100 enableAppAccess_err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.checkAppAccess(name, owner, (err, data) =>{
console.debug("====>ActsAccountCheckAppAccess_0100 second_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined);
expect(data).assertEqual(true)
appAccountManager.disableAppAccess(name, owner, (err, data) =>{
console.debug("====>ActsAccountCheckAppAccess_0100 disableAppAccount_err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.checkAppAccess(name, owner,(err, data)=>{
console.debug("====>ActsAccountCheckAppAccess_0100 third_err:" + JSON.stringify(err))
expect(err).assertEqual(undefined)
expect(data).assertEqual(false)
try {
appAccountManager.deleteAccount(name)
console.debug('====>ActsAccountCheckAppAccess_0100 deleteAccount_success')
done();
}
catch{
console.debug('====>ActsAccountCheckAppAccess_0100 deleteAccount_err')
expect().assertFail()
}
})
})
})
})
});
});
});
/*
* @tc.number : ActsAccountCheckAppAccess_0200
* @tc.name : Check App Access promise form
* @tc.desc :
*/
it('ActsAccountCheckAppAccess_0200', 0, async function (done) {
console.debug("====>ActsAccountCheckAppAccess_0200 start====");
var appAccountManager = account.createAppAccountManager();
appAccountManager.addAccount(name, 'test_extraInfo').then((data) =>{
console.debug("====>ActsAccountCheckAppAccess_0200 add_account_success:");
appAccountManager.checkAppAccess(name, owner).then((data) =>{
console.debug("====>ActsAccountCheckAppAccess_0200 first_data:" + JSON.stringify(data));
expect(data).assertEqual(false);
appAccountManager.enableAppAccess(name, owner).then((data) =>{
console.debug("====>ActsAccountCheckAppAccess_0200 enableAppAccess_success");
appAccountManager.checkAppAccess(name, owner).then((data) =>{
console.debug("====>ActsAccountCheckAppAccess_0200 second_data:" + JSON.stringify(data));
expect(data).assertEqual(true);
appAccountManager.disableAppAccess(name, owner).then((data)=>{
console.debug("====>ActsAccountCheckAppAccess_0200 disabAppAccess_data:" + JSON.stringify(data));
appAccountManager.checkAppAccess(name, owner).then((data) =>{
console.debug("====>ActsAccountCheckAppAccess_0200 third_data:" + JSON.stringify(data));
expect(data).assertEqual(false);
try{
appAccountManager.deleteAccount(name)
console.debug('====>ActsAccountCheckAppAccess_0200 deleteAccount_success')
done();
}
catch{
console.debug('====>ActsAccountCheckAppAccess_0100 deleteAccount_err')
expect().assertFail()
}
}).catch((err)=>{
console.debug("====>ActsAccountCheckAppAccess_0200 third_err:" + JSON.stringify(err));
expect().assertFail();
done();
})
}).catch((err) =>{
console.debug("====>ActsAccountCheckAppAccess_0200 disableAppAccess_err:" + JSON.stringify(err));
expect().assertFail();
done();
})
}).catch((err) =>{
console.debug("====>ActsAccountCheckAppAccess_0200 second_err:" + JSON.stringify(err));
expect().assertFail();
done();
})
}).catch((err)=>{
console.debug("====>ActsAccountCheckAppAccess_0200 enableAppAccess_err:" + JSON.stringify(err));
expect().assertFail();
done();
})
}).catch((err) =>{
console.debug("====>ActsAccountCheckAppAccess_0200 first_err:" + JSON.stringify(err));
expect().assertFail();
done();
})
}).catch((err) => {
console.debug("====>ActsAccountCheckAppAccess_0200 addAccount_err:" + JSON.stringify(err));
expect().assertFail();
done();
})
});
/*
* @tc.number : ActsAccountDeleteAccountCredential_0100
* @tc.name : Delete Account Credential callback form
* @tc.desc :
*/
it('ActsAccountDeleteAccountCredential_0100', 0, async function (done) {
console.debug("====>ActsAccountDeleteAccountCredential_0100 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountDeleteAccountCredential_0100 add_account_err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.setAccountCredential(name, "PIN", (err, data)=>{
console.debug("====>ActsAccountDeleteAccountCredential_0100 setAccountCredential_err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
console.debug("====>ActsAccountDeleteAccountCredential_0100 setAccountCredential_data:" + JSON.stringify(data));
appAccountManager.getAccountCredential(name, "PIN", (err) =>{
console.debug("====>ActsAccountDeleteAccountCredential_0100 getAccountCredential_err:" + JSON.stringify(err))
expect(err.code).assertEqual(0);
console.debug("====>ActsAccountDeleteAccountCredential_0100 getAccountCredential_success:" + JSON.stringify(data));
appAccountManager.deleteAccountCredential(name, "PIN", (err, data)=>{
console.debug("====>ActsAccountDeleteAccountCredential_0100 deleteAccountCredential_err:" + JSON.stringify(err));
expect(err).assertEqual(undefined);
expect(data).assertEqual(undefined);
console.debug("====>ActsAccountDeleteAccountCredential_0100 deleteAccountCredential_data:" + JSON.stringify(data));
try{
appAccountManager.deleteAccount(name)
console.debug('====>ActsAccountDeleteAccountCredential_0100 deleteAccount_success')
done();
}
catch{
console.debug('====>ActsAccountDeleteAccountCredential_0100 deleteAccount_err')
expect().assertFail()
done();
}
})
})
});
});
});
/*
* @tc.number : ActsAccountDeleteAccountCredential_0200
* @tc.name : Delete Account Credential promise form
* @tc.desc :
*/
it('ActsAccountDeleteAccountCredential_0200', 0, async function (done) {
console.debug("====>ActsAccountDeleteAccountCredential_0200 start====");
var appAccountManager = account.createAppAccountManager();
appAccountManager.addAccount(name, 'test_extraInfo').then((data) =>{
console.debug("====>ActsAccountDeleteAccountCredential_0200 add_account_success");
appAccountManager.setAccountCredential(name, "PIN").then((data) =>{
console.debug("====>ActsAccountDeleteAccountCredential_0200 setAccountCredential_success");
expect(data).assertEqual(undefined);
appAccountManager.getAccountCredential(name, "PIN").then((data) =>{
console.debug("====>ActsAccountDeleteAccountCredential_0200 getAccountCredential_data:" + JSON.stringify(data));
appAccountManager.deleteAccountCredential(name, "PIN").then((data) =>{
console.debug("====>ActsAccountDeleteAccountCredential_0200 data:" + JSON.stringify(data));
expect(data).assertEqual(undefined); //expect undefined assertEqual true
try{
appAccountManager.deleteAccount(name)
console.debug('====>ActsAccountDeleteAccountCredential_0200 deleteAccount_success')
done();
}
catch{
console.debug('====>ActsAccountDeleteAccountCredential_0200 deleteAccount_err')
expect().assertFail()
}
}).catch((err) =>{
console.debug("====>ActsAccountDeleteAccountCredential_0200 err:" + JSON.stringify(err));
expect().assertFail();
done();
})
}).catch((err)=>{
console.debug("====>ActsAccountDeleteAccountCredential_0200 getAccountCredential_err:" + JSON.stringify(err));
expect().assertFail();
done();
})
}).catch((err) =>{
console.debug("====>ActsAccountDeleteAccountCredential_0200 setAccountCredential_err:" + JSON.stringify(err));
expect().assertFail();
done();
})
}).catch((err) => {
console.debug("====>ActsAccountDeleteAccountCredential_0200 addAccount_err:" + JSON.stringify(err));
expect().assertFail();
done();
})
});
/*
* @tc.number : ActsAccountVerifyCredential_0100
* @tc.name : Verify Credential callback form, options
* @tc.desc :
*/
it('ActsAccountVerifyCredential_0100', 0, async function (done) {
console.debug("====>ActsAccountVerifyCredential_0100 start====");
var appAccountManager = account.createAppAccountManager();
var options = {credentialType: "PIN", credential: "123456"}
console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountVerifyCredential_0100 add_account_err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.verifyCredential(name, owner, options, {
onResult:(resultCode, resultData)=>{
console.debug("====>ActsAccountVerifyCredential_0100 verifyCredential_resultcode:" + JSON.stringify(resultCode));
expect(resultCode).assertEqual(0)
console.debug("====>ActsAccountVerifyCredential_0100 verifyCredential_resultData:" + JSON.stringify(resultData));
expect(resultData.booleanResult).assertEqual(true)
try{
appAccountManager.deleteAccount(name)
console.debug('====>ActsAccountVerifyCredential_0100 deleteAccount_success')
done();
}
catch{
console.debug('====>ActsAccountVerifyCredential_0100 deleteAccount_err')
expect().assertFail()
}
done();
},
onRequestRedirected:null,
onRequestContinued: function(){
console.debug("====>ActsAccountVerifyCredential_0100 verifyCredential_onRequestContinued")
}
});
});
});
/*
* @tc.number : ActsAccountVerifyCredential_0200
* @tc.name : Verify Credential callback form
* @tc.desc :
*/
it('ActsAccountVerifyCredential_0200', 0, async function (done) {
console.debug("====>ActsAccountVerifyCredential_0200 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountVerifyCredential_0200 add_account_err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
console.debug("====>ActsAccountVerifyCredential_0200 add_account_err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.verifyCredential(name, owner, {
onResult:(resultCode, resultData)=>{
console.debug("====>ActsAccountVerifyCredential_0200 verifyCredential_resultcode:" + JSON.stringify(resultCode));
expect(resultCode).assertEqual(0)
console.debug("====>ActsAccountVerifyCredential_0200 verifyCredential_resultData:" + JSON.stringify(resultData));
expect(resultData.booleanResult).assertEqual(false)
try{
appAccountManager.deleteAccount(name)
console.debug('====>ActsAccountVerifyCredential_0200 deleteAccount_success')
done();
}
catch{
console.debug('====>ActsAccountVerifyCredential_0200 deleteAccount_err')
expect().assertFail()
}
done();
},
onRequestRedirected:null,
onRequestContinued: function(){
console.debug("====>ActsAccountVerifyCredential_0200 verifyCredential_onRequestContinued")
}
});
});
});
/*
* @tc.number : ActsAccountSetAuthenticatorProperties_0100
* @tc.name : Verify Credential callback form, options
* @tc.desc :
*/
it('ActsAccountSetAuthenticatorProperties_0100', 0, async function (done) {
console.debug("====>ActsAccountSetAuthenticatorProperties_0100 start====");
var appAccountManager = account.createAppAccountManager();
var options = {credentialType: "PIN", credential: "123456"}
console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountSetAuthenticatorProperties_0100 add_account_err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.setAuthenticatorProperties(owner, options, {
onResult:(resultCode, resultData)=>{
console.debug("====>ActsAccountSetAuthenticatorProperties_0100 setAuthenticatorProperties_resultcode:" + JSON.stringify(resultCode));
expect(resultCode).assertEqual(10016)
console.debug("====>ActsAccountSetAuthenticatorProperties_0100 setAuthenticatorProperties_resultData:" + JSON.stringify(resultData));
try{
appAccountManager.deleteAccount(name)
console.debug('====>ActsAccountSetAuthenticatorProperties_0100 deleteAccount_success')
done();
}
catch{
console.debug('====>ActsAccountSetAuthenticatorProperties_0100 deleteAccount_err')
expect().assertFail()
}
done();
},
onRequestRedirected:null,
onRequestContinued: function(){
console.debug("====>ActsAccountSetAuthenticatorProperties_0100 verifyCredential_onRequestContinued")
}
});
});
});
/*
* @tc.number : ActsAccountSetAuthenticatorProperties_0200
* @tc.name : Verify Credential callback form
* @tc.desc :
*/
it('ActsAccountSetAuthenticatorProperties_0200', 0, async function (done) {
console.debug("====>ActsAccountSetAuthenticatorProperties_0200 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountSetAuthenticatorProperties_0200 add_account_err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.setAuthenticatorProperties(owner, {
onResult:(resultCode, resultData)=>{
console.debug("====>ActsAccountSetAuthenticatorProperties_0200 setAuthenticatorProperties_resultcode:" + JSON.stringify(resultCode));
expect(resultCode).assertEqual(10016)
console.debug("====>ActsAccountSetAuthenticatorProperties_0200 setAuthenticatorProperties_resultData:" + JSON.stringify(resultData));
try{
appAccountManager.deleteAccount(name)
console.debug('====>ActsAccountSetAuthenticatorProperties_0200 deleteAccount_success')
done();
}
catch{
console.debug('====>ActsAccountSetAuthenticatorProperties_0200 deleteAccount_err')
expect().assertFail()
}
done();
},
onRequestRedirected:null,
onRequestContinued: function(){
console.debug("====>ActsAccountSetAuthenticatorProperties_0200 verifyCredential_onRequestContinued")
}
});
});
});
/*
* @tc.number : ActsAccountSelectAccountByOptions_0100
* @tc.name : Verify Credential callback form
* @tc.desc :
*/
it('ActsAccountSelectAccountByOptions_0100', 0, async function (done) {
console.debug("====>ActsAccountSelectAccountByOptions_0100 start====");
var appAccountManager = account.createAppAccountManager();
var select_options = {"allowedAccounts":[{"name":name,"owner":owner}]}
console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountSelectAccountByOptions_0100 add_account_err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.selectAccountsByOptions(select_options, ((err, data)=>{
console.debug("====>ActsAccountSelectAccountByOptions_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined)
console.debug("====>ActsAccountSelectAccountByOptions_0100 data:" + JSON.stringify(data.length));
expect(data.length).assertEqual(0)
done();
}))
try{
appAccountManager.deleteAccount(name)
console.debug('====>ActsAccountSelectAccountByOptions_0100 deleteAccount_success')
done();
}
catch{
console.debug('====>ActsAccountSelectAccountByOptions_0100 deleteAccount_err')
expect().assertFail()
}
});
});
/*
* @tc.number : ActsAccountSelectAccountByOptions_0100
* @tc.name : Verify Credential callback form
* @tc.desc :
*/
it('ActsAccountSelectAccountByOptions_0200', 0, async function (done) {
console.debug("====>ActsAccountSelectAccountByOptions_0200 start====");
var appAccountManager = account.createAppAccountManager();
var select_options = {"allowedOwners": [owner]}
console.debug("====>start finish====");
appAccountManager.addAccount(name, (err)=>{
console.debug("====>ActsAccountSelectAccountByOptions_0200 add_account_err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.selectAccountsByOptions(select_options).then((data)=>{
console.debug("====>ActsAccountSelectAccountByOptions_0200 data:" + JSON.stringify(data.length));
expect(data.length).assertEqual(0)
done();
}).catch(()=>{
onsole.debug("====>ActsAccountSelectAccountByOptions_0200 err:" + JSON.stringify(err));
expect(err).assertEqual(undefined)
done()
})
try{
appAccountManager.deleteAccount(name)
console.debug('====>ActsAccountSelectAccountByOptions_0200 deleteAccount_success')
done();
}
catch{
console.debug('====>ActsAccountSelectAccountByOptions_0200 deleteAccount_err')
expect().assertFail()
}
});
});
})
}
\ No newline at end of file
......@@ -22,6 +22,7 @@ import ActsAccountOAuthToken from './OAuthToken.test.js'
import ActsCreatAppAccountManager from './CreatManager.test.js'
import ActsAccountNoPermission from './NoPermission.test.js'
import ActsAccountChangeOnOff from './OnOff.js'
import ActsAccountAuthenticator from './Authenticator.test.js'
export default function testsuite() {
ActsAccountAddAccount()
ActsAccountAppAccess()
......@@ -33,4 +34,5 @@ export default function testsuite() {
ActsAccountNoPermission()
ActsAccountOAuthToken()
ActsAccountChangeOnOff()
ActsAccountAuthenticator()
}
\ No newline at end of file
......@@ -24,6 +24,7 @@ group("appaccount_scene") {
"actsaccountsceneappaccess:ActsAccountSceneAppAccess",
"actsaccountsceneonoff:ActsAccountSceneOnOff",
"actsscenegetallaccounts:ActsSceneGetAllAccounts",
"actsaccountauthenticator:ActsAccountAuthenticator"
]
}
}
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_hap("ActsAccountAuthenticator") {
hap_profile = "./entry/src/main/config.json"
hap_name = "ActsAccountAuthenticator"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_service_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_js_assets("hjs_demo_js_service_assets") {
source_dir = "./entry/src/main/js/ServiceAbility"
}
ohos_resources("hjs_demo_resources") {
sources = [ "./entry/src/main/resources" ]
hap_profile = "./entry/src/main/config.json"
}
{
"app": {
"vendor": "example",
"bundleName": "com.example.accountauthenticator",
"version": {
"code": 1000000,
"name": "1.0.0"
},
"apiVersion": {
"compatible": 7,
"target": 7
}
},
"deviceConfig": {},
"module": {
"mainAbility": ".MainAbility",
"deviceType": [
"default",
"tablet"
],
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"orientation": "unspecified",
"visible": true,
"srcPath": "MainAbility",
"name": ".MainAbility",
"srcLanguage": "js",
"icon": "$media:icon",
"description": "$string:MainAbility_desc",
"formsEnabled": false,
"label": "$string:MainAbility_label",
"type": "page",
"launchType": "standard"
},
{
"srcPath": "ServiceAbility",
"name": ".ServiceAbility",
"srcLanguage": "js",
"icon": "$media:icon",
"description": "$string:ServiceAbility_desc",
"type": "service",
"visible": true,
"skills": [{"actions": [
"ohos.account.appAccount.action.oauth"
]}]
}
],
"distro": {
"moduleType": "entry",
"installationFree": true,
"deliveryWithInstall": true,
"moduleName": "entry"
},
"package": "com.example.entry",
"srcPath": "",
"name": ".entry",
"js": [
{
"pages": [
"pages/index/index"
],
"name": ".MainAbility",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
import account_appAccount from '@ohos.account.appAccount';
import rpc from '@ohos.rpc';
var TAG = "[AccountTest]"
class MyParameter {
constructor(params, size) {
this.params = params
this.size = size
}
marshalling(parcel) {
parcel.writeInt(this.size)
console.log(TAG + "size: " + this.size)
for (var key in this.params) {
parcel.writeString(key)
console.log(TAG + "writeBoolean key: " + key)
var value = this.params[key]
switch (typeof value) {
case 'string':
console.log(TAG + "writeString value: " + value)
parcel.writeInt(9)
parcel.writeString(value)
break
case 'boolean':
console.log(TAG + "writeBoolean value: " + value)
parcel.writeInt(1)
parcel.writeBoolean(value)
break
}
}
return true
}
unmarshalling(parcel) {
this.size = parcel.readInt()
console.log(TAG + "size: " + this.size)
for (var i = 0; i < this.size; ++i) {
var key = parcel.readString()
console.log(TAG + "key: " + key)
var type = parcel.readInt()
console.log(TAG + "type: " + type)
var value = null
switch (type) {
case 9:
value = parcel.readString()
break
case 1:
value = parcel.readBool()
break
}
console.log(TAG + "value: " + value)
this[key] = value
}
}
}
class MyWant {
constructor(bundleName, abilityName, parameters) {
this.bundleName = bundleName
this.abilityName = abilityName
this.paramSize = 0
for (var key in parameters) {
this.paramSize ++
}
this.parameters = new MyParameter(parameters, this.paramSize)
}
marshalling(parcel) {
// action
parcel.writeString("")
// uri
parcel.writeInt(-1)
// entities
parcel.writeInt(-1)
// flag
parcel.writeInt(0)
if (this.bundleName == "" && this.abilityName == "") {
// element
parcel.writeInt(-1)
} else {
parcel.writeInt(1)
}
// parameters
if (this.paramSize > 0) {
parcel.writeInt(1)
parcel.writeSequenceable(this.parameters)
} else {
parcel.writeInt(-1)
}
// bundleName
parcel.writeString(this.bundleName)
// picker
parcel.writeInt(-1)
return true
}
unmarshalling(parcel) {
// action
console.log(TAG + "action: " + parcel.readString());
// uri
console.log(TAG + "uri: " + parcel.readInt());
// entities
console.log(TAG + "entities: " + parcel.readInt());
// flag
console.log(TAG + "flag: " + parcel.readInt())
// element
console.log(TAG + "element: " + parcel.readInt())
// parameters
var hasParam = parcel.readInt()
console.log(TAG + "hasParam: " + hasParam)
if (hasParam == 1) {
parcel.readSequenceable(this.parameters)
}
// bundleName
parcel.readString()
// picker
parcel.readInt()
return true;
}
}
class VerifyCredentialOptions {
constructor(credentialType, credential, parameters) {
this.credential = credential
this.credentialType = credentialType
this.parameters = new MyParameter(parameters, 0)
}
unmarshalling(parcel) {
this.credentialType = readString8(parcel)
this.credential = readString8(parcel)
parcel.readSequenceable(this.parameters)
return true
}
}
class SetPropertiesOptions {
constructor(properties, parameters) {
this.properties = new MyParameter(properties, 0)
this.parameters = new MyParameter(parameters, 0)
}
unmarshalling(parcel) {
parcel.readSequenceable(this.properties)
parcel.readSequenceable(this.parameters)
return true
}
}
function readString8(data) {
var size = data.readInt()
var padSize = (((size + 4) & (~3)) - size - 1)
console.log(TAG + "padSize: " + padSize)
var str = ""
var count = 0
for (var i = 0; i < (size + 1 + padSize) / 4; ++i) {
var result = data.readInt()
if (count != size) {
str += String.fromCharCode((result & 0x000000FF))
count++
}
if (count != size) {
str += String.fromCharCode((result & 0x0000FF00) >>> 8)
count++
}
if (count != size) {
str += String.fromCharCode((result & 0x00FF0000) >>> 16)
count++
}
if (count != size) {
str += String.fromCharCode((result & 0xFF000000) >>> 24)
count++
}
}
return str
}
function readStringArray(data) {
var size = data.readInt()
console.log(TAG + "label size: " + size)
var result = []
for (var i = 0; i < size; ++i) {
result.push(readString8(data))
}
return result
}
class MyAuthenticatorCallback {
constructor(callback) {
this.callback = callback
this.newData = new rpc.MessageParcel()
this.newReply = new rpc.MessageParcel()
this.newOptions = new rpc.MessageOption()
this.newData.writeInterfaceToken("ohos.accountfwk.IAppAccountAuthenticatorCallback")
}
onResult(resultCode, result) {
this.newData.writeInt(resultCode)
var want = new MyWant("", "", result)
this.newData.writeSequenceable(want)
this.callback.sendRequest(0, this.newData, this.newReply, this.newOptions)
}
onRequestRedirected(request) {
this.newData.writeSequenceable(request)
this.callback.sendRequest(1, this.newData, this.newReply, this.newOptions)
}
onRequestContinued() {
this.callback.sendRequest(2, this.newData, this.newReply, this.newOptions)
}
}
class MyAuthenticator extends rpc.RemoteObject {
authenticatorImpl = new MyAuthenticatorImpl()
constructor() {
super("authenticator")
}
onRemoteRequest(code, data, reply, options) {
console.log(TAG + "code: " + code)
data.readInterfaceToken()
var name = null
var callback = null
switch (code) {
case 2 :
name = readString8(data)
var verifyOptions = new VerifyCredentialOptions("", "", {})
data.readSequenceable(verifyOptions)
callback = new MyAuthenticatorCallback(data.readRemoteObject())
this.authenticatorImpl.verifyCredential(name, verifyOptions, callback)
break
case 3 :
name = readString8(data)
var labels = readStringArray(data)
callback = new MyAuthenticatorCallback(data.readRemoteObject())
console.log(TAG + "callback: " + callback)
this.authenticatorImpl.checkAccountLabels(name, labels, callback)
break
case 4 :
var setOptions = new SetPropertiesOptions({}, {})
data.readSequenceable(setOptions)
callback = new MyAuthenticatorCallback(data.readRemoteObject())
this.authenticatorImpl.setProperties(setOptions, callback)
break
case 5 :
name = readString8(data)
callback = new MyAuthenticatorCallback(data.readRemoteObject())
this.authenticatorImpl.isAccountRemovable(name, callback)
break
}
return true
}
getRemoteObject() {
return this
}
}
class MyAuthenticatorImpl {
accountLables = {
"zhangsan": ["male", "30-40", "level4"],
"lisi": ["female"]
}
accountCredentials = {
"zhangsan": {
"PIN": "123456",
"NUMBER": "12356789"
},
"lisi": {
"FACE": "X00001"
}
}
accountRemovability = {
"zhangsan": false,
"lisi": true
}
properties = {}
verifyCredential(name, options, callback) {
console.log(TAG + "name: " + name + ", options: " + JSON.stringify(options))
if (name == "xiaoming") {
callback.onRequestContinued()
return
}
var credentialInfo = this.accountCredentials[name]
if (credentialInfo == undefined) {
callback.onResult(0, {"booleanResult": false})
return
}
if (options.credentialType == undefined || options.credential == undefined) {
var want = new MyWant("com.ohos.accountauthenticator", "VerifyAbility",
{"credentialType": options.credentialType, "credential": options.credential})
callback.onRequestRedirected(want)
return
}
var credential = credentialInfo[options.credentialType.toUpperCase()]
if (credential == undefined || credential != options.credential) {
callback.onResult(0, {"booleanResult": false})
return
}
callback.onResult(0, {"booleanResult": true})
}
checkAccountLabels(name, labels, callback) {
console.log(TAG + "name: " + name + ", labels: " + JSON.stringify(labels))
if (labels.length == 0) {
callback.onResult(0, {"booleanResult": true})
return
}
var allLabels = this.accountLables[name]
if (allLabels == undefined || allLabels.length == 0) {
callback.onResult(0, {"booleanResult": false})
return
}
for (var i = 0; i < labels.length; ++i) {
if (allLabels.indexOf(labels[i]) == -1) {
callback.onResult(0, {"booleanResult": false})
return
}
}
callback.onResult(0, {"booleanResult": true})
}
setProperties(options, callback) {
console.log(TAG + "options: " + JSON.stringify(options))
callback.onResult(10016, {})
}
isAccountRemovable(name, callback) {
console.log(TAG + "name: " + name)
var isRemovable = this.accountRemovability[name]
if (isRemovable == undefined || isRemovable == false) {
callback.onResult(0, {"booleanResult": false})
return
}
callback.onResult(0, {"booleanResult": true})
}
}
export {MyAuthenticator}
\ No newline at end of file
export default {
onCreate() {
console.info("Application onCreate");
},
onDestroy() {
console.info("Application onDestroy");
},
};
{
"strings": {
"hello": "Hello",
"world": "World"
},
"Files": {
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界"
},
"Files": {
}
}
\ No newline at end of file
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
@media screen and (device-type: default) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
\ No newline at end of file
export default {
data: {
title: "Hello World"
},
onInit() {
this.title = this.$t('strings.world');
},
}
import account_appAccount from '@ohos.account.appAccount';
import {MyAuthenticator} from '../Common/utils'
var TAG = "[AccountTest]"
var authenticator = null
export default {
async onStart(want) {
console.info('ServiceAbility onStart');
var accountMgr = account_appAccount.createAppAccountManager();
try {
await accountMgr.addAccount("zhangsan", "");
await accountMgr.enableAppAccess("zhangsan", "com.example.accounttest");
await accountMgr.addAccount("lisi", "");
await accountMgr.enableAppAccess("lisi", "com.example.accounttest");
await accountMgr.addAccount("wangwu", "");
await accountMgr.enableAppAccess("wangwu", "com.example.accounttest");
} catch(err) {
console.error(TAG + "addAccount or enableAppAccess failed, error: " + JSON.stringify(err))
}
console.info('ServiceAbility onStart end');
},
async onStop() {
console.info('ServiceAbility onStop');
},
onConnect(want) {
console.info('ServiceAbility onConnect');
authenticator = new MyAuthenticator();
return authenticator.getRemoteObject();
},
onReconnect(want) {
console.info('ServiceAbility onReconnect');
},
onDisconnect() {
console.info('ServiceAbility onDisconnect');
},
onCommand(want, restart, startId) {
console.info('ServiceAbility onCommand');
}
};
\ No newline at end of file
{
"string": [
{
"name": "entry_desc",
"value": "description"
},
{
"name": "MainAbility_desc",
"value": "description"
},
{
"name": "MainAbility_label",
"value": "label"
},
{
"name": "ServiceAbility_desc",
"value": "hap sample empty service"
}
]
}
\ No newline at end of file
......@@ -169,18 +169,12 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
var AccountManager = osAccount.getAccountManager();
console.debug("====>get os AccountManager finish====");
var localIdStr = "100";
function funcIsActived(err, data){
console.debug("====>error received callback====");
AccountManager.isOsAccountActived(localIdStr, (err, data)=>{
console.debug("====>receive isOsAccountActived err: " + JSON.stringify(err));
expect(err.code !=0 ).assertEqual(true)
console.debug("====>receive isOsAccountActived data: " + JSON.stringify(data));
expect().assertFail();
done();
}
AccountManager.isOsAccountActived(localIdStr, funcIsActived);
setTimeout(()=>{
console.debug("====>ActsOsAccountIsActived_0500 end====");
done();
}, TIMEOUT);
});
})
/*
......@@ -193,11 +187,14 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
var AccountManager = osAccount.getAccountManager();
console.debug("====>get os AccountManager finish====");
var localIdStr = "100";
var isActived = await AccountManager.isOsAccountActived(localIdStr);
console.debug("====>get active status is: " + isActived);
expect(isActived).assertEqual(null);
console.debug("====>ActsOsAccountIsActived_0600 end====");
done();
AccountManager.isOsAccountActived(localIdStr).then((data)=>{
console.debug("====>get active status is: " + JSON.stringify(data));
done();
}).catch((err)=>{
expect(err.code !=0 ).assertEqual(true)
console.debug("====>ActsOsAccountIsActived_0600 err:" + JSON.stringify(err));
done();
})
})
/*
......@@ -209,18 +206,12 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
console.debug("====>ActsOsAccountIsActived_0700 start");
var AccountManager = osAccount.getAccountManager();
console.debug("====>get os AccountManager finish====");
function funcIsActived(err, data){
console.debug("====>error received callback====");
console.debug("====>receive isOsAccountActived err: " + JSON.stringify(err));
AccountManager.isOsAccountActived(undefined, (err, data)=>{
console.debug("====>ActsOsAccountIsActived_0700 err:" + JSON.stringify(err));
expect(err != 0).assertEqual(true)
console.debug("====>receive isOsAccountActived data: " + JSON.stringify(data));
expect().assertFail();
done();
}
AccountManager.isOsAccountActived(undefined, funcIsActived);
setTimeout(()=>{
console.debug("====>ActsOsAccountIsActived_0700 end====");
done();
}, TIMEOUT);
})
})
/*
......@@ -231,12 +222,16 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
it('ActsOsAccountIsActived_0800', 0, async function(done){
console.debug("====>ActsOsAccountIsActived_0800 start====");
var AccountManager = osAccount.getAccountManager();
console.debug("====>get os AccountManager finish====");
var isActived = await AccountManager.isOsAccountActived(undefined);
console.debug("====>get active status is: " + isActived);
expect(isActived).assertEqual(null);
console.debug("====>ActsOsAccountIsActived_0800 end====");
done();
console.debug("====>ActsOsAccountIsActived_0800 get os AccountManager finish====");
AccountManager.isOsAccountActived(undefined).then((data)=>{
console.debug("====>ActsOsAccountIsActived_0800 get active status is: " + JSON.stringify(data));
done()
}).catch((err)=>{
console.debug("====>ActsOsAccountIsActived_0800 err:" + JSON.stringify(err))
expect(err != 0).assertEqual(true);
console.debug("====>ActsOsAccountIsActived_0800 end====");
done();
})
})
/*
......@@ -359,18 +354,14 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
var AccountManager = osAccount.getAccountManager();
console.debug("====>get os AccountManager finish====");
var localIdStr = "100";
function funcIsVerified(err, data){
AccountManager.isOsAccountVerified(localIdStr, (err, data)=>{
console.debug("====>error received callback====");
console.debug("====>receive isOsAccountVerified err: " + JSON.stringify(err));
expect(err.code).assertEqual(0);
expect(data).assertEqual(false);
console.debug("====>receive isOsAccountVerified data: " + JSON.stringify(data));
expect().assertFail();
done();
}
AccountManager.isOsAccountVerified(localIdStr, funcIsVerified);
setTimeout(()=>{
console.debug("====>ActsOsAccountIsVerified_0500 end====");
done();
}, TIMEOUT);
})
})
/*
......@@ -383,11 +374,15 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
var AccountManager = osAccount.getAccountManager();
console.debug("====>get os AccountManager finish====");
var localIdStr = "100";
var isVerified = await AccountManager.isOsAccountVerified(localIdStr);
console.debug("====>get verified status is: " + isVerified);
expect(isVerified).assertEqual(null);
console.debug("====>ActsOsAccountIsVerified_0600 end====");
done();
AccountManager.isOsAccountVerified(localIdStr).then((data)=>{
expect(data).assertEqual(false); //
console.debug("====>ActsOsAccountIsVerified_0600 end====");
done();
}).catch((err)=>{
console.debug("====>get verified err: " + JSON.stringify(err));
expect().assertFail()
done();
})
})
/*
......@@ -400,18 +395,14 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
var AccountManager = osAccount.getAccountManager();
console.debug("====>get os AccountManager finish====");
var localIdUndefined = undefined;
function funcIsVerified(err, data){
console.debug("====>error received callback====");
console.debug("====>receive isOsAccountVerified err: " + JSON.stringify(err));
console.debug("====>receive isOsAccountVerified data: " + JSON.stringify(data));
expect().assertFail();
done();
}
AccountManager.isOsAccountVerified(localIdUndefined, funcIsVerified);
setTimeout(()=>{
AccountManager.isOsAccountVerified(localIdUndefined, (err, data) =>{
console.debug("====>ActsOsAccountIsVerified_0700 isOsAccountVerified_err:" + JSON.stringify(err))
expect(err.code).assertEqual(0)
console.debug("====>ActsOsAccountIsVerified_0700 isOsAccountVerified_data:" + JSON.stringify(data))
expect(data).assertEqual(false)
console.debug("====>ActsOsAccountIsVerified_0700 end====");
done();
}, TIMEOUT);
});
})
/*
......@@ -424,11 +415,16 @@ export default function ActsOsAccountThirdPartyTest_third_1() {
var AccountManager = osAccount.getAccountManager();
console.debug("====>get os AccountManager finish====");
var localIdUndefined = undefined;
var isVerified = await AccountManager.isOsAccountVerified(localIdUndefined);
console.debug("====>get verified status is: " + isVerified);
expect(isVerified).assertEqual(null);
console.debug("====>ActsOsAccountIsVerified_0800 end====");
done();
AccountManager.isOsAccountVerified(localIdUndefined).then((data)=>{
console.debug("====>ActsOsAccountIsVerified_0800 isOsAccountVerified_data:" + JSON.stringify(data))
expect(data).assertEqual(false)
console.debug("====>ActsOsAccountIsVerified_0700 end====");
done();
}).catch((err)=>{
console.debug("====>ActsOsAccountIsVerified_0700 isOsAccountVerified_err:" + JSON.stringify(err))
expect(err.code !=0 ).assertEqual(true)
done();
})
})
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册