Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
afe18d24
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看板
未验证
提交
afe18d24
编写于
7月 27, 2023
作者:
O
openharmony_ci
提交者:
Gitee
7月 27, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9524 【OpenHarmony 4.0.9.1】【安全子系统】【master】Delete Use Case
Merge pull request !9524 from qiaozzzh/0727_1
上级
e131e0e2
901e77c2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
0 addition
and
154 deletion
+0
-154
useriam/face_auth/js_api_test/function_test/userauthpart2/src/main/js/test/List.test.js
...function_test/userauthpart2/src/main/js/test/List.test.js
+0
-2
useriam/face_auth/js_api_test/function_test/userauthpart2/src/main/js/test/Security_IAM_FUNC_Jsunit.test.js
...thpart2/src/main/js/test/Security_IAM_FUNC_Jsunit.test.js
+0
-2
useriam/face_auth/js_api_test/function_test/userauthpart2/src/main/js/test/Security_IAM_FUNC_api10_Jsunit.test.js
...2/src/main/js/test/Security_IAM_FUNC_api10_Jsunit.test.js
+0
-150
未找到文件。
useriam/face_auth/js_api_test/function_test/userauthpart2/src/main/js/test/List.test.js
浏览文件 @
afe18d24
...
...
@@ -14,9 +14,7 @@
*/
import
userauthTest
from
'
./Security_IAM_PIN_Kit_CallbackJsunit.test.js
'
import
userauthTest_API9
from
'
./Security_IAM_FUNC_Jsunit.test.js
'
import
signNormalAccessBiometricExecute
from
'
./Security_IAM_FUNC_api10_Jsunit.test.js
'
export
default
function
testsuite
()
{
userauthTest
()
userauthTest_API9
()
signNormalAccessBiometricExecute
()
}
useriam/face_auth/js_api_test/function_test/userauthpart2/src/main/js/test/Security_IAM_FUNC_Jsunit.test.js
浏览文件 @
afe18d24
...
...
@@ -518,7 +518,6 @@ export default function userauthTest() {
*/
it
(
'
Security_IAM_PIN_Kit_Func_0106
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_PIN_Kit_Func_0106 start
'
);
expect
(
1
).
assertEqual
(
userAuthNorth
.
UserAuthType
.
PIN
);
expect
(
2
).
assertEqual
(
userAuthNorth
.
UserAuthType
.
FACE
);
expect
(
4
).
assertEqual
(
userAuthNorth
.
UserAuthType
.
FINGERPRINT
);
console
.
info
(
'
testFace Security_IAM_PIN_Kit_Func_0106 end
'
);
...
...
@@ -544,7 +543,6 @@ export default function userauthTest() {
expect
(
12500007
).
assertEqual
(
userAuthNorth
.
UserAuthResultCode
.
BUSY
);
expect
(
12500009
).
assertEqual
(
userAuthNorth
.
UserAuthResultCode
.
LOCKED
);
expect
(
12500010
).
assertEqual
(
userAuthNorth
.
UserAuthResultCode
.
NOT_ENROLLED
);
expect
(
12500011
).
assertEqual
(
userAuthNorth
.
UserAuthResultCode
.
CANCELED_FROM_WIDGET
);
console
.
info
(
'
testFace Security_IAM_Func_0107 end
'
);
done
();
})
...
...
useriam/face_auth/js_api_test/function_test/userauthpart2/src/main/js/test/Security_IAM_FUNC_api10_Jsunit.test.js
已删除
100644 → 0
浏览文件 @
e131e0e2
/*
* Copyright (C) 2022-2023 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
{
describe
,
it
,
expect
}
from
'
@ohos/hypium
'
import
userAuth
from
'
@ohos.userIAM.userAuth
'
const
authParamDefault
=
{
challenge
:
new
Uint8Array
([
49
,
49
,
49
,
49
,
49
,
49
]),
authType
:
[
userAuth
.
UserAuthType
.
PIN
],
authTrustLevel
:
userAuth
.
AuthTrustLevel
.
ATL1
,
};
const
widgetParamDefault
=
{
title
:
'
使用密码验证
'
,
navigationButtonText
:
'
确定
'
,
};
export
default
function
signNormalAccessBiometricExecute
()
{
describe
(
'
signNormalAccessBiometricExecute
'
,
function
()
{
function
userAuthPromise
(...
args
){
return
new
Promise
((
resolve
,
reject
)
=>
{
try
{
const
userAuthInstance
=
userAuth
.
getUserAuthInstance
(
args
[
0
],
args
[
1
]);
userAuthInstance
.
on
(
'
result
'
,
{
callback
:
(
onResult
)
=>
{
console
.
info
(
`
${
args
[
2
]}
callback
${
onResult
.
result
}
`
);
expect
(
onResult
.
result
).
assertEqual
(
args
[
3
]);
resolve
();
}
});
userAuthInstance
.
start
();
}
catch
(
e
)
{
console
.
info
(
`
${
args
[
2
]}
fail
${
e
.
code
}
`
);
expect
(
null
).
assertFail
();
reject
();
}
})
}
/*
* @tc.number : Security_IAM_UserAuthInstance_Func_0007
* @tc.name : execute_userAuthInstance_start_is_aaaa_null
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
Security_IAM_UserAuthInstance_Func_0007
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
Security_IAM_UserAuthInstance_Func_0007 start
"
);
const
startParams
=
[
"
aaaa
"
,
null
];
for
(
let
index
=
0
;
index
<
startParams
.
length
;
index
++
)
{
try
{
const
userAuthInstance
=
userAuth
.
getUserAuthInstance
(
authParamDefault
,
widgetParamDefault
);
userAuthInstance
.
start
(
startParams
[
index
]);
console
.
info
(
`Security_IAM_UserAuthInstance_Func_0007 step
${
index
+
1
}
success`
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
info
(
`Security_IAM_UserAuthInstance_Func_0007 step
${
index
+
1
}
fail
${
e
.
code
}
`
);
expect
(
e
.
code
).
assertEqual
(
401
);
}
}
done
();
});
/*
* @tc.number : Security_IAM_UserAuthInstance_Func_0009
* @tc.name : execute_userAuthInstance_cancel_is_aaaa_null
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
Security_IAM_UserAuthInstance_Func_0009
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
Security_IAM_UserAuthInstance_Func_0009 start
"
);
const
cancelParams
=
[
"
aaaa
"
,
null
];
for
(
let
index
=
0
;
index
<
cancelParams
.
length
;
index
++
)
{
try
{
const
userAuthInstance
=
userAuth
.
getUserAuthInstance
(
authParamDefault
,
widgetParamDefault
);
userAuthInstance
.
start
();
userAuthInstance
.
cancel
(
cancelParams
[
index
]);
console
.
info
(
`Security_IAM_UserAuthInstance_Func_0009 step
${
index
+
1
}
success`
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
info
(
`Security_IAM_UserAuthInstance_Func_0009 step
${
index
+
1
}
fail
${
e
.
code
}
`
);
expect
(
e
.
code
).
assertEqual
(
401
);
}
}
done
();
});
/*
* @tc.number : Security_IAM_getUserAuthInstance_Func_0088
* @tc.name : execute_userAuthInstance_off
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
Security_IAM_getUserAuthInstance_Func_0088
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
Security_IAM_getUserAuthInstance_Func_0088 start
"
);
try
{
const
userAuthInstance
=
userAuth
.
getUserAuthInstance
(
authParamDefault
,
widgetParamDefault
);
userAuthInstance
.
off
();
console
.
info
(
`Security_IAM_getUserAuthInstance_Func_0088 step1 success`
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
info
(
`Security_IAM_getUserAuthInstance_Func_0088 step1 fail
${
e
.
code
}
`
);
expect
(
e
.
code
).
assertEqual
(
401
);
}
done
();
});
/*
* @tc.number : Security_IAM_widgetNotice_Kit_Func_0085
* @tc.name : execute_enum_windowModeType
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
Security_IAM_widgetNotice_Kit_Func_0085
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
Security_IAM_widgetNotice_Kit_Func_0085 start
'
);
expect
(
1
).
assertEqual
(
userAuth
.
WindowModeType
.
DIALOG_BOX
);
expect
(
2
).
assertEqual
(
userAuth
.
WindowModeType
.
FULLSCREEN
);
console
.
info
(
'
Security_IAM_widgetNotice_Kit_Func_0085 end
'
);
done
();
})
/*
* @tc.number : Security_IAM_widgetNotice_Kit_Func_0086
* @tc.name : execute_enum_noticeType
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
Security_IAM_widgetNotice_Kit_Func_0086
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_widgetNotice_Kit_Func_0086 start
'
);
expect
(
1
).
assertEqual
(
userAuth
.
NoticeType
.
WIDGET_NOTICE
);
console
.
info
(
'
Security_IAM_widgetNotice_Kit_Func_0086 end
'
);
done
();
})
});
};
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录