Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
250846a8
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看板
提交
250846a8
编写于
7月 14, 2022
作者:
C
chengxingzhen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
XTS元能力失败用例适配
Signed-off-by:
N
chengxingzhen
<
chengxingzhen@huawei.com
>
上级
ff6f01eb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
14 deletion
+8
-14
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
...ytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
+8
-14
未找到文件。
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
浏览文件 @
250846a8
...
@@ -1015,7 +1015,6 @@ describe('ActsFeatureAbilityTest', function () {
...
@@ -1015,7 +1015,6 @@ describe('ActsFeatureAbilityTest', function () {
await
sleep
(
1000
)
await
sleep
(
1000
)
})
})
// checkAppType
function
checkAppType
(
info
)
{
function
checkAppType
(
info
)
{
console
.
info
(
"
AppType :
"
+
info
);
console
.
info
(
"
AppType :
"
+
info
);
expect
(
typeof
(
info
)).
assertEqual
(
"
string
"
);
expect
(
typeof
(
info
)).
assertEqual
(
"
string
"
);
...
@@ -1029,10 +1028,9 @@ describe('ActsFeatureAbilityTest', function () {
...
@@ -1029,10 +1028,9 @@ describe('ActsFeatureAbilityTest', function () {
*/
*/
it
(
'
ACTS_GetAppType_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
ACTS_GetAppType_0100
'
,
0
,
async
function
(
done
)
{
await
featureAbility
.
getContext
().
getAppType
().
then
((
data
)
=>
{
await
featureAbility
.
getContext
().
getAppType
().
then
((
data
)
=>
{
checkAppType
(
data
);
console
.
info
(
"
ACTS_GetAppType_0100 getAppType info :
"
+
JSON
.
stringify
(
data
))
console
.
info
(
"
ACTS_GetAppType_0100 getAppType info :
"
+
JSON
.
stringify
(
data
))
checkAppType
(
data
);
console
.
info
(
'
====> ACTS_GetAppType_0100 end=====>
'
)
console
.
info
(
'
====> ACTS_GetAppType_0100 end=====>
'
)
done
();
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
====> ACTS_GetAppType_0100 err=====>
'
+
JSON
.
stringify
(
err
))
console
.
info
(
'
====> ACTS_GetAppType_0100 err=====>
'
+
JSON
.
stringify
(
err
))
expect
().
assertFail
()
expect
().
assertFail
()
...
@@ -1046,22 +1044,18 @@ describe('ActsFeatureAbilityTest', function () {
...
@@ -1046,22 +1044,18 @@ describe('ActsFeatureAbilityTest', function () {
* @tc.desc: Check the return value of the interface (by AsyncCallback)
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
*/
it
(
'
ACTS_GetAppType_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
ACTS_GetAppType_0200
'
,
0
,
async
function
(
done
)
{
let
tempInfo
;
featureAbility
.
getContext
().
getAppType
((
err
,
data
)
=>
{
featureAbility
.
getContext
().
getAppType
((
err
,
data
)
=>
{
if
(
err
.
code
!=
0
){
if
(
err
.
code
!=
0
){
console
.
info
(
"
ACTS_GetAppType_0200 getAppType callback err :
"
+
JSON
.
stringify
(
err
))
expect
().
assertFail
()
expect
().
assertFail
()
done
()
done
()
}
else
{
}
else
{
tempInfo
=
data
console
.
info
(
"
ACTS_GetAppType_0200 getAppType callback data :
"
+
JSON
.
stringify
(
data
))
checkAppType
(
data
)
done
()
}
}
});
});
console
.
info
(
"
ACTS_GetAppType_0200 getAppType callback info :
"
+
JSON
.
stringify
(
tempInfo
))
await
sleep
(
1000
)
setTimeout
(
function
()
{
console
.
info
(
'
====> ACTS_GetAppType_0200 =====>
'
+
JSON
.
stringify
(
tempInfo
))
checkAppType
(
tempInfo
);
console
.
info
(
'
====> ACTS_GetAppType_0200 =====>
'
)
done
()
},
TIMEOUT
)
})
})
// checkAbilityInfo
// checkAbilityInfo
...
@@ -1179,7 +1173,7 @@ describe('ActsFeatureAbilityTest', function () {
...
@@ -1179,7 +1173,7 @@ describe('ActsFeatureAbilityTest', function () {
// checkHapModuleInfo
// checkHapModuleInfo
function
checkHapModuleInfo
(
data
)
{
function
checkHapModuleInfo
(
data
)
{
console
.
info
(
"
checkHapModuleInfo start
"
+
data
);
console
.
info
(
"
checkHapModuleInfo start
"
+
JSON
.
stringify
(
data
)
);
expect
(
typeof
(
data
)).
assertEqual
(
"
object
"
);
expect
(
typeof
(
data
)).
assertEqual
(
"
object
"
);
expect
(
typeof
(
data
.
name
)).
assertEqual
(
"
string
"
);
expect
(
typeof
(
data
.
name
)).
assertEqual
(
"
string
"
);
expect
(
typeof
(
data
.
description
)).
assertEqual
(
"
string
"
);
expect
(
typeof
(
data
.
description
)).
assertEqual
(
"
string
"
);
...
@@ -1192,7 +1186,7 @@ describe('ActsFeatureAbilityTest', function () {
...
@@ -1192,7 +1186,7 @@ describe('ActsFeatureAbilityTest', function () {
expect
(
typeof
(
data
.
supportedModes
)).
assertEqual
(
"
number
"
);
expect
(
typeof
(
data
.
supportedModes
)).
assertEqual
(
"
number
"
);
expect
(
Array
.
isArray
(
data
.
reqCapabilities
)).
assertEqual
(
true
);
expect
(
Array
.
isArray
(
data
.
reqCapabilities
)).
assertEqual
(
true
);
expect
(
Array
.
isArray
(
data
.
deviceTypes
)).
assertEqual
(
true
);
expect
(
Array
.
isArray
(
data
.
deviceTypes
)).
assertEqual
(
true
);
expect
(
Array
.
isArray
(
data
.
abilityInfo
s
)).
assertEqual
(
true
);
expect
(
Array
.
isArray
(
data
.
abilityInfo
)).
assertEqual
(
true
);
expect
(
typeof
(
data
.
moduleName
)).
assertEqual
(
"
string
"
);
expect
(
typeof
(
data
.
moduleName
)).
assertEqual
(
"
string
"
);
expect
(
typeof
(
data
.
mainAbilityName
)).
assertEqual
(
"
string
"
);
expect
(
typeof
(
data
.
mainAbilityName
)).
assertEqual
(
"
string
"
);
expect
(
typeof
(
data
.
installationFree
)).
assertEqual
(
"
boolean
"
);
expect
(
typeof
(
data
.
installationFree
)).
assertEqual
(
"
boolean
"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录