Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f316b279
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看板
未验证
提交
f316b279
编写于
4月 24, 2022
作者:
O
openharmony_ci
提交者:
Gitee
4月 24, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3037 useriam测试套枚举值
Merge pull request !3037 from 胡吉翔/cherry-pick-1650770071
上级
ad1a497a
490f6acf
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
165 addition
and
0 deletion
+165
-0
useriam/face_auth/js_api_test/function_test/userauth/entry/src/main/js/test/ListTest.js
...function_test/userauth/entry/src/main/js/test/ListTest.js
+1
-0
useriam/face_auth/js_api_test/function_test/userauth/entry/src/main/js/test/enumTest.js
...function_test/userauth/entry/src/main/js/test/enumTest.js
+164
-0
未找到文件。
useriam/face_auth/js_api_test/function_test/userauth/entry/src/main/js/test/ListTest.js
浏览文件 @
f316b279
...
...
@@ -14,3 +14,4 @@
*/
require
(
'
./execute.js
'
)
require
(
'
./enumTest.js
'
)
useriam/face_auth/js_api_test/function_test/userauth/entry/src/main/js/test/enumTest.js
0 → 100644
浏览文件 @
f316b279
/*
* 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
userAuth
from
'
@ohos.userIAM.userAuth
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
var
index
=
require
(
'
../default/pages/index/index.js
'
);
/**
* test case
*/
describe
(
'
userAuthTest
'
,
function
()
{
beforeEach
(
function
(
done
)
{
let
waitTime
=
1000
;
setTimeout
(
function
()
{
done
();
},
waitTime
);
})
afterEach
(
function
()
{
})
/**
* @tc.name Enum AuthenticationResult.NO_SUPPORT test
* @tc.number JSAPI_Function_Enum_0100
* @tc.size MEDIUM
* @tc.type FUNC
* @tc.level Level2
*/
it
(
'
JSAPI_Function_Enum_0100
'
,
0
,
function
()
{
expect
(
typeof
userAuth
.
AuthenticationResult
.
NO_SUPPORT
!==
undefined
).
assertTrue
()
expect
(
userAuth
.
AuthenticationResult
.
NO_SUPPORT
).
assertEqual
(
-
1
)
})
/**
* @tc.name Enum AuthenticationResult.SUCCESS test
* @tc.number JSAPI_Function_Enum_0200
* @tc.size MEDIUM
* @tc.type FUNC
* @tc.level Level2
*/
it
(
'
JSAPI_Function_Enum_0200
'
,
0
,
function
()
{
expect
(
typeof
userAuth
.
AuthenticationResult
.
SUCCESS
!==
undefined
).
assertTrue
()
expect
(
userAuth
.
AuthenticationResult
.
SUCCESS
).
assertEqual
(
0
)
})
/**
* @tc.name Enum AuthenticationResult.COMPARE_FAILURE test
* @tc.number JSAPI_Function_Enum_0300
* @tc.size MEDIUM
* @tc.type FUNC
* @tc.level Level2
*/
it
(
'
JSAPI_Function_Enum_0300
'
,
0
,
function
()
{
expect
(
typeof
userAuth
.
AuthenticationResult
.
COMPARE_FAILURE
!==
undefined
).
assertTrue
()
expect
(
userAuth
.
AuthenticationResult
.
COMPARE_FAILURE
).
assertEqual
(
1
)
})
/**
* @tc.name Enum AuthenticationResult.CANCELED test
* @tc.number JSAPI_Function_Enum_0400
* @tc.size MEDIUM
* @tc.type FUNC
* @tc.level Level2
*/
it
(
'
JSAPI_Function_Enum_0400
'
,
0
,
function
()
{
expect
(
typeof
userAuth
.
AuthenticationResult
.
CANCELED
!==
undefined
).
assertTrue
()
expect
(
userAuth
.
AuthenticationResult
.
CANCELED
).
assertEqual
(
2
)
})
/**
* @tc.name Enum AuthenticationResult.TIMEOUT test
* @tc.number JSAPI_Function_Enum_0500
* @tc.size MEDIUM
* @tc.type FUNC
* @tc.level Level2
*/
it
(
'
JSAPI_Function_Enum_0500
'
,
0
,
function
()
{
expect
(
typeof
userAuth
.
AuthenticationResult
.
TIMEOUT
!==
undefined
).
assertTrue
()
expect
(
userAuth
.
AuthenticationResult
.
TIMEOUT
).
assertEqual
(
3
)
})
/**
* @tc.name Enum AuthenticationResult.CAMERA_FAIL test
* @tc.number JSAPI_Function_Enum_0600
* @tc.size MEDIUM
* @tc.type FUNC
* @tc.level Level2
*/
it
(
'
JSAPI_Function_Enum_0600
'
,
0
,
function
()
{
expect
(
typeof
userAuth
.
AuthenticationResult
.
CAMERA_FAIL
!==
undefined
).
assertTrue
()
expect
(
userAuth
.
AuthenticationResult
.
CAMERA_FAIL
).
assertEqual
(
4
)
})
/**
* @tc.name Enum AuthenticationResult.BUSY test
* @tc.number JSAPI_Function_Enum_0700
* @tc.size MEDIUM
* @tc.type FUNC
* @tc.level Level2
*/
it
(
'
JSAPI_Function_Enum_0700
'
,
0
,
function
()
{
expect
(
typeof
userAuth
.
AuthenticationResult
.
BUSY
!==
undefined
).
assertTrue
()
expect
(
userAuth
.
AuthenticationResult
.
BUSY
).
assertEqual
(
5
)
})
/**
* @tc.name Enum AuthenticationResult.INVALID_PARAMETERS test
* @tc.number JSAPI_Function_Enum_0800
* @tc.size MEDIUM
* @tc.type FUNC
* @tc.level Level2
*/
it
(
'
JSAPI_Function_Enum_0800
'
,
0
,
function
()
{
expect
(
typeof
userAuth
.
AuthenticationResult
.
INVALID_PARAMETERS
!==
undefined
).
assertTrue
()
expect
(
userAuth
.
AuthenticationResult
.
INVALID_PARAMETERS
).
assertEqual
(
6
)
})
/**
* @tc.name Enum AuthenticationResult.LOCKED test
* @tc.number JSAPI_Function_Enum_0900
* @tc.size MEDIUM
* @tc.type FUNC
* @tc.level Level2
*/
it
(
'
JSAPI_Function_Enum_0900
'
,
0
,
function
()
{
expect
(
typeof
userAuth
.
AuthenticationResult
.
LOCKED
!==
undefined
).
assertTrue
()
expect
(
userAuth
.
AuthenticationResult
.
LOCKED
).
assertEqual
(
7
)
})
/**
* @tc.name Enum AuthenticationResult.NOT_ENROLLED test
* @tc.number JSAPI_Function_Enum_1000
* @tc.size MEDIUM
* @tc.type FUNC
* @tc.level Level2
*/
it
(
'
JSAPI_Function_Enum_1000
'
,
0
,
function
()
{
expect
(
typeof
userAuth
.
AuthenticationResult
.
NOT_ENROLLED
!==
undefined
).
assertTrue
()
expect
(
userAuth
.
AuthenticationResult
.
NOT_ENROLLED
).
assertEqual
(
8
)
})
/**
* @tc.name Enum AuthenticationResult.GENERAL_ERROR test
* @tc.number JSAPI_Function_Enum_1100
* @tc.size MEDIUM
* @tc.type FUNC
* @tc.level Level2
*/
it
(
'
JSAPI_Function_Enum_1100
'
,
0
,
function
()
{
expect
(
typeof
userAuth
.
AuthenticationResult
.
GENERAL_ERROR
!==
undefined
).
assertTrue
()
expect
(
userAuth
.
AuthenticationResult
.
GENERAL_ERROR
).
assertEqual
(
100
)
})
})
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录