Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e63bc76b
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看板
提交
e63bc76b
编写于
10月 27, 2022
作者:
I
inter515
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add xts
Signed-off-by:
N
inter515
<
ry.renyi@huawei.com
>
上级
fba1a83d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
62 addition
and
35 deletion
+62
-35
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/config.json
...nager/actsbundlemanageretstest/entry/src/main/config.json
+2
-2
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
...est/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
+10
-10
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/resources/base/element/string.json
...etstest/entry/src/main/resources/base/element/string.json
+12
-0
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
...est/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
+38
-23
未找到文件。
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/config.json
浏览文件 @
e63bc76b
...
...
@@ -19,8 +19,8 @@
"srcPath"
:
""
,
"mainAbility"
:
"com.open.harmony.packagemag.MainAbility"
,
"deviceType"
:
[
"
table
t"
,
"
defaul
t"
"
defaul
t"
,
"
table
t"
],
"reqPermissions"
:
[
{
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
浏览文件 @
e63bc76b
...
...
@@ -31,16 +31,16 @@ export default function getBundleInfoForSelf() {
).then(data => {
console.info("AbilityPro" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[0]));
expect(data.hapModulesInfo[0].abilitiesInfo.length).assertEqual(5);
expect(data.hapModulesInfo[0].abilitiesInfo[0].type).assertEqual(
3
);
expect(data.hapModulesInfo[0].abilitiesInfo[0].orientation).assertEqual(
0
);
expect(data.hapModulesInfo[0].abilitiesInfo[1].type).assertEqual(
1
);
expect(data.hapModulesInfo[0].abilitiesInfo[1].orientation).assertEqual(
3
);
expect(data.hapModulesInfo[0].abilitiesInfo[2].type).assertEqual(
1
);
expect(data.hapModulesInfo[0].abilitiesInfo[2].orientation).assertEqual(
0
);
expect(data.hapModulesInfo[0].abilitiesInfo[3].type).assertEqual(
2
);
expect(data.hapModulesInfo[0].abilitiesInfo[3].orientation).assertEqual(
0
);
expect(data.hapModulesInfo[0].abilitiesInfo[4].type).assertEqual(
1
);
expect(data.hapModulesInfo[0].abilitiesInfo[4].orientation).assertEqual(
0
);
expect(data.hapModulesInfo[0].abilitiesInfo[0].type).assertEqual(
bundle.AbilityType.DATA
);
expect(data.hapModulesInfo[0].abilitiesInfo[0].orientation).assertEqual(
bundle.DisplayOrientation.UNSPECIFIED
);
expect(data.hapModulesInfo[0].abilitiesInfo[1].type).assertEqual(
bundle.AbilityType.PAGE
);
expect(data.hapModulesInfo[0].abilitiesInfo[1].orientation).assertEqual(
bundle.DisplayOrientation.FOLLOW_RECENT
);
expect(data.hapModulesInfo[0].abilitiesInfo[2].type).assertEqual(
bundle.AbilityType.PAGE
);
expect(data.hapModulesInfo[0].abilitiesInfo[2].orientation).assertEqual(
bundle.DisplayOrientation.UNSPECIFIED
);
expect(data.hapModulesInfo[0].abilitiesInfo[3].type).assertEqual(
bundle.AbilityType.SERVICE
);
expect(data.hapModulesInfo[0].abilitiesInfo[3].orientation).assertEqual(
bundle.DisplayOrientation.UNSPECIFIED
);
expect(data.hapModulesInfo[0].abilitiesInfo[4].type).assertEqual(
bundle.AbilityType.PAGE
);
expect(data.hapModulesInfo[0].abilitiesInfo[4].orientation).assertEqual(
bundle.DisplayOrientation.UNSPECIFIED
);
console.info("AbilityPro11" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[0]));
done();
}).catch(err => {
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/resources/base/element/string.json
浏览文件 @
e63bc76b
...
...
@@ -27,6 +27,18 @@
{
"name"
:
"entry_description"
,
"value"
:
"entry_description"
},
{
"name"
:
"PageAbility1_desc"
,
"value"
:
"description"
},
{
"name"
:
"PageAbility1_label"
,
"value"
:
"label"
},
{
"name"
:
"DataAbility_desc"
,
"value"
:
"hap sample empty provider"
}
]
}
\ No newline at end of file
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
浏览文件 @
e63bc76b
...
...
@@ -285,7 +285,7 @@ export default function getBundleInfoForSelf() {
expect(data.hapModulesInfo[0].abilitiesInfo[0].process).assertEqual("");
expect(data.hapModulesInfo[0].abilitiesInfo[0].isVisible).assertTrue();
expect(data.hapModulesInfo[0].abilitiesInfo[0].type).assertEqual(1);
expect(data.hapModulesInfo[0].abilitiesInfo[0].orientation).assertEqual(
2
);
expect(data.hapModulesInfo[0].abilitiesInfo[0].orientation).assertEqual(
bundle.DisplayOrientation.PORTRAIT
);
expect(data.hapModulesInfo[0].abilitiesInfo[0].launchType).assertEqual(bundle.LaunchType.SINGLETON);
expect(data.hapModulesInfo[0].abilitiesInfo[0].permissions.length).assertEqual(0);
expect(data.hapModulesInfo[0].abilitiesInfo[0].readPermission).assertEqual("");
...
...
@@ -314,26 +314,34 @@ export default function getBundleInfoForSelf() {
expect(data.hapModulesInfo[0].abilitiesInfo[0].windowSize.minWindowHeight).assertEqual(0);
expect(data.hapModulesInfo[0].abilitiesInfo[1].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility1");
expect(data.hapModulesInfo[0].abilitiesInfo[1].launchType).assertEqual(bundle.LaunchType.STANDARD);
expect(data.hapModulesInfo[0].abilitiesInfo[1].orientation).assertEqual(
1
);
expect(data.hapModulesInfo[0].abilitiesInfo[1].orientation).assertEqual(
bundle.DisplayOrientation.LANDSCAPE
);
expect(data.hapModulesInfo[0].abilitiesInfo[2].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility10");
expect(data.hapModulesInfo[0].abilitiesInfo[2].orientation).assertEqual(
12
);
expect(data.hapModulesInfo[0].abilitiesInfo[2].orientation).assertEqual(
bundle.DisplayOrientation.LOCKED
);
expect(data.hapModulesInfo[0].abilitiesInfo[3].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility2");
expect(data.hapModulesInfo[0].abilitiesInfo[3].launchType).assertEqual(bundle.LaunchType.SPECIFIED);
expect(data.hapModulesInfo[0].abilitiesInfo[3].orientation).assertEqual(4);
expect(data.hapModulesInfo[0].abilitiesInfo[3].orientation)
.assertEqual(bundle.DisplayOrientation.LANDSCAPE_INVERTED);
expect(data.hapModulesInfo[0].abilitiesInfo[4].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility3");
expect(data.hapModulesInfo[0].abilitiesInfo[4].orientation).assertEqual(5);
expect(data.hapModulesInfo[0].abilitiesInfo[4].orientation)
.assertEqual(bundle.DisplayOrientation.PORTRAIT_INVERTED);
expect(data.hapModulesInfo[0].abilitiesInfo[5].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility4");
expect(data.hapModulesInfo[0].abilitiesInfo[5].orientation).assertEqual(6);
expect(data.hapModulesInfo[0].abilitiesInfo[5].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION);
expect(data.hapModulesInfo[0].abilitiesInfo[6].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility5");
expect(data.hapModulesInfo[0].abilitiesInfo[6].orientation).assertEqual(7);
expect(data.hapModulesInfo[0].abilitiesInfo[6].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_LANDSCAPE);
expect(data.hapModulesInfo[0].abilitiesInfo[7].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility6");
expect(data.hapModulesInfo[0].abilitiesInfo[7].orientation).assertEqual(8);
expect(data.hapModulesInfo[0].abilitiesInfo[7].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_PORTRAIT);
expect(data.hapModulesInfo[0].abilitiesInfo[8].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility7");
expect(data.hapModulesInfo[0].abilitiesInfo[8].orientation).assertEqual(9);
expect(data.hapModulesInfo[0].abilitiesInfo[8].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_RESTRICTED);
expect(data.hapModulesInfo[0].abilitiesInfo[9].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility8");
expect(data.hapModulesInfo[0].abilitiesInfo[9].orientation).assertEqual(10);
expect(data.hapModulesInfo[0].abilitiesInfo[9].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_LANDSCAPE_RESTRICTED);
expect(data.hapModulesInfo[0].abilitiesInfo[10].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility9");
expect(data.hapModulesInfo[0].abilitiesInfo[10].orientation).assertEqual(11);
expect(data.hapModulesInfo[0].abilitiesInfo[10].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_PORTRAIT_RESTRICTED);
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[1])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[2])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[3])
...
...
@@ -367,7 +375,6 @@ export default function getBundleInfoForSelf() {
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_HAP_MODULE | bundle.BundleFlag.GET_BUNDLE_INFO_WITH_ABILITY,
(err, data) => {
console.info("AbilityCal" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[0]));
console.info("AbilityCal" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[1]));
checkCommonBundleInfo(data);
checkCommonHapModuleInfo(data);
expect(data.appInfo).assertEqual(null);
...
...
@@ -384,7 +391,7 @@ export default function getBundleInfoForSelf() {
expect(data.hapModulesInfo[0].abilitiesInfo[0].process).assertEqual("");
expect(data.hapModulesInfo[0].abilitiesInfo[0].isVisible).assertTrue();
expect(data.hapModulesInfo[0].abilitiesInfo[0].type).assertEqual(1);
expect(data.hapModulesInfo[0].abilitiesInfo[0].orientation).assertEqual(
2
);
expect(data.hapModulesInfo[0].abilitiesInfo[0].orientation).assertEqual(
bundle.DisplayOrientation.PORTRAIT
);
expect(data.hapModulesInfo[0].abilitiesInfo[0].launchType).assertEqual(bundle.LaunchType.SINGLETON);
expect(data.hapModulesInfo[0].abilitiesInfo[0].permissions.length).assertEqual(0);
expect(data.hapModulesInfo[0].abilitiesInfo[0].readPermission).assertEqual("");
...
...
@@ -413,26 +420,34 @@ export default function getBundleInfoForSelf() {
expect(data.hapModulesInfo[0].abilitiesInfo[0].windowSize.minWindowHeight).assertEqual(0);
expect(data.hapModulesInfo[0].abilitiesInfo[1].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility1");
expect(data.hapModulesInfo[0].abilitiesInfo[1].launchType).assertEqual(bundle.LaunchType.STANDARD);
expect(data.hapModulesInfo[0].abilitiesInfo[1].orientation).assertEqual(
1
);
expect(data.hapModulesInfo[0].abilitiesInfo[1].orientation).assertEqual(
bundle.DisplayOrientation.LANDSCAPE
);
expect(data.hapModulesInfo[0].abilitiesInfo[2].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility10");
expect(data.hapModulesInfo[0].abilitiesInfo[2].orientation).assertEqual(
12
);
expect(data.hapModulesInfo[0].abilitiesInfo[2].orientation).assertEqual(
bundle.DisplayOrientation.LOCKED
);
expect(data.hapModulesInfo[0].abilitiesInfo[3].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility2");
expect(data.hapModulesInfo[0].abilitiesInfo[3].launchType).assertEqual(bundle.LaunchType.SPECIFIED);
expect(data.hapModulesInfo[0].abilitiesInfo[3].orientation).assertEqual(4);
expect(data.hapModulesInfo[0].abilitiesInfo[3].orientation)
.assertEqual(bundle.DisplayOrientation.LANDSCAPE_INVERTED);
expect(data.hapModulesInfo[0].abilitiesInfo[4].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility3");
expect(data.hapModulesInfo[0].abilitiesInfo[4].orientation).assertEqual(5);
expect(data.hapModulesInfo[0].abilitiesInfo[4].orientation)
.assertEqual(bundle.DisplayOrientation.PORTRAIT_INVERTED);
expect(data.hapModulesInfo[0].abilitiesInfo[5].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility4");
expect(data.hapModulesInfo[0].abilitiesInfo[5].orientation).assertEqual(6);
expect(data.hapModulesInfo[0].abilitiesInfo[5].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION);
expect(data.hapModulesInfo[0].abilitiesInfo[6].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility5");
expect(data.hapModulesInfo[0].abilitiesInfo[6].orientation).assertEqual(7);
expect(data.hapModulesInfo[0].abilitiesInfo[6].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_LANDSCAPE);
expect(data.hapModulesInfo[0].abilitiesInfo[7].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility6");
expect(data.hapModulesInfo[0].abilitiesInfo[7].orientation).assertEqual(8);
expect(data.hapModulesInfo[0].abilitiesInfo[7].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_PORTRAIT);
expect(data.hapModulesInfo[0].abilitiesInfo[8].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility7");
expect(data.hapModulesInfo[0].abilitiesInfo[8].orientation).assertEqual(9);
expect(data.hapModulesInfo[0].abilitiesInfo[8].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_RESTRICTED);
expect(data.hapModulesInfo[0].abilitiesInfo[9].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility8");
expect(data.hapModulesInfo[0].abilitiesInfo[9].orientation).assertEqual(10);
expect(data.hapModulesInfo[0].abilitiesInfo[9].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_LANDSCAPE_RESTRICTED);
expect(data.hapModulesInfo[0].abilitiesInfo[10].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility9");
expect(data.hapModulesInfo[0].abilitiesInfo[10].orientation).assertEqual(11);
expect(data.hapModulesInfo[0].abilitiesInfo[10].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_PORTRAIT_RESTRICTED);
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[1])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[2])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[3])
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录