Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
da63edb3
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看板
未验证
提交
da63edb3
编写于
8月 15, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 15, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9731 【OpenHarmony 4.0.11.1】【安全子系统】New Use Cases for useriam XTS
Merge pull request !9731 from qiaozzzh/0811_1
上级
2f542fc2
9dcf9a8a
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
728 addition
and
0 deletion
+728
-0
useriam/face_auth/js_api_test/function_test/userauthpart2/src/main/js/test/Enum.test.js
...function_test/userauthpart2/src/main/js/test/Enum.test.js
+80
-0
useriam/face_auth/js_api_test/function_test/userauthpart2/src/main/js/test/Execute.test.js
...ction_test/userauthpart2/src/main/js/test/Execute.test.js
+549
-0
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
+6
-0
useriam/face_auth/js_api_test/function_test/userauthpart2/src/main/js/test/SignNormalNotAccessBiometricExecute.test.js
.../main/js/test/SignNormalNotAccessBiometricExecute.test.js
+93
-0
未找到文件。
useriam/face_auth/js_api_test/function_test/userauthpart2/src/main/js/test/Enum.test.js
0 → 100644
浏览文件 @
da63edb3
/*
* 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
,
Level
}
from
'
@ohos/hypium
'
import
userAuth
from
'
@ohos.userIAM.userAuth
'
export
default
function
signNormalNotAccessBiometricEnumExecute
()
{
describe
(
'
signNormalNotAccessBiometricEnumExecute
'
,
function
()
{
/*
* @tc.number : Security_IAM_userAuthType_Kit_Func_0084
* @tc.name : execute_enum_userAuthType
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level.LEVEL2
*/
it
(
'
Security_IAM_userAuthType_Kit_Func_0084
'
,
Level
.
LEVEL2
,
async
function
(
done
)
{
console
.
info
(
'
testFace Security_IAM_userAuthType_Kit_Func_0084 start
'
);
expect
(
1
).
assertEqual
(
userAuth
.
UserAuthType
.
PIN
);
expect
(
2
).
assertEqual
(
userAuth
.
UserAuthType
.
FACE
);
expect
(
4
).
assertEqual
(
userAuth
.
UserAuthType
.
FINGERPRINT
);
console
.
info
(
'
Security_IAM_userAuthType_Kit_Func_0084 end
'
);
done
();
})
/*
* @tc.number : Security_IAM_widgetNotice_Kit_Func_0085
* @tc.name : execute_enum_windowModeType
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level.LEVEL2
*/
it
(
'
Security_IAM_widgetNotice_Kit_Func_0085
'
,
Level
.
LEVEL2
,
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.LEVEL2
*/
it
(
'
Security_IAM_widgetNotice_Kit_Func_0086
'
,
Level
.
LEVEL2
,
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
();
})
/*
* @tc.number : Security_IAM_userAuthResultCode_Kit_Func_0087
* @tc.name : execute_enum_userAuthResultCode
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level.LEVEL2
*/
it
(
'
Security_IAM_userAuthResultCode_Kit_Func_0087
'
,
Level
.
LEVEL2
,
async
function
(
done
)
{
console
.
info
(
'
Security_IAM_userAuthResultCode_Kit_Func_0087 start
'
);
expect
(
12500011
).
assertEqual
(
userAuth
.
UserAuthResultCode
.
CANCELED_FROM_WIDGET
);
console
.
info
(
'
Security_IAM_userAuthResultCode_Kit_Func_0087 end
'
);
done
();
})
});
};
\ No newline at end of file
useriam/face_auth/js_api_test/function_test/userauthpart2/src/main/js/test/Execute.test.js
0 → 100644
浏览文件 @
da63edb3
此差异已折叠。
点击以展开。
useriam/face_auth/js_api_test/function_test/userauthpart2/src/main/js/test/List.test.js
浏览文件 @
da63edb3
...
...
@@ -14,7 +14,13 @@
*/
import
userauthTest
from
'
./Security_IAM_PIN_Kit_CallbackJsunit.test.js
'
import
userauthTest_API9
from
'
./Security_IAM_FUNC_Jsunit.test.js
'
import
signNormalAccessBiometricExecute
from
'
./Execute.test.js
'
import
signNormalNotAccessBiometricEnumExecute
from
'
./Enum.test.js
'
import
signNormalNotAccessBiometricExecute
from
'
./SignNormalNotAccessBiometricExecute.test.js
'
export
default
function
testsuite
()
{
userauthTest
()
userauthTest_API9
()
signNormalAccessBiometricExecute
()
signNormalNotAccessBiometricEnumExecute
()
signNormalNotAccessBiometricExecute
()
}
useriam/face_auth/js_api_test/function_test/userauthpart2/src/main/js/test/SignNormalNotAccessBiometricExecute.test.js
0 → 100644
浏览文件 @
da63edb3
/*
* 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
,
Level
}
from
'
@ohos/hypium
'
import
userAuth
from
'
@ohos.userIAM.userAuth
'
const
authParamDefault
=
{
challenge
:
new
Uint8Array
([
49
,
49
,
49
,
49
,
49
,
49
]),
authType
:
[
1
],
authTrustLevel
:
10000
,
};
const
widgetParamDefault
=
{
title
:
'
使用密码验证
'
,
};
export
default
function
signNormalNotAccessBiometricExecute
()
{
describe
(
'
signNormalNotAccessBiometricExecute
'
,
function
()
{
/*
* @tc.number : Security_IAM_UserAuthInstance_Func_0042
* @tc.name : execute_userAuthInstance_on_off_result
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level.LEVEL2
*/
it
(
'
Security_IAM_UserAuthInstance_Func_0042
'
,
Level
.
LEVEL2
,
async
function
(
done
)
{
console
.
info
(
"
Security_IAM_UserAuthInstance_Func_0042 start
"
);
try
{
const
userAuthInstance
=
userAuth
.
getUserAuthInstance
(
authParamDefault
,
widgetParamDefault
);
userAuthInstance
.
on
(
"
result
"
,
{
callback
:
(
result
)
=>
{}
});
userAuthInstance
.
off
(
"
result
"
,
{
callback
:
(
result
)
=>
{}
});
console
.
info
(
"
Security_IAM_UserAuthInstance_Func_0042 success
"
);
expect
(
userAuthInstance
).
not
().
assertNull
();
}
catch
(
e
)
{
console
.
info
(
"
Security_IAM_UserAuthInstance_Func_0042 fail
"
+
e
.
code
);
expect
(
null
).
assertFail
();
}
done
();
});
/*
* @tc.number : Security_IAM_UserAuthInstance_Func_0050
* @tc.name : execute_userAuthInstance_start
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level.LEVEL2
*/
it
(
'
Security_IAM_UserAuthInstance_Func_0050
'
,
Level
.
LEVEL2
,
async
function
(
done
)
{
console
.
info
(
"
Security_IAM_UserAuthInstance_Func_0050 start
"
);
try
{
const
userAuthInstance
=
userAuth
.
getUserAuthInstance
(
authParamDefault
,
widgetParamDefault
);
userAuthInstance
.
start
();
console
.
info
(
"
Security_IAM_UserAuthInstance_Func_0050 success
"
);
}
catch
(
e
)
{
console
.
info
(
"
Security_IAM_UserAuthInstance_Func_0050 fail
"
+
e
.
code
);
expect
(
e
.
code
).
assertEqual
(
201
);
}
done
();
});
/*
* @tc.number : Security_IAM_UserAuthInstance_Func_0090
* @tc.name : execute_userAuthInstance_cancel
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level.LEVEL2
*/
it
(
'
Security_IAM_UserAuthInstance_Func_0090
'
,
Level
.
LEVEL2
,
async
function
(
done
)
{
console
.
info
(
"
Security_IAM_UserAuthInstance_Func_0090 start
"
);
try
{
const
userAuthInstance
=
userAuth
.
getUserAuthInstance
(
authParamDefault
,
widgetParamDefault
);
userAuthInstance
.
cancel
();
console
.
info
(
"
Security_IAM_UserAuthInstance_Func_0090 success
"
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
info
(
"
Security_IAM_UserAuthInstance_Func_0090 fail
"
+
e
.
code
);
expect
(
e
.
code
).
assertEqual
(
userAuth
.
UserAuthResultCode
.
GENERAL_ERROR
);
}
done
();
});
});
};
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录