Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
ef8e179b
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看板
提交
ef8e179b
编写于
7月 29, 2022
作者:
C
chengxingzhen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
XTS元能力用例适配
Signed-off-by:
N
chengxingzhen
<
chengxingzhen@huawei.com
>
上级
258b0fdd
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
15 deletion
+16
-15
aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getAbilityInfoJsunit.test.ets
...c/main/ets/MainAbility/test/getAbilityInfoJsunit.test.ets
+1
-1
aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getHapModuleInfoJsunit.test.ets
...main/ets/MainAbility/test/getHapModuleInfoJsunit.test.ets
+7
-7
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/config.json
...ability/actsfeatureabilitytest/entry/src/main/config.json
+1
-0
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
...ytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
+7
-7
未找到文件。
aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getAbilityInfoJsunit.test.ets
浏览文件 @
ef8e179b
...
...
@@ -288,7 +288,7 @@ export default function getHapModuleInfoJsunit() {
expect
(
info
.
systemApp
)
.
assertEqual
(
true
);
expect
(
info
.
enabled
)
.
assertEqual
(
true
);
expect
(
info
.
label
)
.
assertEqual
(
"
$string
:entry_MainAbility"
);
expect
(
info
.
icon
)
.
assertEqual
(
"
$media
:icon
"
);
expect
(
info
.
icon
)
.
assertEqual
(
""
);
expect
(
info
.
process
)
.
assertEqual
(
"com.ohos.acecollaboration"
);
expect
(
info
.
supportedModes
)
.
assertEqual
(
0
);
expect
(
info
.
entryDir
)
.
assertEqual
(
"/data/app/el1/bundle/public/"
+
...
...
aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getHapModuleInfoJsunit.test.ets
浏览文件 @
ef8e179b
...
...
@@ -94,7 +94,7 @@ export default function getHapModuleInfoJsunit() {
for (var k = 0; k < data.deviceTypes.length; k++) {
console.log(msg + "getHapModuleInfo data.deviceTypes[" + k + "] : " + data.deviceTypes[k]);
}
console.log(msg + "checkHapModuleInfo abilityInfos length : " + data.abilityInfo
s
.length);
console.log(msg + "checkHapModuleInfo abilityInfos length : " + data.abilityInfo.length);
console.log(msg + "checkHapModuleInfo moduleName : " + data.moduleName);
console.log(msg + "checkHapModuleInfo mainAbilityName : " + data.mainAbilityName);
console.log(msg + "checkHapModuleInfo installationFree : " + data.installationFree);
...
...
@@ -110,23 +110,23 @@ export default function getHapModuleInfoJsunit() {
expect(typeof (data.supportedModes)).assertEqual("number");
expect(Array.isArray(data.reqCapabilities)).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.mainAbilityName)).assertEqual("string");
expect(typeof (data.installationFree)).assertEqual("boolean");
expect(data.name).assertEqual("com.ohos.acecollaboration");
expect(data.name).assertEqual("com.ohos.acecollaboration
.MyApplication
");
expect(data.description).assertEqual("");
expect(data.descriptionId).assertEqual(0);
expect(data.icon).assertEqual("$media:icon");
expect(data.label).assertEqual("$string:entry_MainAbility");
expect(data.labelId).assertEqual(
0
);
expect(data.iconId).assertEqual(
0
);
expect(data.labelId).assertEqual(
16777224
);
expect(data.iconId).assertEqual(
16777227
);
expect(data.backgroundImg).assertEqual("");
expect(data.supportedModes).assertEqual(0);
expect(data.deviceTypes[0]).assertEqual("phone");
checkAbilityInfo(msg,data.abilityInfo
s
[0]);
checkAbilityInfo(msg,data.abilityInfo[0]);
expect(data.moduleName).assertEqual("entry")
expect(data.mainAbilityName).assertEqual("");
expect(data.mainAbilityName).assertEqual("
com.ohos.acecollaboration.MainAbility
");
expect(data.installationFree).assertEqual(false);
console.log(msg + "---checkHapModuleInfo End---");
}
...
...
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/config.json
浏览文件 @
ef8e179b
...
...
@@ -20,6 +20,7 @@
"module"
:
{
"package"
:
"com.example.actsfeatureabilitytest"
,
"name"
:
".MyApplication"
,
"mainAbility"
:
"com.example.actsfeatureabilitytest.MainAbility"
,
"deviceType"
:
[
"phone"
],
...
...
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
浏览文件 @
ef8e179b
...
...
@@ -847,7 +847,7 @@ describe('ActsFeatureAbilityTest', function () {
expect
(
info
.
enabled
).
assertEqual
(
true
);
expect
(
info
.
label
).
assertEqual
(
"
$string:app_name
"
);
// expect(info.labelId).assertEqual(0); //create by DevEco when building HAP.
expect
(
info
.
icon
).
assertEqual
(
"
$media:icon
"
);
expect
(
info
.
icon
).
assertEqual
(
''
);
// expect(info.iconId).assertEqual(0); //create by DevEco when building HAP.
expect
(
info
.
process
).
assertEqual
(
"
processTest
"
);
expect
(
info
.
supportedModes
).
assertEqual
(
0
);
...
...
@@ -1060,7 +1060,7 @@ describe('ActsFeatureAbilityTest', function () {
// checkAbilityInfo
function
checkAbilityInfo
(
data
)
{
console
.
info
(
"
checkAbilityInfo start
"
+
data
);
console
.
info
(
"
checkAbilityInfo start
"
+
JSON
.
stringify
(
data
)
);
expect
(
typeof
(
data
)).
assertEqual
(
"
object
"
);
expect
(
typeof
(
data
.
bundleName
)).
assertEqual
(
"
string
"
);
...
...
@@ -1104,7 +1104,7 @@ describe('ActsFeatureAbilityTest', function () {
expect
(
data
.
moduleName
).
assertEqual
(
"
entry
"
);
expect
(
data
.
process
).
assertEqual
(
"
processTestAbility
"
);
expect
(
data
.
targetAbility
).
assertEqual
(
""
);
expect
(
data
.
backgroundModes
).
assertEqual
(
0
);
expect
(
data
.
backgroundModes
).
assertEqual
(
1
);
expect
(
data
.
isVisible
).
assertEqual
(
true
);
expect
(
data
.
formEnabled
).
assertEqual
(
false
);
expect
(
data
.
type
).
assertEqual
(
1
);
...
...
@@ -1185,20 +1185,20 @@ describe('ActsFeatureAbilityTest', function () {
expect
(
typeof
(
data
.
moduleName
)).
assertEqual
(
"
string
"
);
expect
(
typeof
(
data
.
mainAbilityName
)).
assertEqual
(
"
string
"
);
expect
(
typeof
(
data
.
installationFree
)).
assertEqual
(
"
boolean
"
);
expect
(
data
.
name
).
assertEqual
(
"
com.example.actsfeatureabilitytest
"
);
expect
(
data
.
name
).
assertEqual
(
"
com.example.actsfeatureabilitytest
.MyApplication
"
);
expect
(
data
.
description
).
assertEqual
(
"
descriptionTest
"
);
expect
(
data
.
descriptionId
).
assertEqual
(
0
);
expect
(
data
.
icon
).
assertEqual
(
"
$media:icon
"
);
expect
(
data
.
label
).
assertEqual
(
"
$string:app_name
"
);
expect
(
data
.
labelId
).
assertEqual
(
0
);
expect
(
data
.
iconId
).
assertEqual
(
0
);
expect
(
data
.
labelId
).
assertEqual
(
16777216
);
expect
(
data
.
iconId
).
assertEqual
(
16777219
);
expect
(
data
.
backgroundImg
).
assertEqual
(
""
);
expect
(
data
.
supportedModes
).
assertEqual
(
0
);
expect
(
data
.
reqCapabilities
[
0
]).
assertEqual
(
"
reqCapabilitiesTest1
"
);
expect
(
data
.
reqCapabilities
[
1
]).
assertEqual
(
"
reqCapabilitiesTest2
"
);
expect
(
data
.
deviceTypes
[
0
]).
assertEqual
(
"
phone
"
);
expect
(
data
.
moduleName
).
assertEqual
(
"
entry
"
)
expect
(
data
.
mainAbilityName
).
assertEqual
(
""
);
expect
(
data
.
mainAbilityName
).
assertEqual
(
"
com.example.actsfeatureabilitytest.MainAbility
"
);
expect
(
data
.
installationFree
).
assertEqual
(
false
);
console
.
info
(
"
checkHapModuleInfo end
"
+
data
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录