Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f417bb2b
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
f417bb2b
编写于
2月 24, 2022
作者:
O
openharmony_ci
提交者:
Gitee
2月 24, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2026 bms用例适配接口变更
Merge pull request !2026 from wangtiantian/delete_api
上级
a049de83
45e05ecc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
62 addition
and
66 deletion
+62
-66
appexecfwk/bundle_standard/bundlemanager/actsbmshapmoduletest/entry/src/main/js/test/ActsBmsHapModuleTest.test.js
...etest/entry/src/main/js/test/ActsBmsHapModuleTest.test.js
+28
-28
appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/js/test/ActsBmsJsTest.test.js
...ctsbmsjstest/entry/src/main/js/test/ActsBmsJsTest.test.js
+27
-27
appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/js/test/ExampleJsunit.test.js
...emanagertest/entry/src/main/js/test/ExampleJsunit.test.js
+7
-11
未找到文件。
appexecfwk/bundle_standard/bundlemanager/actsbmshapmoduletest/entry/src/main/js/test/ActsBmsHapModuleTest.test.js
浏览文件 @
f417bb2b
...
@@ -39,9 +39,9 @@ describe('ActsBmsHapModuleTest', function () {
...
@@ -39,9 +39,9 @@ describe('ActsBmsHapModuleTest', function () {
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
bundle
.
getBundleInfo
(
bundleName
,
1
,
callback
);
bundle
.
getBundleInfo
(
bundleName
,
1
,
callback
);
async
function
callback
(
err
,
result
)
{
async
function
callback
(
err
,
result
)
{
expect
(
result
.
hapModuleInfo
.
length
).
assertEqual
(
1
);
expect
(
result
.
hapModuleInfo
s
.
length
).
assertEqual
(
1
);
if
(
result
.
hapModuleInfo
.
length
>
0
)
{
if
(
result
.
hapModuleInfo
s
.
length
>
0
)
{
let
hapModuleInfo
=
result
.
hapModuleInfo
[
0
];
let
hapModuleInfo
=
result
.
hapModuleInfo
s
[
0
];
expect
(
hapModuleInfo
.
moduleName
).
assertEqual
(
'
entry
'
);
expect
(
hapModuleInfo
.
moduleName
).
assertEqual
(
'
entry
'
);
expect
(
hapModuleInfo
.
mainAbilityName
).
assertEqual
(
'
com.example.bmsmainabilityfirstscene.MainAbility
'
);
expect
(
hapModuleInfo
.
mainAbilityName
).
assertEqual
(
'
com.example.bmsmainabilityfirstscene.MainAbility
'
);
expect
(
hapModuleInfo
.
mainElementName
).
assertEqual
(
'
com.example.bmsmainabilityfirstscene.MainAbility
'
);
expect
(
hapModuleInfo
.
mainElementName
).
assertEqual
(
'
com.example.bmsmainabilityfirstscene.MainAbility
'
);
...
@@ -105,14 +105,14 @@ describe('ActsBmsHapModuleTest', function () {
...
@@ -105,14 +105,14 @@ describe('ActsBmsHapModuleTest', function () {
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
bundle
.
getBundleInfo
(
bundleName
,
1
,
async
(
err
,
result
)
=>
{
bundle
.
getBundleInfo
(
bundleName
,
1
,
async
(
err
,
result
)
=>
{
expect
(
result
.
hapModuleInfo
.
length
).
assertEqual
(
2
);
expect
(
result
.
hapModuleInfo
s
.
length
).
assertEqual
(
2
);
if
(
result
.
hapModuleInfo
.
length
==
2
)
{
if
(
result
.
hapModuleInfo
s
.
length
==
2
)
{
expect
(
result
.
hapModuleInfo
[
0
].
mainAbilityName
).
assertEqual
(
firstMainAbility
);
expect
(
result
.
hapModuleInfo
s
[
0
].
mainAbilityName
).
assertEqual
(
firstMainAbility
);
expect
(
result
.
hapModuleInfo
[
0
].
moduleName
).
assertEqual
(
'
entry
'
);
expect
(
result
.
hapModuleInfo
s
[
0
].
moduleName
).
assertEqual
(
'
entry
'
);
checkHapModuleInfo
(
result
.
hapModuleInfo
[
0
]);
checkHapModuleInfo
(
result
.
hapModuleInfo
s
[
0
]);
expect
(
result
.
hapModuleInfo
[
1
].
mainAbilityName
).
assertEqual
(
secondMainAbility
);
expect
(
result
.
hapModuleInfo
s
[
1
].
mainAbilityName
).
assertEqual
(
secondMainAbility
);
expect
(
result
.
hapModuleInfo
[
1
].
moduleName
).
assertEqual
(
'
bmsmainabilitysecondscene
'
);
expect
(
result
.
hapModuleInfo
s
[
1
].
moduleName
).
assertEqual
(
'
bmsmainabilitysecondscene
'
);
checkHapModuleInfo
(
result
.
hapModuleInfo
[
1
]);
checkHapModuleInfo
(
result
.
hapModuleInfo
s
[
1
]);
}
}
installer
.
uninstall
(
bundleName
,
{
installer
.
uninstall
(
bundleName
,
{
userId
:
100
,
userId
:
100
,
...
@@ -153,12 +153,12 @@ describe('ActsBmsHapModuleTest', function () {
...
@@ -153,12 +153,12 @@ describe('ActsBmsHapModuleTest', function () {
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
bundle
.
getBundleInfo
(
bundleName
,
1
,).
then
(
async
(
result
)
=>
{
bundle
.
getBundleInfo
(
bundleName
,
1
,).
then
(
async
(
result
)
=>
{
console
.
debug
(
'
=======get hapModule========
'
+
JSON
.
stringify
(
result
))
console
.
debug
(
'
=======get hapModule========
'
+
JSON
.
stringify
(
result
))
expect
(
result
.
hapModuleInfo
.
length
).
assertEqual
(
1
);
expect
(
result
.
hapModuleInfo
s
.
length
).
assertEqual
(
1
);
if
(
result
.
hapModuleInfo
.
length
>
0
)
{
if
(
result
.
hapModuleInfo
s
.
length
>
0
)
{
console
.
debug
(
'
=======get hapModule mainAbilityName========
'
+
result
.
hapModuleInfo
[
0
].
mainAbilityName
)
console
.
debug
(
'
=======get hapModule mainAbilityName========
'
+
result
.
hapModuleInfo
s
[
0
].
mainAbilityName
)
expect
(
result
.
hapModuleInfo
[
0
].
mainAbilityName
).
assertEqual
(
''
);
expect
(
result
.
hapModuleInfo
s
[
0
].
mainAbilityName
).
assertEqual
(
''
);
expect
(
result
.
hapModuleInfo
[
0
].
moduleName
).
assertEqual
(
'
entry
'
);
expect
(
result
.
hapModuleInfo
s
[
0
].
moduleName
).
assertEqual
(
'
entry
'
);
checkHapModuleInfo
(
result
.
hapModuleInfo
[
0
]);
checkHapModuleInfo
(
result
.
hapModuleInfo
s
[
0
]);
}
}
installer
.
uninstall
(
bundleName
,
{
installer
.
uninstall
(
bundleName
,
{
userId
:
100
,
userId
:
100
,
...
@@ -203,11 +203,11 @@ describe('ActsBmsHapModuleTest', function () {
...
@@ -203,11 +203,11 @@ describe('ActsBmsHapModuleTest', function () {
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
bundle
.
getBundleInfo
(
bundleName
,
1
,
async
(
err
,
result
)
=>
{
bundle
.
getBundleInfo
(
bundleName
,
1
,
async
(
err
,
result
)
=>
{
console
.
debug
(
'
=======get hapModule========
'
+
JSON
.
stringify
(
result
))
console
.
debug
(
'
=======get hapModule========
'
+
JSON
.
stringify
(
result
))
expect
(
result
.
hapModuleInfo
.
length
).
assertEqual
(
1
);
expect
(
result
.
hapModuleInfo
s
.
length
).
assertEqual
(
1
);
if
(
result
.
hapModuleInfo
.
length
==
1
)
{
if
(
result
.
hapModuleInfo
s
.
length
==
1
)
{
expect
(
result
.
hapModuleInfo
[
0
].
mainAbilityName
).
assertEqual
(
'
com.example.third5.AMainAbility
'
);
expect
(
result
.
hapModuleInfo
s
[
0
].
mainAbilityName
).
assertEqual
(
'
com.example.third5.AMainAbility
'
);
expect
(
result
.
hapModuleInfo
[
0
].
moduleName
).
assertEqual
(
'
entry
'
);
expect
(
result
.
hapModuleInfo
s
[
0
].
moduleName
).
assertEqual
(
'
entry
'
);
checkHapModuleInfo
(
result
.
hapModuleInfo
[
0
]);
checkHapModuleInfo
(
result
.
hapModuleInfo
s
[
0
]);
}
}
installer
.
uninstall
(
bundleName
,
{
installer
.
uninstall
(
bundleName
,
{
userId
:
100
,
userId
:
100
,
...
@@ -256,9 +256,9 @@ describe('ActsBmsHapModuleTest', function () {
...
@@ -256,9 +256,9 @@ describe('ActsBmsHapModuleTest', function () {
})
})
})
})
function
callback
(
err
,
result
)
{
function
callback
(
err
,
result
)
{
expect
(
result
.
hapModuleInfo
.
length
).
assertEqual
(
1
);
expect
(
result
.
hapModuleInfo
s
.
length
).
assertEqual
(
1
);
if
(
result
.
hapModuleInfo
.
length
==
1
)
{
if
(
result
.
hapModuleInfo
s
.
length
==
1
)
{
let
hapModuleInfo
=
result
.
hapModuleInfo
[
0
];
let
hapModuleInfo
=
result
.
hapModuleInfo
s
[
0
];
expect
(
hapModuleInfo
.
moduleName
).
assertEqual
(
'
entry
'
);
expect
(
hapModuleInfo
.
moduleName
).
assertEqual
(
'
entry
'
);
expect
(
hapModuleInfo
.
mainAbilityName
).
assertEqual
(
'
com.example.third1.AMainAbility
'
);
expect
(
hapModuleInfo
.
mainAbilityName
).
assertEqual
(
'
com.example.third1.AMainAbility
'
);
checkHapModuleInfo
(
hapModuleInfo
);
checkHapModuleInfo
(
hapModuleInfo
);
...
@@ -286,9 +286,9 @@ describe('ActsBmsHapModuleTest', function () {
...
@@ -286,9 +286,9 @@ describe('ActsBmsHapModuleTest', function () {
let
bundleName
=
'
com.example.system1
'
;
let
bundleName
=
'
com.example.system1
'
;
bundle
.
getBundleInfo
(
bundleName
,
1
,
callback
);
bundle
.
getBundleInfo
(
bundleName
,
1
,
callback
);
function
callback
(
err
,
data
)
{
function
callback
(
err
,
data
)
{
expect
(
data
.
hapModuleInfo
.
length
).
assertEqual
(
1
);
expect
(
data
.
hapModuleInfo
s
.
length
).
assertEqual
(
1
);
if
(
data
.
hapModuleInfo
.
length
==
1
)
{
if
(
data
.
hapModuleInfo
s
.
length
==
1
)
{
let
hapModuleInfo
=
data
.
hapModuleInfo
[
0
];
let
hapModuleInfo
=
data
.
hapModuleInfo
s
[
0
];
console
.
debug
(
'
=======get hapModule========
'
+
JSON
.
stringify
(
hapModuleInfo
))
console
.
debug
(
'
=======get hapModule========
'
+
JSON
.
stringify
(
hapModuleInfo
))
console
.
debug
(
'
=======get hapModule mainAbilityName========
'
+
hapModuleInfo
.
mainAbilityName
)
console
.
debug
(
'
=======get hapModule mainAbilityName========
'
+
hapModuleInfo
.
mainAbilityName
)
expect
(
hapModuleInfo
.
moduleName
).
assertEqual
(
'
entry
'
);
expect
(
hapModuleInfo
.
moduleName
).
assertEqual
(
'
entry
'
);
...
...
appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/js/test/ActsBmsJsTest.test.js
浏览文件 @
f417bb2b
...
@@ -42,12 +42,12 @@ describe('ActsBmsJsTest', function () {
...
@@ -42,12 +42,12 @@ describe('ActsBmsJsTest', function () {
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
let
result
=
await
bundle
.
getBundleInfo
(
bundleName
,
1
);
let
result
=
await
bundle
.
getBundleInfo
(
bundleName
,
1
);
expect
(
result
.
abilityInfo
.
length
).
assertEqual
(
NUM_TWO
);
expect
(
result
.
abilityInfo
s
.
length
).
assertEqual
(
NUM_TWO
);
if
(
result
.
abilityInfo
.
length
==
NUM_TWO
)
{
if
(
result
.
abilityInfo
s
.
length
==
NUM_TWO
)
{
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
));
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
s
));
expect
(
result
.
abilityInfo
[
0
].
name
).
assertEqual
(
abilityName
);
expect
(
result
.
abilityInfo
s
[
0
].
name
).
assertEqual
(
abilityName
);
expect
(
result
.
abilityInfo
[
0
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
s
[
0
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
[
0
].
srcPath
).
assertEqual
(
''
);
expect
(
result
.
abilityInfo
s
[
0
].
srcPath
).
assertEqual
(
''
);
}
}
installer
.
uninstall
(
bundleName
,
{
installer
.
uninstall
(
bundleName
,
{
userId
:
100
,
userId
:
100
,
...
@@ -90,15 +90,15 @@ describe('ActsBmsJsTest', function () {
...
@@ -90,15 +90,15 @@ describe('ActsBmsJsTest', function () {
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
let
result
=
await
bundle
.
getBundleInfo
(
bundleName
,
1
)
let
result
=
await
bundle
.
getBundleInfo
(
bundleName
,
1
)
console
.
debug
(
'
==========bundleInfo==========
'
+
JSON
.
stringify
(
result
))
console
.
debug
(
'
==========bundleInfo==========
'
+
JSON
.
stringify
(
result
))
expect
(
result
.
abilityInfo
.
length
).
assertEqual
(
NUM_FOUR
);
expect
(
result
.
abilityInfo
s
.
length
).
assertEqual
(
NUM_FOUR
);
if
(
result
.
abilityInfo
.
length
==
NUM_FOUR
)
{
if
(
result
.
abilityInfo
s
.
length
==
NUM_FOUR
)
{
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
));
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
s
));
expect
(
result
.
abilityInfo
[
0
].
name
).
assertEqual
(
abilityName1
);
expect
(
result
.
abilityInfo
s
[
0
].
name
).
assertEqual
(
abilityName1
);
expect
(
result
.
abilityInfo
[
0
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
s
[
0
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
[
0
].
srcPath
).
assertEqual
(
''
);
expect
(
result
.
abilityInfo
s
[
0
].
srcPath
).
assertEqual
(
''
);
expect
(
result
.
abilityInfo
[
1
].
name
).
assertEqual
(
abilityName2
);
expect
(
result
.
abilityInfo
s
[
1
].
name
).
assertEqual
(
abilityName2
);
expect
(
result
.
abilityInfo
[
1
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
s
[
1
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
[
1
].
srcPath
).
assertEqual
(
''
);
expect
(
result
.
abilityInfo
s
[
1
].
srcPath
).
assertEqual
(
''
);
}
}
installer
.
uninstall
(
bundleName
,
{
installer
.
uninstall
(
bundleName
,
{
userId
:
100
,
userId
:
100
,
...
@@ -138,12 +138,12 @@ describe('ActsBmsJsTest', function () {
...
@@ -138,12 +138,12 @@ describe('ActsBmsJsTest', function () {
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
let
result
=
await
bundle
.
getBundleInfo
(
bundleName
,
1
);
let
result
=
await
bundle
.
getBundleInfo
(
bundleName
,
1
);
expect
(
result
.
abilityInfo
.
length
).
assertEqual
(
1
);
expect
(
result
.
abilityInfo
s
.
length
).
assertEqual
(
1
);
if
(
result
.
abilityInfo
.
length
==
1
)
{
if
(
result
.
abilityInfo
s
.
length
==
1
)
{
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
));
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
s
));
expect
(
result
.
abilityInfo
[
0
].
name
).
assertEqual
(
abilityName
);
expect
(
result
.
abilityInfo
s
[
0
].
name
).
assertEqual
(
abilityName
);
expect
(
result
.
abilityInfo
[
0
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
s
[
0
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
[
0
].
srcPath
).
assertEqual
(
'
default
'
);
expect
(
result
.
abilityInfo
s
[
0
].
srcPath
).
assertEqual
(
'
default
'
);
}
}
installer
.
uninstall
(
bundleName
,
{
installer
.
uninstall
(
bundleName
,
{
userId
:
100
,
userId
:
100
,
...
@@ -184,12 +184,12 @@ describe('ActsBmsJsTest', function () {
...
@@ -184,12 +184,12 @@ describe('ActsBmsJsTest', function () {
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
let
result
=
await
bundle
.
getBundleInfo
(
bundleName
,
1
);
let
result
=
await
bundle
.
getBundleInfo
(
bundleName
,
1
);
expect
(
result
.
abilityInfo
.
length
).
assertEqual
(
1
);
expect
(
result
.
abilityInfo
s
.
length
).
assertEqual
(
1
);
if
(
result
.
abilityInfo
.
length
==
1
)
{
if
(
result
.
abilityInfo
s
.
length
==
1
)
{
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
));
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
s
));
expect
(
result
.
abilityInfo
[
0
].
name
).
assertEqual
(
abilityName
);
expect
(
result
.
abilityInfo
s
[
0
].
name
).
assertEqual
(
abilityName
);
expect
(
result
.
abilityInfo
[
0
].
srcLanguage
).
assertEqual
(
'
c++
'
);
expect
(
result
.
abilityInfo
s
[
0
].
srcLanguage
).
assertEqual
(
'
c++
'
);
expect
(
result
.
abilityInfo
[
0
].
srcPath
).
assertEqual
(
'
default/c++/
'
);
expect
(
result
.
abilityInfo
s
[
0
].
srcPath
).
assertEqual
(
'
default/c++/
'
);
}
}
installer
.
uninstall
(
bundleName
,
{
installer
.
uninstall
(
bundleName
,
{
userId
:
100
,
userId
:
100
,
...
...
appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/js/test/ExampleJsunit.test.js
浏览文件 @
f417bb2b
...
@@ -97,7 +97,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -97,7 +97,7 @@ describe('ActsBundleManagerTest', function () {
expect
(
datainfo
.
compatibleVersion
).
assertEqual
(
5
)
expect
(
datainfo
.
compatibleVersion
).
assertEqual
(
5
)
expect
(
datainfo
.
targetVersion
).
assertEqual
(
5
)
expect
(
datainfo
.
targetVersion
).
assertEqual
(
5
)
expect
(
datainfo
.
isCompressNativeLibs
).
assertEqual
(
false
)
expect
(
datainfo
.
isCompressNativeLibs
).
assertEqual
(
false
)
for
(
var
s
=
0
;
s
<
datainfo
.
hapModuleInfo
;
s
++
)
{
for
(
var
s
=
0
;
s
<
datainfo
.
hapModuleInfo
s
;
s
++
)
{
expect
(
datainfo
.
moduleInfos
[
s
].
name
).
assertEqual
(
"
com.example.myapplication1
"
)
expect
(
datainfo
.
moduleInfos
[
s
].
name
).
assertEqual
(
"
com.example.myapplication1
"
)
expect
(
datainfo
.
moduleInfos
[
s
].
moduleName
).
assertEqual
(
"
entry
"
)
expect
(
datainfo
.
moduleInfos
[
s
].
moduleName
).
assertEqual
(
"
entry
"
)
}
}
...
@@ -2426,8 +2426,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2426,8 +2426,7 @@ describe('ActsBundleManagerTest', function () {
});
});
async
function
getInfo
()
{
async
function
getInfo
()
{
var
bundleOptions
=
{
var
bundleOptions
=
{
userId
:
100
,
userId
:
100
networkId
:
""
};
};
var
dataInfo
=
await
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
bundleOptions
);
var
dataInfo
=
await
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
bundleOptions
);
expect
(
dataInfo
.
name
).
assertEqual
(
NAME1
)
expect
(
dataInfo
.
name
).
assertEqual
(
NAME1
)
...
@@ -2450,7 +2449,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2450,7 +2449,7 @@ describe('ActsBundleManagerTest', function () {
expect
(
dataInfo
.
compatibleVersion
).
assertEqual
(
5
)
expect
(
dataInfo
.
compatibleVersion
).
assertEqual
(
5
)
expect
(
dataInfo
.
targetVersion
).
assertEqual
(
5
)
expect
(
dataInfo
.
targetVersion
).
assertEqual
(
5
)
expect
(
dataInfo
.
isCompressNativeLibs
).
assertEqual
(
false
)
expect
(
dataInfo
.
isCompressNativeLibs
).
assertEqual
(
false
)
for
(
var
s
=
0
;
s
<
dataInfo
.
hapModuleInfo
;
s
++
)
{
for
(
var
s
=
0
;
s
<
dataInfo
.
hapModuleInfo
s
;
s
++
)
{
expect
(
dataInfo
.
moduleInfos
[
s
].
name
).
assertEqual
(
"
com.example.myapplication1
"
)
expect
(
dataInfo
.
moduleInfos
[
s
].
name
).
assertEqual
(
"
com.example.myapplication1
"
)
expect
(
dataInfo
.
moduleInfos
[
s
].
moduleName
).
assertEqual
(
"
entry
"
)
expect
(
dataInfo
.
moduleInfos
[
s
].
moduleName
).
assertEqual
(
"
entry
"
)
}
}
...
@@ -2495,8 +2494,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2495,8 +2494,7 @@ describe('ActsBundleManagerTest', function () {
});
});
async
function
getInfo
()
{
async
function
getInfo
()
{
var
bundleOptions
=
{
var
bundleOptions
=
{
userId
:
100
,
userId
:
100
networkId
:
""
};
};
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
bundleOptions
,
(
err
,
dataInfo
)
=>
{
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
bundleOptions
,
(
err
,
dataInfo
)
=>
{
expect
(
dataInfo
.
name
).
assertEqual
(
NAME1
)
expect
(
dataInfo
.
name
).
assertEqual
(
NAME1
)
...
@@ -2519,7 +2517,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2519,7 +2517,7 @@ describe('ActsBundleManagerTest', function () {
expect
(
dataInfo
.
compatibleVersion
).
assertEqual
(
5
)
expect
(
dataInfo
.
compatibleVersion
).
assertEqual
(
5
)
expect
(
dataInfo
.
targetVersion
).
assertEqual
(
5
)
expect
(
dataInfo
.
targetVersion
).
assertEqual
(
5
)
expect
(
dataInfo
.
isCompressNativeLibs
).
assertEqual
(
false
)
expect
(
dataInfo
.
isCompressNativeLibs
).
assertEqual
(
false
)
for
(
var
s
=
0
;
s
<
dataInfo
.
hapModuleInfo
;
s
++
)
{
for
(
var
s
=
0
;
s
<
dataInfo
.
hapModuleInfo
s
;
s
++
)
{
expect
(
dataInfo
.
moduleInfos
[
s
].
name
).
assertEqual
(
"
com.example.myapplication1
"
)
expect
(
dataInfo
.
moduleInfos
[
s
].
name
).
assertEqual
(
"
com.example.myapplication1
"
)
expect
(
dataInfo
.
moduleInfos
[
s
].
moduleName
).
assertEqual
(
"
entry
"
)
expect
(
dataInfo
.
moduleInfos
[
s
].
moduleName
).
assertEqual
(
"
entry
"
)
}
}
...
@@ -2565,8 +2563,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2565,8 +2563,7 @@ describe('ActsBundleManagerTest', function () {
});
});
async
function
getInfo
()
{
async
function
getInfo
()
{
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
{
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
{
userId
:
1
,
userId
:
1
networkId
:
""
}).
then
(
data
=>
{
}).
then
(
data
=>
{
expect
().
assertFail
();
expect
().
assertFail
();
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
...
@@ -2604,8 +2601,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2604,8 +2601,7 @@ describe('ActsBundleManagerTest', function () {
});
});
async
function
getInfo
()
{
async
function
getInfo
()
{
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
{
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
{
userId
:
1
,
userId
:
1
networkId
:
""
},
(
err
,
dataInfo
)
=>
{
},
(
err
,
dataInfo
)
=>
{
expect
(
err
).
assertEqual
(
1
);
expect
(
err
).
assertEqual
(
1
);
expect
(
dataInfo
).
assertEqual
(
undefined
);
expect
(
dataInfo
).
assertEqual
(
undefined
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录