Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
4600f6e1
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
大约 1 年 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
4600f6e1
编写于
3月 25, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 25, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2834 修改useriam测试套
Merge pull request !2834 from 胡吉翔/useriam_0324
上级
270a9f05
6095addf
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
659 addition
and
1185 deletion
+659
-1185
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/List.test.js
...on_test/userauthpart2/entry/src/main/js/test/List.test.js
+0
-2
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Publicfunction-n.js
.../userauthpart2/entry/src/main/js/test/Publicfunction-n.js
+0
-4
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_DFX_CallbackJsunit.test.js
...in/js/test/Security_IAM_Coauth_DFX_CallbackJsunit.test.js
+15
-4
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_Func_CallbackJsunit.test.js
...n/js/test/Security_IAM_Coauth_Func_CallbackJsunit.test.js
+75
-27
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_DFX_CallbackJsunit.test.js
...main/js/test/Security_IAM_Face_DFX_CallbackJsunit.test.js
+69
-200
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_Func_CallbackJsunit.test.js
...ain/js/test/Security_IAM_Face_Func_CallbackJsunit.test.js
+24
-548
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_DFX_CallbackJsunit.test.js
...js/test/Security_IAM_Interface_DFX_CallbackJsunit.test.js
+160
-24
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_Func_CallbackJsunit.test.js
...s/test/Security_IAM_Interface_Func_CallbackJsunit.test.js
+105
-14
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_DFX_CallbackJsunit.test.js
.../main/js/test/Security_IAM_PIN_DFX_CallbackJsunit.test.js
+38
-10
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_Func_CallbackJsunit.test.js
...main/js/test/Security_IAM_PIN_Func_CallbackJsunit.test.js
+116
-349
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_Kit_CallbackJsunit.test.js
.../main/js/test/Security_IAM_PIN_Kit_CallbackJsunit.test.js
+57
-3
未找到文件。
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/List.test.js
浏览文件 @
4600f6e1
...
...
@@ -14,8 +14,6 @@
*/
require
(
'
./Security_IAM_PIN_DFX_CallbackJsunit.test.js
'
)
// require('./mytest.test.js')
require
(
'
./Security_IAM_PIN_Func_CallbackJsunit.test.js
'
)
require
(
'
./Security_IAM_PIN_Kit_CallbackJsunit.test.js
'
)
require
(
'
./Security_IAM_Face_DFX_CallbackJsunit.test.js
'
)
...
...
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Publicfunction-n.js
浏览文件 @
4600f6e1
...
...
@@ -26,7 +26,6 @@ function sleep(ms) {
return
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
ms
));
}
//同步
function
publicRegisterInputer
(
PinAuth
,
AuthSubType
,
Inputerdata
){
console
.
info
(
'
testFace publicRegisterInputer in
'
);
try
{
...
...
@@ -194,7 +193,6 @@ function publicupdateCred(UserIDM,CredentialInfo,callback1,callback2){
}
}
//同步
function
publiccancel
(
UserIDM
,
challenge
){
console
.
info
(
'
testFace publiccancel in
'
);
try
{
...
...
@@ -328,7 +326,6 @@ function publicgetallAuthInfo(UserIDM,callback){
}
}
//同步
function
publicgetAvailabeStatus
(
UserAuth
,
authType
,
authTrustLevel
){
console
.
info
(
'
testFace publicgetAvailableStatus in
'
);
try
{
...
...
@@ -465,7 +462,6 @@ function publicauthUser(UserAuth,userID,challenge,authType,authTrustLevel,callba
}
}
//同步
function
publicgecancelAuth
(
UserAuth
,
contextID
){
console
.
info
(
'
testFace publicgecancelAuth in
'
);
try
{
...
...
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_DFX_CallbackJsunit.test.js
浏览文件 @
4600f6e1
...
...
@@ -121,6 +121,13 @@ function sleep(ms) {
describe
(
'
userauthTest
'
,
function
()
{
/**
* @tc.name the token from old session is not available in the new session
* @tc.number Security_IAM_Coauth_DFX_0105
* @tc.size MEDIUM
* @tc.type FUNC
* @tc.level Level3
*/
it
(
'
Security_IAM_Coauth_DFX_0105
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Coauth_DFX_0105 start
'
);
try
{
...
...
@@ -183,6 +190,13 @@ describe('userauthTest', function () {
}
})
/**
* @tc.name old challenge is not available in the new session
* @tc.number Security_IAM_Coauth_DFX_0106
* @tc.size MEDIUM
* @tc.type FUNC
* @tc.level Level2
*/
it
(
'
Security_IAM_Coauth_DFX_0106
'
,
3
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Coauth_DFX_0106 start
'
);
try
{
...
...
@@ -212,7 +226,4 @@ describe('userauthTest', function () {
expect
(
null
).
assertFail
();
}
})
})
})
\ No newline at end of file
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_Func_CallbackJsunit.test.js
浏览文件 @
4600f6e1
...
...
@@ -122,14 +122,12 @@ function sleep(ms) {
describe
(
'
userauthTest
'
,
function
()
{
/*
* @tc.number : testGetEntriesString101
* @tc.name : Use getEntries get the value by mixing the string key
* @tc.desc : Mixed strings value can be obtained correctly
* @tc.number : Security_IAM_Coauth_Func_0102
* @tc.name : Can't use old challenge add face in new session
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Coauth_Func_0102
'
,
3
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -180,7 +178,14 @@ describe('userauthTest', function () {
expect
(
null
).
assertFail
();
}
})
/*
* @tc.number : Security_IAM_Coauth_Func_0104
* @tc.name : Inquire face credential information
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_Coauth_Func_0104
'
,
3
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -232,6 +237,13 @@ describe('userauthTest', function () {
}
})
/*
* @tc.number : Security_IAM_Coauth_Func_0105
* @tc.name : Inquire all credential information with one credential
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_Coauth_Func_0105
'
,
3
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -273,6 +285,13 @@ describe('userauthTest', function () {
}
})
/*
* @tc.number : Security_IAM_Coauth_Func_0106
* @tc.name : Inquire all credential information with two credential
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Coauth_Func_0106
'
,
3
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -320,7 +339,13 @@ describe('userauthTest', function () {
}
})
/*
* @tc.number : Security_IAM_Coauth_Func_0108
* @tc.name : Get face availabe status
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
'
Security_IAM_Coauth_Func_0108
'
,
3
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -374,6 +399,13 @@ describe('userauthTest', function () {
}
})
/*
* @tc.number : Security_IAM_Coauth_Func_0109
* @tc.name : Get pin availabe status
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
'
Security_IAM_Coauth_Func_0109
'
,
2
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -422,6 +454,13 @@ describe('userauthTest', function () {
}
})
/*
* @tc.number : Security_IAM_Coauth_Func_0110
* @tc.name : Get pin and face property
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
'
Security_IAM_Coauth_Func_0110
'
,
3
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -467,6 +506,13 @@ describe('userauthTest', function () {
}
})
/*
* @tc.number : Security_IAM_Coauth_Func_0112
* @tc.name : Anti violence cracking with four times
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
'
Security_IAM_Coauth_Func_0112
'
,
3
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Coauth_Func_0112 start
'
);
try
{
...
...
@@ -483,8 +529,8 @@ describe('userauthTest', function () {
console
.
info
(
"
Security_IAM_Coauth_Func_0112 token =
"
+
token
);
publicFC
.
publicunRegisterInputer
(
PinAuth
,
async
function
(
data
)
{
console
.
info
(
"
Security_IAM_Coauth_Func_0112 unRegist =
"
+
data
);
await
setTimeout
(
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdatan
),
500
)
setTimeout
(
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdatan
),
500
)
console
.
info
(
"
Security_IAM_Coauth_Func_0112 challenge2 =
"
+
challenge1
);
await
publicFC
.
publicauth
(
UserAuth
,
challenge1
,
AuthType
.
PIN
,
AuthTurstLevel
.
ATL1
,
function
(
data
)
{
...
...
@@ -510,8 +556,8 @@ describe('userauthTest', function () {
expect
(
1
).
assertEqual
(
data
.
remainTimes
);
publicFC
.
publicunRegisterInputer
(
PinAuth
,
async
function
(
data
)
{
console
.
info
(
"
Security_IAM_Coauth_Func_0112 unRegist =
"
+
data
);
await
setTimeout
(
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
),
500
)
setTimeout
(
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
),
500
)
console
.
info
(
"
Coauth_Func_0112 challenge2 =
"
+
challenge1
);
await
publicFC
.
publicauth
(
UserAuth
,
challenge1
,
AuthType
.
PIN
,
AuthTurstLevel
.
ATL1
,
...
...
@@ -555,6 +601,13 @@ describe('userauthTest', function () {
}
})
/*
* @tc.number : Security_IAM_Coauth_Func_0122
* @tc.name : Cancel auth face.
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
Security_IAM_Coauth_Func_0122
'
,
0
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -577,7 +630,6 @@ describe('userauthTest', function () {
console
.
info
(
'
Coauth_Func_0122 publicaddCredential =
'
+
addfaceresult
.
addCredresult
);
expect
(
ResultCode
.
SUCCESS
).
assertEqual
(
addfaceresult
.
addCredresult
);
publicFC
.
publicauth
(
UserAuth
,
challenge
,
AuthType
.
FACE
,
10000
,
async
function
(
data
)
{
// console.info('testFace AuthTest_0101 onResult = ' + JSON.stringify(data));
let
faceauth101
=
data
;
console
.
info
(
'
Coauth_Func_0122 publicauth =
'
+
faceauth101
.
authresult
);
expect
(
ResultCode
.
SUCCESS
).
assertEqual
(
faceauth101
.
authresult
);
...
...
@@ -625,6 +677,13 @@ describe('userauthTest', function () {
}
})
/*
* @tc.number : Security_IAM_Coauth_Func_0113
* @tc.name : Anti violence cracking with five times
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
Security_IAM_Coauth_Func_0113
'
,
3
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Coauth_Func_0113 start
'
);
try
{
...
...
@@ -641,8 +700,8 @@ describe('userauthTest', function () {
console
.
info
(
"
Security_IAM_Coauth_Func_0113 token =
"
+
token
);
publicFC
.
publicunRegisterInputer
(
PinAuth
,
async
function
(
data
)
{
console
.
info
(
"
Security_IAM_Coauth_Func_0113 unRegist =
"
+
data
);
await
setTimeout
(
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdatan
),
500
)
setTimeout
(
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdatan
),
500
)
console
.
info
(
"
Security_IAM_Coauth_Func_0113 challenge2 =
"
+
challenge1
);
await
publicFC
.
publicauth
(
UserAuth
,
challenge1
,
AuthType
.
PIN
,
AuthTurstLevel
.
ATL1
,
function
(
data
)
{
...
...
@@ -669,21 +728,14 @@ describe('userauthTest', function () {
expect
(
0
).
assertEqual
(
data
.
remainTimes
);
publicFC
.
publicunRegisterInputer
(
PinAuth
,
async
function
(
data
)
{
console
.
info
(
"
Coauth_Func_0113 unRegist =
"
+
data
);
await
setTimeout
(
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
),
500
)
setTimeout
(
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
),
500
)
console
.
info
(
"
Coauth_Func_0113 challenge2 =
"
+
challenge1
);
await
publicFC
.
publicauth
(
UserAuth
,
challenge1
,
AuthType
.
PIN
,
AuthTurstLevel
.
ATL1
,
async
function
(
data
)
{
let
authresult6
=
data
.
authresult
expect
(
ResultCode
.
LOCKED
).
assertEqual
(
authresult6
);
// await sleep(181000);
// await publicFC.publicauth(UserAuth, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, async function (data) {
// let authresult7 = data.authresult
// expect(ResultCode.SUCCESS).assertEqual(authresult7);
// publicFC.publicdelUser(UserIDM, token, function (data) {
// let delresult = data.delUserresult
// console.info("Security_IAM_Coauth_Func_0113 delresult = " + delresult);
publicFC
.
publicCloseSession
(
UserIDM
,
function
(
data
)
{
console
.
info
(
"
closesession =
"
+
data
);
...
...
@@ -693,10 +745,6 @@ describe('userauthTest', function () {
done
();
})
})
// }, function (data) {
// })
// }, function (data) {
// })
},
function
(
data
)
{
})
})
...
...
@@ -718,7 +766,7 @@ describe('userauthTest', function () {
})
})
}
catch
(
e
)
{
console
.
log
(
"
Security_IAM_Coauth_Func_011
2
fail
"
+
e
);
console
.
log
(
"
Security_IAM_Coauth_Func_011
3
fail
"
+
e
);
expect
(
null
).
assertFail
();
}
})
...
...
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_DFX_CallbackJsunit.test.js
浏览文件 @
4600f6e1
...
...
@@ -121,7 +121,14 @@ function sleep(ms) {
describe
(
'
userauthTest
'
,
function
()
{
it
(
'
Security_IAM_Face_AddCred_DFX_0103
'
,
2
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_AddCred_DFX_0103
* @tc.name : Can't add face with no pin
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
'
Security_IAM_Face_AddCred_DFX_0103
'
,
3
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
publicFC
.
publicOpenSession
(
UserIDM
,
function
(
data
)
{
...
...
@@ -168,6 +175,13 @@ describe('userauthTest', function () {
}
})
/*
* @tc.number : Security_IAM_Face_AddCred_DFX_0104
* @tc.name : Can't add face with no pin
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_Face_AddCred_DFX_0104
'
,
2
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -214,7 +228,14 @@ describe('userauthTest', function () {
}
})
it
(
'
Security_IAM_Face_Delet_DFX_0104
'
,
2
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Delet_DFX_0104
* @tc.name : Delete face with no pin
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
'
Security_IAM_Face_Delet_DFX_0104
'
,
3
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Face_Delet_DFX_0104 start
'
);
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -244,7 +265,14 @@ describe('userauthTest', function () {
}
})
it
(
'
Security_IAM_Face_Delet_DFX_0105
'
,
2
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Delet_DFX_0105
* @tc.name : Delete face with no face
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Face_Delet_DFX_0105
'
,
1
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
publicFC
.
publicOpenSession
(
UserIDM
,
function
(
data
)
{
...
...
@@ -290,7 +318,14 @@ describe('userauthTest', function () {
}
})
it
(
'
Security_IAM_Face_Auth_DFX_0101
'
,
2
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Auth_DFX_0101
* @tc.name : Auth face with no pin
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
'
Security_IAM_Face_Auth_DFX_0101
'
,
3
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Face_Auth_DFX_0101 start
'
);
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -320,6 +355,13 @@ describe('userauthTest', function () {
}
})
/*
* @tc.number : Security_IAM_Face_Auth_DFX_0102
* @tc.name : Auth face with no face
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
'
Security_IAM_Face_Auth_DFX_0102
'
,
2
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -364,7 +406,14 @@ describe('userauthTest', function () {
}
})
it
(
'
Security_IAM_Face_Auth_DFX_0104
'
,
2
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Auth_DFX_0104
* @tc.name : Auth face after delete pin
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 4
*/
it
(
'
Security_IAM_Face_Auth_DFX_0104
'
,
4
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
publicFC
.
publicOpenSession
(
UserIDM
,
function
(
data
)
{
...
...
@@ -413,6 +462,13 @@ describe('userauthTest', function () {
}
})
/*
* @tc.number : Security_IAM_Face_AddCred_DFX_0101
* @tc.name : Can't add face by old token
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 4
*/
it
(
'
Security_IAM_Face_AddCred_DFX_0101
'
,
0
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -471,7 +527,14 @@ describe('userauthTest', function () {
}
})
it
(
'
Security_IAM_Face_Delet_DFX_0101
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_AddCred_DFX_0101
* @tc.name : Can't delete face by wrong token
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_Face_Delet_DFX_0101
'
,
2
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
let
challenge
;
...
...
@@ -523,198 +586,4 @@ describe('userauthTest', function () {
expect
(
null
).
assertFail
();
}
})
// it('testcancelauthpinwitholdcontextID101', 0, async function (done) {
// try {
// publicFC.publicRegisterInputer(PinAuth, AuthSubType.PIN_SIX, Inputerdata)
// publicFC.publicOpenSession(UserIDM, function (data) {
// let challenge1 = data
// console.info("testcancelauthpinwitholdcontextID101 challenge1 = " + challenge1)
// publicFC.publicaddCredential(UserIDM, CredentialInfopinsix, function (data) {
// let addcredresult101 = data
// console.info("testcancelauthpinwitholdcontextID101 addcredresult101 = " + addcredresult101)
// let contextID1 = null
// publicFC.publicauth(UserAuth, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, function (data) {
// let authinfo101 = data
// contextID1 = UserAuth.authUser(userID, challenge1, AuthType.PIN, AuthTurstLevel.ATL1,
// async function (data) {
// await sleep(5000);
// let cancelresult = publicFC.publicgecancelAuth(UserAuth, authinfo101.contextID)
// console.info("testcancelauthpinwitholdcontextID101 cancelresult = " + cancelresult)
// expect(ResultCode.FAIL).assertEqual(authinfo101.contextID);
// cancelresult = publicFC.publicgecancelAuth(UserAuth, contextID1)
// expect(ResultCode.SUCCESS).assertEqual(contextID1);
// publicFC.publicauth(UserAuth, challenge1, AuthType.PIN, AuthTurstLevel.ATL1,
// function (data) {
// let info1011 = data
// console.info("testcancelauthpinwitholdcontextID101 info1011 = " + info1011)
// let token = info1011.extraInfo.token
// console.info("testcancelauthpinwitholdcontextID101 token = " + token)
// publicFC.publicdelUser(UserIDM, token, function (data) {
// let deluserresult = data.delUserresult
// console.info("testcancelauthpinwitholdcontextID deluserresult =" + deluserresult)
// publicFC.publicCloseSession(UserIDM, function (data) {
// console.info("testcancelauthpinwitholdcontextID101 closesession = " + data)
// publicFC.publicunRegisterInputer(PinAuth, function (data) {
// console.info("testcancelauthpinwitholdcontextID101 unRegist = " + data)
// done();
// })
// })
// }, function (data) {
// })
// }, function (data) {
// })
// }, function (data) {
// })
// }, function (data) {
// })
// }, function (data) {
// })
//
// })
//
// } catch (e) {
// console.log("testcancelauthwitholdchallenge101 fail " + e);
// expect(null).assertFail();
// }
// })
//
// it('testaddpincancelwitholdchallenge101', 0, async function (done) {
// console.info('testFace testaddpincancelwitholdchallenge101 start');
// try {
// publicFC.publicRegisterInputer(PinAuth, AuthSubType.PIN_MIXED, Inputerdata)
// publicFC.publicOpenSession(UserIDM, function (data) {
// let challenge = data
// console.info("testaddpincancelwitholdchallenge101 challenge = " + data)
// publicFC.publicOpenSession(UserIDM, function (data) {
// let challenge1 = data
// console.info("testaddpincancelwitholdchallenge101 challenge1 = " + data)
// UserIDM.updateCredential(CredentialInfopinsix, async function (data) {
// await sleep(5000);
// let cancelresult = publicFC.publiccancel(UserIDM, challenge)
// console.info("testaddpincancelwitholdchallenge101 cancelresult = " + cancelresult)
// expect(ResultCode.FAIL).assertEqual(cancelresult);
// let cancelresult1 = publicFC.publiccancel(UserIDM, challenge1)
// console.info("testaddpincancelwitholdchallenge101 cancelresult1 = " + cancelresult1)
// expect(ResultCode.SUCCESS).assertEqual(cancelresult1);
// publicFC.publicCloseSession(UserIDM, function (data) {
// console.info("testaddpincancelwitholdchallenge101 closesession = " + data)
// publicFC.publicunRegisterInputer(PinAuth, function (data) {
// console.info("testaddpincancelwitholdchallenge101 unRegist = " + data)
// done();
// })
// })
// }, function (data) {
// })
//
// })
//
// })
//
// } catch (e) {
// console.log("testaddpincancelwitholdchallenge101 fail " + e);
// expect(null).assertFail();
// }
// })
//
// it('testaddfacecancelwitholdchallenge101', 0, async function (done) {
// try {
// publicFC.publicRegisterInputer(PinAuth, AuthSubType.PIN_SIX, Inputerdata)
// publicFC.publicOpenSession(UserIDM, function (data) {
// let challenge1 = data;
// console.info("testaddfacecancelwitholdchallenge101 challenge1 = " + challenge1)
// publicFC.publicOpenSession(UserIDM, function (data) {
// let challenge2 = data;
// console.info("testaddfacecancelwitholdchallenge101 challenge2 = " + challenge2)
// publicFC.publicaddCredential(UserIDM, CredentialInfopinsix, function (data) {
// let info101 = publicFC.publicauth(UserAuth, challenge2, AuthType.PIN, AuthTurstLevel.ATL1)
// let token = info101.extraInfo.token
// CredentialInfoface2d.token = token
// console.info("testaddfacecancelwitholdchallenge101 token = " + token)
// UserIDM.addCredential(CredentialInfoface2d, async function (data) {
// let result1 = data.addCredresult
// console.info("testaddfacecancelwitholdchallenge101 result1 = " + result1)
// await sleep(3000);
// let cancelresult = publicFC.publiccancel(UserIDM, challenge1)
// console.info("testaddfacecancelwitholdchallenge101 cancelresult = " + cancelresult)
// expect(ResultCode.FAIL).assertEqual(cancelresult);
// let cancelresult2 = publicFC.publiccancel(UserIDM, challenge2)
// console.info("testaddfacecancelwitholdchallenge101 cancelresult2 = " + cancelresult2)
// expect(ResultCode.SUCCESS).assertEqual(cancelresult);
// expect(ResultCode.CANCELED).assertEqual(result1);
// publicFC.publicCloseSession(UserIDM, function (data) {
// console.info("testaddfacecancelwitholdchallenge101 closesession = " + data)
// publicFC.publicunRegisterInputer(PinAuth, function (data) {
// console.info("testaddfacecancelwitholdchallenge101 unRegist = " + data)
// done();
// })
// })
// }, function (data) {
// })
//
// }, function (data) {
// })
//
// })
//
// })
//
// } catch (e) {
// console.log("testaddfacecancel101 fail " + e);
// expect(null).assertFail();
// }
// })
//
// it('testcancelauthfacewitholdcontextID101', 0, async function (done) {
// try {
// publicFC.publicRegisterInputer(PinAuth, AuthSubType.PIN_SIX, Inputerdata)
// publicFC.publicOpenSession(UserIDM, function (data) {
// let challenge = data
// console.info("testcancelauthfacewitholdcontextID101 challenge = " + challenge)
// publicFC.publicaddCredential(UserIDM, CredentialInfopinsix, function (data) {
// let info101 = publicFC.publicauth(UserAuth, challenge, AuthType.PIN, AuthTurstLevel.ATL1)
// console.info("testcancelauthfacewitholdcontextID101 info101 = " + info101)
// let token = info101.extraInfo.token
// CredentialInfoface2d.token = token
// console.info("testcancelauthfacewitholdcontextID101 token = " + token)
// publicFC.publicaddCredential(UserIDM, CredentialInfoface2d, function (data) {
// let addfaceresult = data.addCredresult
// console.info("testcancelauthfacewitholdcontextID101 addfaceresult = " + addfaceresult)
// let contextID1 = null
// publicFC.publicauth(UserAuth, challenge, AuthType.PIN, AuthTurstLevel.ATL1,function(data){
// let authinfo101 = data
// contextID1 = UserAuth.auth(challenge, AuthType.FACE, AuthTurstLevel.ATL1,
// async function(data){
// await sleep(3000);
// let authfacecancel101 = publicFC.publicgecancelAuth(UserAuth, authinfo101.contextID)
// console.info("testcancelauthfacewitholdcontextID101 cancel101=" + authfacecancel101)
// expect(ResultCode.FAIL).assertEqual(authfacecancel101);
// let authfacecancel1011 = publicFC.publicgecancelAuth(UserAuth, contextID1);
// console.info("testcancelauthfacewitholdcontextID101 cancel = " + authfacecancel1011)
// expect(ResultCode.CANCELED).assertEqual(authfacecancel1011);
// publicFC.publicdelUser(UserIDM, token, function (data) {
// let deluserresult = data.delUserresult
// console.info("testcancelauthfacewitholdcontextID101 delresult =" + deluserresult)
// publicFC.publicCloseSession(UserIDM, function (data) {
// console.info("testcancelauthfacewitholdcontextID101 closesession = " + data)
// publicFC.publicunRegisterInputer(PinAuth, function (data) {
// console.info("testcancelauthfacewitholdcontextID101 unRegist = " + data)
// done();
// })
// })
// }, function (data) {
// })
// },function(data){})
//
// },function(data){})
//
// }, function (data) {})
// }, function (data) {})
// })
// } catch (e) {
// console.log("testauthfacecancel101 fail " + e);
// expect(null).assertFail();
// }
// })
})
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_Func_CallbackJsunit.test.js
浏览文件 @
4600f6e1
此差异已折叠。
点击以展开。
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_DFX_CallbackJsunit.test.js
浏览文件 @
4600f6e1
...
...
@@ -549,89 +549,225 @@ function getPropertyerror(inputer,done){
}
}
describe
(
'
userauthTest
'
,
function
()
{
it
(
'
Security_IAM_PIN_Interface_DFX_0101
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0101
* @tc.name : Test regrsterInputer interface DFX with null
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0101
'
,
2
,
async
function
(
done
)
{
inputererror
(
null
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0102
'
,
1
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0102
* @tc.name : Test regrsterInputer interface DFX with string
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0102
'
,
2
,
async
function
(
done
)
{
inputererror
(
'
Errortest
'
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0103
'
,
1
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0103
* @tc.name : Test addCredential interface DFX with null
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0103
'
,
2
,
async
function
(
done
)
{
addCredentialerr
(
null
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0104
'
,
1
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0104
* @tc.name : Test addCredential interface DFX with string
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0104
'
,
2
,
async
function
(
done
)
{
addCredentialerr
(
'
Errortest
'
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0105
'
,
1
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0105
* @tc.name : Test auth interface DFX with null
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0105
'
,
2
,
async
function
(
done
)
{
autherror
(
null
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0106
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0106
* @tc.name : Test auth interface DFX with string
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0106
'
,
2
,
async
function
(
done
)
{
autherror
(
'
Errortest
'
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0107
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0107
* @tc.name : Test authuser interface DFX with null
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0107
'
,
2
,
async
function
(
done
)
{
authusererror
(
null
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0108
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0108
* @tc.name : Test authuser interface DFX with string
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0108
'
,
2
,
async
function
(
done
)
{
authusererror
(
'
Errortest
'
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0109
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0109
* @tc.name : Test getProperty interface DFX with null
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0109
'
,
2
,
async
function
(
done
)
{
getPropertyerror
(
null
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0110
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0110
* @tc.name : Test getProperty interface DFX with string
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0110
'
,
2
,
async
function
(
done
)
{
getPropertyerror
(
'
Errortest
'
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0111
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0111
* @tc.name : Test updateCredential interface DFX with null
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0111
'
,
2
,
async
function
(
done
)
{
updateerror
(
null
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0112
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0112
* @tc.name : Test updateCredential interface DFX with string
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0112
'
,
2
,
async
function
(
done
)
{
updateerror
(
'
Errortest
'
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0113
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0113
* @tc.name : Test deluser interface DFX with null
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0113
'
,
2
,
async
function
(
done
)
{
delusererror
(
null
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0114
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0114
* @tc.name : Test deluser interface DFX with string
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0114
'
,
2
,
async
function
(
done
)
{
delusererror
(
'
Errortest
'
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0115
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0115
* @tc.name : Test delcred interface DFX with null
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0115
'
,
2
,
async
function
(
done
)
{
delcrederror
(
null
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0116
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0116
* @tc.name : Test delcred interface DFX with string
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0116
'
,
2
,
async
function
(
done
)
{
delcrederror
(
'
Errortest
'
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0117
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0117
* @tc.name : Test getauthinfo interface DFX with null
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0117
'
,
2
,
async
function
(
done
)
{
getauthinfoerror
(
null
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0118
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0118
* @tc.name : Test delcred interface DFX with string
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0118
'
,
2
,
async
function
(
done
)
{
getauthinfoerror
(
'
Errortest
'
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0119
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0119
* @tc.name : Test getAvailabeStatus interface DFX with null
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0119
'
,
2
,
async
function
(
done
)
{
getAvailabeStatuserror
(
null
,
done
);
})
it
(
'
Security_IAM_PIN_Interface_DFX_0120
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Interface_DFX_0120
* @tc.name : Test getAvailabeStatus interface DFX with string
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
Security_IAM_PIN_Interface_DFX_0120
'
,
2
,
async
function
(
done
)
{
getAvailabeStatuserror
(
'
Errortest
'
,
done
);
})
})
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_Func_CallbackJsunit.test.js
浏览文件 @
4600f6e1
...
...
@@ -21,8 +21,15 @@ import * as publicFC from './Publicfunction-n.js'
describe
(
'
userauthTest
'
,
function
()
{
it
(
'
Security_IAM_Face_Interface_check_IDMAuthSubType_0101
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Interface_check_IDMAuthSubType_0101
* @tc.name : InnerKit interface enum AuthSubType
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Face_Interface_check_IDMAuthSubType_0101
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_IDMAuthSubType_0101 start
'
);
expect
(
10000
).
assertEqual
(
userIDM
.
AuthSubType
.
PIN_SIX
);
expect
(
10001
).
assertEqual
(
userIDM
.
AuthSubType
.
PIN_NUMBER
);
...
...
@@ -33,7 +40,14 @@ describe('userauthTest', function () {
done
();
})
it
(
'
Security_IAM_Face_Interface_check_IDMAuthType_0101
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Interface_check_IDMAuthType_0101
* @tc.name : InnerKit interface enum AuthType
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Face_Interface_check_IDMAuthType_0101
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_IDMAuthSubType_0101 start
'
);
expect
(
1
).
assertEqual
(
userIDM
.
AuthType
.
PIN
);
expect
(
2
).
assertEqual
(
userIDM
.
AuthType
.
FACE
);
...
...
@@ -41,6 +55,13 @@ describe('userauthTest', function () {
done
();
})
/*
* @tc.number : Security_IAM_Face_Interface_check_pinauthAuthSubType_0101
* @tc.name : InnerKit interface enum AuthSubType
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Face_Interface_check_pinauthAuthSubType_0101
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_pinauthAuthSubType_0101 start
'
);
expect
(
10000
).
assertEqual
(
pinAuth
.
AuthSubType
.
PIN_SIX
);
...
...
@@ -52,7 +73,14 @@ describe('userauthTest', function () {
done
();
})
it
(
'
Security_IAM_Face_Interface_check_userauthAuthSubType_0101
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Interface_check_userauthAuthSubType_0101
* @tc.name : InnerKit interface enum AuthSubType
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Face_Interface_check_userauthAuthSubType_0101
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_userauthAuthSubType_0101 start
'
);
expect
(
10000
).
assertEqual
(
userAuth
.
AuthSubType
.
PIN_SIX
);
expect
(
10001
).
assertEqual
(
userAuth
.
AuthSubType
.
PIN_NUMBER
);
...
...
@@ -63,7 +91,14 @@ describe('userauthTest', function () {
done
();
})
it
(
'
Security_IAM_Face_Interface_check_userauthAuthTrustLevel_0101
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Interface_check_userauthAuthTrustLevel_0101
* @tc.name : InnerKit interface enum AuthTrustLevel
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Face_Interface_check_userauthAuthTrustLevel_0101
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_userauthAuthTrustLevel_0101 start
'
);
expect
(
10000
).
assertEqual
(
userAuth
.
AuthTrustLevel
.
ATL1
);
expect
(
20000
).
assertEqual
(
userAuth
.
AuthTrustLevel
.
ATL2
);
...
...
@@ -73,15 +108,29 @@ describe('userauthTest', function () {
done
();
})
it
(
'
Security_IAM_Face_Interface_check_userauthAuthType_0101
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Interface_check_userauthAuthType_0101
* @tc.name : InnerKit interface enum AuthType
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Face_Interface_check_userauthAuthType_0101
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_userauthAuthType_0101 start
'
);
expect
(
1
).
assertEqual
(
userAuth
.
AuthType
.
PIN
);
expect
(
2
).
assertEqual
(
userAuth
.
AuthType
.
FACE
);
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_userauthAuthType_0101 end
'
);
done
();
})
it
(
'
Security_IAM_Face_Interface_check_userauthGetPropertyType_0101
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Interface_check_userauthGetPropertyType_0101
* @tc.name : InnerKit interface enum GetPropertyType
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Face_Interface_check_userauthGetPropertyType_0101
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_userauthGetPropertyType_0101 start
'
);
expect
(
1
).
assertEqual
(
userAuth
.
GetPropertyType
.
AUTH_SUB_TYPE
);
expect
(
2
).
assertEqual
(
userAuth
.
GetPropertyType
.
REMAIN_TIMES
);
...
...
@@ -90,7 +139,14 @@ describe('userauthTest', function () {
done
();
})
it
(
'
Security_IAM_Face_Interface_check_userauthAuthMethod_0101
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Interface_check_userauthAuthMethod_0101
* @tc.name : InnerKit interface enum AuthMethod
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Face_Interface_check_userauthAuthMethod_0101
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_userauthAuthMethod_0101 start
'
);
expect
(
0xF
).
assertEqual
(
userAuth
.
AuthMethod
.
PIN_ONLY
);
expect
(
0xF0
).
assertEqual
(
userAuth
.
AuthMethod
.
FACE_ONLY
);
...
...
@@ -98,21 +154,42 @@ describe('userauthTest', function () {
done
();
})
it
(
'
Security_IAM_Face_Interface_check_userauthSetPropertyType_0101
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Interface_check_userauthSetPropertyType_0101
* @tc.name : InnerKit interface enum SetPropertyType
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Face_Interface_check_userauthSetPropertyType_0101
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_userauthSetPropertyType_0101 start
'
);
expect
(
1
).
assertEqual
(
userAuth
.
SetPropertyType
.
INIT_ALGORITHM
);
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_userauthSetPropertyType_0101 end
'
);
done
();
})
it
(
'
Security_IAM_Face_Interface_check_userauthModule_0101
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Interface_check_userauthModule_0101
* @tc.name : InnerKit interface enum Module
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Face_Interface_check_userauthModule_0101
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_userauthModule_0101 start
'
);
expect
(
1
).
assertEqual
(
userAuth
.
Module
.
FACE_AUTH
);
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_userauthModule_0101 end
'
);
done
();
})
it
(
'
Security_IAM_Face_Interface_check_userauthResultCode_0101
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Interface_check_userauthResultCode_0101
* @tc.name : InnerKit interface enum ResultCode
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Face_Interface_check_userauthResultCode_0101
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_userauthResultCode_0101 start
'
);
expect
(
0
).
assertEqual
(
userAuth
.
ResultCode
.
SUCCESS
);
expect
(
1
).
assertEqual
(
userAuth
.
ResultCode
.
FAIL
);
...
...
@@ -129,7 +206,14 @@ describe('userauthTest', function () {
done
();
})
it
(
'
Security_IAM_Face_Interface_check_userauthFaceTipsCode_0101
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Interface_check_userauthFaceTipsCode_0101
* @tc.name : InnerKit interface enum FaceTipsCode
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Face_Interface_check_userauthFaceTipsCode_0101
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_userauthFaceTipsCode_0101 start
'
);
expect
(
1
).
assertEqual
(
userAuth
.
FaceTipsCode
.
FACE_AUTH_TIP_TOO_BRIGHT
);
expect
(
2
).
assertEqual
(
userAuth
.
FaceTipsCode
.
FACE_AUTH_TIP_TOO_DARK
);
...
...
@@ -146,7 +230,14 @@ describe('userauthTest', function () {
done
();
})
it
(
'
Security_IAM_Face_Interface_check_userauthFingerprintTips_0101
'
,
0
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_Face_Interface_check_userauthFingerprintTips_0101
* @tc.name : InnerKit interface enum FingerprintTips
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_Face_Interface_check_userauthFingerprintTips_0101
'
,
1
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_Face_Interface_check_userauthFingerprintTips_0101 start
'
);
expect
(
0
).
assertEqual
(
userAuth
.
FingerprintTips
.
FINGERPRINT_TIP_GOOD
);
expect
(
1
).
assertEqual
(
userAuth
.
FingerprintTips
.
FINGERPRINT_TIP_IMAGER_DIRTY
);
...
...
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_DFX_CallbackJsunit.test.js
浏览文件 @
4600f6e1
...
...
@@ -123,9 +123,13 @@ function sleep(ms) {
describe
(
'
userauthTest
'
,
function
()
{
/*
* @tc.number : Security_IAM_PIN_AddCred_DFX_0102
* @tc.name : Add pin after add pin
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
'
Security_IAM_PIN_AddCred_DFX_0102
'
,
3
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -166,6 +170,13 @@ describe('userauthTest', function () {
}
})
/*
* @tc.number : Security_IAM_PIN_AddCred_DFX_0103
* @tc.name : Add pin after add pin
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
'
Security_IAM_PIN_AddCred_DFX_0103
'
,
3
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -205,8 +216,14 @@ describe('userauthTest', function () {
}
})
it
(
'
Security_IAM_PIN_Update_DFX_0101
'
,
3
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Update_DFX_0101
* @tc.name : Update pin with no pin
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_PIN_Update_DFX_0101
'
,
1
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
publicFC
.
publicOpenSession
(
UserIDM
,
function
(
data
)
{
...
...
@@ -239,15 +256,20 @@ describe('userauthTest', function () {
})
})
})
}
catch
(
e
)
{
console
.
log
(
"
Security_IAM_PIN_Update_DFX_0101 fail
"
+
e
);
expect
(
null
).
assertFail
();
}
})
it
(
'
Security_IAM_PIN_Update_DFX_0103
'
,
3
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Update_DFX_0103
* @tc.name : Update same pin with no error
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_PIN_Update_DFX_0103
'
,
1
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
publicFC
.
publicOpenSession
(
UserIDM
,
function
(
data
)
{
...
...
@@ -294,8 +316,14 @@ describe('userauthTest', function () {
})
it
(
'
Security_IAM_PIN_Delet_DFX_0101
'
,
3
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Delet_DFX_0101
* @tc.name : Can't delete pin wirh no pin
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'
Security_IAM_PIN_Delet_DFX_0101
'
,
1
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
publicFC
.
publicOpenSession
(
UserIDM
,
function
(
data
)
{
...
...
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_Func_CallbackJsunit.test.js
浏览文件 @
4600f6e1
此差异已折叠。
点击以展开。
useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_Kit_CallbackJsunit.test.js
浏览文件 @
4600f6e1
...
...
@@ -130,6 +130,13 @@ function sleep(ms) {
describe
(
'
userauthTest
'
,
function
()
{
/*
* @tc.number : Security_IAM_PIN_Kit_Func_0101
* @tc.name : Kit interface get version
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
Security_IAM_PIN_Kit_Func_0101
'
,
0
,
async
function
(
done
)
{
try
{
let
getversionresult
=
null
;
...
...
@@ -143,7 +150,14 @@ describe('userauthTest', function () {
}
})
it
(
'
Security_IAM_PIN_Kit_Func_0102
'
,
1
,
async
function
(
done
)
{
/*
* @tc.number : Security_IAM_PIN_Kit_Func_0102
* @tc.name : Kit interface get AvailabeStatus
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
Security_IAM_PIN_Kit_Func_0102
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testFace GetAvailabeStatusTest0101 start
'
);
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -196,7 +210,13 @@ describe('userauthTest', function () {
}
})
/*
* @tc.number : Security_IAM_PIN_Kit_Func_0103
* @tc.name : Kit interface auth and cancel auth
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
Security_IAM_PIN_Kit_Func_0103
'
,
0
,
async
function
(
done
)
{
try
{
publicFC
.
publicRegisterInputer
(
PinAuth
,
AuthSubType
.
PIN_SIX
,
Inputerdata
)
...
...
@@ -219,7 +239,6 @@ it('Security_IAM_PIN_Kit_Func_0103', 0, async function (done) {
console
.
info
(
'
AuthTest_0101 publicaddCredential =
'
+
addfaceresult
.
addCredresult
);
expect
(
ResultCode
.
SUCCESS
).
assertEqual
(
addfaceresult
.
addCredresult
);
publicFC
.
publicauth
(
UserAuthKit
,
challenge
,
AuthType
.
FACE
,
10000
,
async
function
(
data
)
{
// console.info('testFace AuthTest_0101 onResult = ' + JSON.stringify(data));
let
faceauth101
=
data
;
console
.
info
(
'
AuthTest_0101 publicauth =
'
+
faceauth101
.
authresult
);
expect
(
ResultCode
.
SUCCESS
).
assertEqual
(
faceauth101
.
authresult
);
...
...
@@ -267,6 +286,13 @@ it('Security_IAM_PIN_Kit_Func_0103', 0, async function (done) {
}
})
/*
* @tc.number : Security_IAM_PIN_Kit_Func_0104
* @tc.name : Kit interface enum AuthTrustLevel
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
Security_IAM_PIN_Kit_Func_0104
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_PIN_Kit_Func_0104 start
'
);
expect
(
10000
).
assertEqual
(
userAuthNorth
.
AuthTrustLevel
.
ATL1
);
...
...
@@ -277,6 +303,13 @@ it('Security_IAM_PIN_Kit_Func_0103', 0, async function (done) {
done
();
})
/*
* @tc.number : Security_IAM_PIN_Kit_Func_0105
* @tc.name : Kit interface enum FaceTips
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
Security_IAM_PIN_Kit_Func_0105
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_PIN_Kit_Func_0105 start
'
);
expect
(
1
).
assertEqual
(
userAuthNorth
.
FaceTips
.
FACE_AUTH_TIP_TOO_BRIGHT
);
...
...
@@ -294,6 +327,13 @@ it('Security_IAM_PIN_Kit_Func_0103', 0, async function (done) {
done
();
})
/*
* @tc.number : Security_IAM_PIN_Kit_Func_0106
* @tc.name : Kit interface enum UserAuthType
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
Security_IAM_PIN_Kit_Func_0106
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_PIN_Kit_Func_0106 start
'
);
expect
(
2
).
assertEqual
(
userAuthNorth
.
UserAuthType
.
FACE
);
...
...
@@ -302,6 +342,13 @@ it('Security_IAM_PIN_Kit_Func_0103', 0, async function (done) {
done
();
})
/*
* @tc.number : Security_IAM_PIN_Kit_Func_0107
* @tc.name : Kit interface enum ResultCode
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
Security_IAM_PIN_Kit_Func_0107
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_PIN_Kit_Func_0107 start
'
);
expect
(
0
).
assertEqual
(
userAuthNorth
.
ResultCode
.
SUCCESS
);
...
...
@@ -319,6 +366,13 @@ it('Security_IAM_PIN_Kit_Func_0103', 0, async function (done) {
done
();
})
/*
* @tc.number : Security_IAM_PIN_Kit_Func_0108
* @tc.name : Kit interface enum FingerprintTips
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
Security_IAM_PIN_Kit_Func_0108
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_PIN_Kit_Func_0108 start
'
);
expect
(
0
).
assertEqual
(
userAuthNorth
.
FingerprintTips
.
FINGERPRINT_AUTH_TIP_GOOD
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录