Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
143ea1d7
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看板
提交
143ea1d7
编写于
11月 30, 2021
作者:
Z
zhaoyuan17
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update test code
Signed-off-by:
N
zhaoyuan17
<
zhaoyuan17@huawei.com
>
上级
74c034a3
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
60 addition
and
10 deletion
+60
-10
appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/js/test/ExampleJsunit.test.js
...emanagertest/entry/src/main/js/test/ExampleJsunit.test.js
+44
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenefive/src/main/config.json
...dlemanager/sceneProject/bmsscenefive/src/main/config.json
+4
-2
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenefour/src/main/config.json
...dlemanager/sceneProject/bmsscenefour/src/main/config.json
+2
-1
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneone/src/main/config.json
...ndlemanager/sceneProject/bmssceneone/src/main/config.json
+1
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenethree/src/main/config.json
...lemanager/sceneProject/bmsscenethree/src/main/config.json
+5
-4
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenetwo/src/main/config.json
...ndlemanager/sceneProject/bmsscenetwo/src/main/config.json
+4
-3
未找到文件。
appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/js/test/ExampleJsunit.test.js
浏览文件 @
143ea1d7
...
...
@@ -58,6 +58,23 @@ var BundleFlag = {
GET_BUNDLE_WITH_ABILITIES
:
1
,
GET_APPLICATION_INFO_WITH_PERMISSION
:
2
};
var
AbilityType
=
{
UNKNOWN
:
0
,
PAGE
:
1
,
SERVICE
:
2
,
DATA
:
3
,
FORM
:
4
,
};
var
DisplayOrientation
=
{
UNSPECIFIED
:
0
,
LANDSCAPE
:
1
,
PORTRAIT
:
2
,
FOLLOW_RECENT
:
3
};
var
LaunchMode
=
{
SINGLETON
:
0
,
STANDARD
:
1
};
describe
(
'
ActsBundleManagerTest
'
,
function
()
{
...
...
@@ -1785,6 +1802,9 @@ describe('ActsBundleManagerTest', function () {
expect
(
datainfo
.
label
).
assertEqual
(
"
$string:app_name
"
)
expect
(
datainfo
.
description
).
assertEqual
(
"
$string:mainability_description
"
)
expect
(
datainfo
.
icon
).
assertEqual
(
"
$media:icon
"
)
expect
(
datainfo
.
type
).
assertEqual
(
AbilityType
.
SERVICE
)
expect
(
datainfo
.
launchMode
).
assertEqual
(
LaunchMode
.
SINGLETON
)
expect
(
datainfo
.
orientation
).
assertEqual
(
DisplayOrientation
.
LANDSCAPE
)
expect
(
datainfo
.
moduleName
).
assertEqual
(
"
entry
"
)
expect
(
datainfo
.
bundleName
).
assertEqual
(
NAME2
)
expect
(
datainfo
.
applicationInfo
.
name
).
assertEqual
(
NAME2
)
...
...
@@ -2812,6 +2832,26 @@ describe('ActsBundleManagerTest', function () {
},
}
},
0
,
0
)
var
data1
=
await
demo
.
queryAbilityByWant
({
want
:
{
action
:
"
action.system.home
"
,
entities
:
[
"
entity.system.home
"
],
elementName
:
{
deviceId
:
"
0
"
,
bundleName
:
"
com.example.myapplication5
"
,
abilityName
:
"
com.example.myapplication.MainAbility
"
,
uri
:
""
,
shortName
:
""
},
}
},
0
,
0
)
expect
(
data1
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
,
len
=
data1
.
length
;
i
<
len
;
i
++
)
{
var
datainfo
=
data1
[
i
];
expect
(
datainfo
.
type
).
assertEqual
(
AbilityType
.
DATA
)
expect
(
datainfo
.
orientation
).
assertEqual
(
DisplayOrientation
.
FOLLOW_RECENT
)
}
expect
(
data
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
,
len
=
data
.
length
;
i
<
len
;
i
++
)
{
var
datainfo
=
data
[
i
];
...
...
@@ -2821,6 +2861,8 @@ describe('ActsBundleManagerTest', function () {
expect
(
datainfo
.
icon
).
assertEqual
(
"
$media:icon
"
)
expect
(
datainfo
.
moduleName
).
assertEqual
(
"
entry
"
)
expect
(
datainfo
.
bundleName
).
assertEqual
(
NAME3
)
expect
(
datainfo
.
type
).
assertEqual
(
AbilityType
.
PAGE
)
expect
(
datainfo
.
orientation
).
assertEqual
(
DisplayOrientation
.
PORTRAIT
)
expect
(
datainfo
.
applicationInfo
.
name
).
assertEqual
(
NAME3
)
expect
(
datainfo
.
applicationInfo
.
description
).
assertEqual
(
"
$string:mainability_description
"
)
expect
(
datainfo
.
applicationInfo
.
descriptionId
>=
0
).
assertTrue
()
...
...
@@ -3341,6 +3383,8 @@ describe('ActsBundleManagerTest', function () {
expect
(
datainfo
.
icon
).
assertEqual
(
"
$media:icon
"
)
expect
(
datainfo
.
moduleName
).
assertEqual
(
"
entry
"
)
expect
(
datainfo
.
bundleName
).
assertEqual
(
NAME1
)
expect
(
datainfo
.
launchMode
).
assertEqual
(
LaunchMode
.
STANDARD
)
expect
(
datainfo
.
orientation
).
assertEqual
(
DisplayOrientation
.
UNSPECIFIED
)
expect
(
datainfo
.
applicationInfo
.
name
).
assertEqual
(
NAME1
)
expect
(
datainfo
.
applicationInfo
.
description
).
assertEqual
(
"
$string:mainability_description
"
)
expect
(
datainfo
.
applicationInfo
.
descriptionId
>=
0
).
assertTrue
()
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenefive/src/main/config.json
浏览文件 @
143ea1d7
...
...
@@ -40,10 +40,12 @@
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"
page
"
,
"type"
:
"
data
"
,
"isVisible"
:
"true"
,
"launchType"
:
"standard"
,
"language"
:
"C++"
"language"
:
"C++"
,
"orientation"
:
"followrecent"
,
"uri"
:
"dataability://"
}
],
"js"
:
[
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenefour/src/main/config.json
浏览文件 @
143ea1d7
...
...
@@ -42,8 +42,9 @@
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"isVisible"
:
"true"
,
"language"
:
"C++"
,
"launchType"
:
"standard"
,
"
language"
:
"C++
"
"
orientation"
:
"portrait
"
}
],
"js"
:
[
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneone/src/main/config.json
浏览文件 @
143ea1d7
...
...
@@ -43,6 +43,7 @@
"type"
:
"page"
,
"isVisible"
:
"true"
,
"launchType"
:
"standard"
,
"orientation"
:
"unspecified"
,
"language"
:
"C++"
,
"metaData"
:
{
"customizeData"
:
[
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenethree/src/main/config.json
浏览文件 @
143ea1d7
...
...
@@ -36,11 +36,12 @@
"icon"
:
"$media:icon"
,
"name"
:
".MainAbility"
,
"description"
:
"$string:mainability_description"
,
"language"
:
"C++"
,
"isVisible"
:
"true"
,
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"launchType"
:
"standard"
"type"
:
"service"
,
"isVisible"
:
"true"
,
"launchType"
:
"singleton"
,
"language"
:
"C++"
,
"orientation"
:
"landscape"
}
],
"deviceType"
:
[
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenetwo/src/main/config.json
浏览文件 @
143ea1d7
...
...
@@ -40,10 +40,11 @@
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"
pag
e"
,
"type"
:
"
servic
e"
,
"isVisible"
:
"true"
,
"launchType"
:
"standard"
,
"language"
:
"C++"
"launchType"
:
"singleton"
,
"language"
:
"C++"
,
"orientation"
:
"landscape"
}
],
"js"
:
[
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录