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看板
未验证
提交
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 () {
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
bundle
.
getBundleInfo
(
bundleName
,
1
,
callback
);
async
function
callback
(
err
,
result
)
{
expect
(
result
.
hapModuleInfo
.
length
).
assertEqual
(
1
);
if
(
result
.
hapModuleInfo
.
length
>
0
)
{
let
hapModuleInfo
=
result
.
hapModuleInfo
[
0
];
expect
(
result
.
hapModuleInfo
s
.
length
).
assertEqual
(
1
);
if
(
result
.
hapModuleInfo
s
.
length
>
0
)
{
let
hapModuleInfo
=
result
.
hapModuleInfo
s
[
0
];
expect
(
hapModuleInfo
.
moduleName
).
assertEqual
(
'
entry
'
);
expect
(
hapModuleInfo
.
mainAbilityName
).
assertEqual
(
'
com.example.bmsmainabilityfirstscene.MainAbility
'
);
expect
(
hapModuleInfo
.
mainElementName
).
assertEqual
(
'
com.example.bmsmainabilityfirstscene.MainAbility
'
);
...
...
@@ -105,14 +105,14 @@ describe('ActsBmsHapModuleTest', function () {
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
bundle
.
getBundleInfo
(
bundleName
,
1
,
async
(
err
,
result
)
=>
{
expect
(
result
.
hapModuleInfo
.
length
).
assertEqual
(
2
);
if
(
result
.
hapModuleInfo
.
length
==
2
)
{
expect
(
result
.
hapModuleInfo
[
0
].
mainAbilityName
).
assertEqual
(
firstMainAbility
);
expect
(
result
.
hapModuleInfo
[
0
].
moduleName
).
assertEqual
(
'
entry
'
);
checkHapModuleInfo
(
result
.
hapModuleInfo
[
0
]);
expect
(
result
.
hapModuleInfo
[
1
].
mainAbilityName
).
assertEqual
(
secondMainAbility
);
expect
(
result
.
hapModuleInfo
[
1
].
moduleName
).
assertEqual
(
'
bmsmainabilitysecondscene
'
);
checkHapModuleInfo
(
result
.
hapModuleInfo
[
1
]);
expect
(
result
.
hapModuleInfo
s
.
length
).
assertEqual
(
2
);
if
(
result
.
hapModuleInfo
s
.
length
==
2
)
{
expect
(
result
.
hapModuleInfo
s
[
0
].
mainAbilityName
).
assertEqual
(
firstMainAbility
);
expect
(
result
.
hapModuleInfo
s
[
0
].
moduleName
).
assertEqual
(
'
entry
'
);
checkHapModuleInfo
(
result
.
hapModuleInfo
s
[
0
]);
expect
(
result
.
hapModuleInfo
s
[
1
].
mainAbilityName
).
assertEqual
(
secondMainAbility
);
expect
(
result
.
hapModuleInfo
s
[
1
].
moduleName
).
assertEqual
(
'
bmsmainabilitysecondscene
'
);
checkHapModuleInfo
(
result
.
hapModuleInfo
s
[
1
]);
}
installer
.
uninstall
(
bundleName
,
{
userId
:
100
,
...
...
@@ -153,12 +153,12 @@ describe('ActsBmsHapModuleTest', function () {
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
bundle
.
getBundleInfo
(
bundleName
,
1
,).
then
(
async
(
result
)
=>
{
console
.
debug
(
'
=======get hapModule========
'
+
JSON
.
stringify
(
result
))
expect
(
result
.
hapModuleInfo
.
length
).
assertEqual
(
1
);
if
(
result
.
hapModuleInfo
.
length
>
0
)
{
console
.
debug
(
'
=======get hapModule mainAbilityName========
'
+
result
.
hapModuleInfo
[
0
].
mainAbilityName
)
expect
(
result
.
hapModuleInfo
[
0
].
mainAbilityName
).
assertEqual
(
''
);
expect
(
result
.
hapModuleInfo
[
0
].
moduleName
).
assertEqual
(
'
entry
'
);
checkHapModuleInfo
(
result
.
hapModuleInfo
[
0
]);
expect
(
result
.
hapModuleInfo
s
.
length
).
assertEqual
(
1
);
if
(
result
.
hapModuleInfo
s
.
length
>
0
)
{
console
.
debug
(
'
=======get hapModule mainAbilityName========
'
+
result
.
hapModuleInfo
s
[
0
].
mainAbilityName
)
expect
(
result
.
hapModuleInfo
s
[
0
].
mainAbilityName
).
assertEqual
(
''
);
expect
(
result
.
hapModuleInfo
s
[
0
].
moduleName
).
assertEqual
(
'
entry
'
);
checkHapModuleInfo
(
result
.
hapModuleInfo
s
[
0
]);
}
installer
.
uninstall
(
bundleName
,
{
userId
:
100
,
...
...
@@ -203,11 +203,11 @@ describe('ActsBmsHapModuleTest', function () {
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
bundle
.
getBundleInfo
(
bundleName
,
1
,
async
(
err
,
result
)
=>
{
console
.
debug
(
'
=======get hapModule========
'
+
JSON
.
stringify
(
result
))
expect
(
result
.
hapModuleInfo
.
length
).
assertEqual
(
1
);
if
(
result
.
hapModuleInfo
.
length
==
1
)
{
expect
(
result
.
hapModuleInfo
[
0
].
mainAbilityName
).
assertEqual
(
'
com.example.third5.AMainAbility
'
);
expect
(
result
.
hapModuleInfo
[
0
].
moduleName
).
assertEqual
(
'
entry
'
);
checkHapModuleInfo
(
result
.
hapModuleInfo
[
0
]);
expect
(
result
.
hapModuleInfo
s
.
length
).
assertEqual
(
1
);
if
(
result
.
hapModuleInfo
s
.
length
==
1
)
{
expect
(
result
.
hapModuleInfo
s
[
0
].
mainAbilityName
).
assertEqual
(
'
com.example.third5.AMainAbility
'
);
expect
(
result
.
hapModuleInfo
s
[
0
].
moduleName
).
assertEqual
(
'
entry
'
);
checkHapModuleInfo
(
result
.
hapModuleInfo
s
[
0
]);
}
installer
.
uninstall
(
bundleName
,
{
userId
:
100
,
...
...
@@ -256,9 +256,9 @@ describe('ActsBmsHapModuleTest', function () {
})
})
function
callback
(
err
,
result
)
{
expect
(
result
.
hapModuleInfo
.
length
).
assertEqual
(
1
);
if
(
result
.
hapModuleInfo
.
length
==
1
)
{
let
hapModuleInfo
=
result
.
hapModuleInfo
[
0
];
expect
(
result
.
hapModuleInfo
s
.
length
).
assertEqual
(
1
);
if
(
result
.
hapModuleInfo
s
.
length
==
1
)
{
let
hapModuleInfo
=
result
.
hapModuleInfo
s
[
0
];
expect
(
hapModuleInfo
.
moduleName
).
assertEqual
(
'
entry
'
);
expect
(
hapModuleInfo
.
mainAbilityName
).
assertEqual
(
'
com.example.third1.AMainAbility
'
);
checkHapModuleInfo
(
hapModuleInfo
);
...
...
@@ -286,9 +286,9 @@ describe('ActsBmsHapModuleTest', function () {
let
bundleName
=
'
com.example.system1
'
;
bundle
.
getBundleInfo
(
bundleName
,
1
,
callback
);
function
callback
(
err
,
data
)
{
expect
(
data
.
hapModuleInfo
.
length
).
assertEqual
(
1
);
if
(
data
.
hapModuleInfo
.
length
==
1
)
{
let
hapModuleInfo
=
data
.
hapModuleInfo
[
0
];
expect
(
data
.
hapModuleInfo
s
.
length
).
assertEqual
(
1
);
if
(
data
.
hapModuleInfo
s
.
length
==
1
)
{
let
hapModuleInfo
=
data
.
hapModuleInfo
s
[
0
];
console
.
debug
(
'
=======get hapModule========
'
+
JSON
.
stringify
(
hapModuleInfo
))
console
.
debug
(
'
=======get hapModule mainAbilityName========
'
+
hapModuleInfo
.
mainAbilityName
)
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 () {
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
let
result
=
await
bundle
.
getBundleInfo
(
bundleName
,
1
);
expect
(
result
.
abilityInfo
.
length
).
assertEqual
(
NUM_TWO
);
if
(
result
.
abilityInfo
.
length
==
NUM_TWO
)
{
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
));
expect
(
result
.
abilityInfo
[
0
].
name
).
assertEqual
(
abilityName
);
expect
(
result
.
abilityInfo
[
0
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
[
0
].
srcPath
).
assertEqual
(
''
);
expect
(
result
.
abilityInfo
s
.
length
).
assertEqual
(
NUM_TWO
);
if
(
result
.
abilityInfo
s
.
length
==
NUM_TWO
)
{
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
s
));
expect
(
result
.
abilityInfo
s
[
0
].
name
).
assertEqual
(
abilityName
);
expect
(
result
.
abilityInfo
s
[
0
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
s
[
0
].
srcPath
).
assertEqual
(
''
);
}
installer
.
uninstall
(
bundleName
,
{
userId
:
100
,
...
...
@@ -90,15 +90,15 @@ describe('ActsBmsJsTest', function () {
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
let
result
=
await
bundle
.
getBundleInfo
(
bundleName
,
1
)
console
.
debug
(
'
==========bundleInfo==========
'
+
JSON
.
stringify
(
result
))
expect
(
result
.
abilityInfo
.
length
).
assertEqual
(
NUM_FOUR
);
if
(
result
.
abilityInfo
.
length
==
NUM_FOUR
)
{
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
));
expect
(
result
.
abilityInfo
[
0
].
name
).
assertEqual
(
abilityName1
);
expect
(
result
.
abilityInfo
[
0
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
[
0
].
srcPath
).
assertEqual
(
''
);
expect
(
result
.
abilityInfo
[
1
].
name
).
assertEqual
(
abilityName2
);
expect
(
result
.
abilityInfo
[
1
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
[
1
].
srcPath
).
assertEqual
(
''
);
expect
(
result
.
abilityInfo
s
.
length
).
assertEqual
(
NUM_FOUR
);
if
(
result
.
abilityInfo
s
.
length
==
NUM_FOUR
)
{
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
s
));
expect
(
result
.
abilityInfo
s
[
0
].
name
).
assertEqual
(
abilityName1
);
expect
(
result
.
abilityInfo
s
[
0
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
s
[
0
].
srcPath
).
assertEqual
(
''
);
expect
(
result
.
abilityInfo
s
[
1
].
name
).
assertEqual
(
abilityName2
);
expect
(
result
.
abilityInfo
s
[
1
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
s
[
1
].
srcPath
).
assertEqual
(
''
);
}
installer
.
uninstall
(
bundleName
,
{
userId
:
100
,
...
...
@@ -138,12 +138,12 @@ describe('ActsBmsJsTest', function () {
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
let
result
=
await
bundle
.
getBundleInfo
(
bundleName
,
1
);
expect
(
result
.
abilityInfo
.
length
).
assertEqual
(
1
);
if
(
result
.
abilityInfo
.
length
==
1
)
{
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
));
expect
(
result
.
abilityInfo
[
0
].
name
).
assertEqual
(
abilityName
);
expect
(
result
.
abilityInfo
[
0
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
[
0
].
srcPath
).
assertEqual
(
'
default
'
);
expect
(
result
.
abilityInfo
s
.
length
).
assertEqual
(
1
);
if
(
result
.
abilityInfo
s
.
length
==
1
)
{
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
s
));
expect
(
result
.
abilityInfo
s
[
0
].
name
).
assertEqual
(
abilityName
);
expect
(
result
.
abilityInfo
s
[
0
].
srcLanguage
).
assertEqual
(
'
js
'
);
expect
(
result
.
abilityInfo
s
[
0
].
srcPath
).
assertEqual
(
'
default
'
);
}
installer
.
uninstall
(
bundleName
,
{
userId
:
100
,
...
...
@@ -184,12 +184,12 @@ describe('ActsBmsJsTest', function () {
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
let
result
=
await
bundle
.
getBundleInfo
(
bundleName
,
1
);
expect
(
result
.
abilityInfo
.
length
).
assertEqual
(
1
);
if
(
result
.
abilityInfo
.
length
==
1
)
{
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
));
expect
(
result
.
abilityInfo
[
0
].
name
).
assertEqual
(
abilityName
);
expect
(
result
.
abilityInfo
[
0
].
srcLanguage
).
assertEqual
(
'
c++
'
);
expect
(
result
.
abilityInfo
[
0
].
srcPath
).
assertEqual
(
'
default/c++/
'
);
expect
(
result
.
abilityInfo
s
.
length
).
assertEqual
(
1
);
if
(
result
.
abilityInfo
s
.
length
==
1
)
{
console
.
debug
(
'
========check abilityName ========
'
+
JSON
.
stringify
(
result
.
abilityInfo
s
));
expect
(
result
.
abilityInfo
s
[
0
].
name
).
assertEqual
(
abilityName
);
expect
(
result
.
abilityInfo
s
[
0
].
srcLanguage
).
assertEqual
(
'
c++
'
);
expect
(
result
.
abilityInfo
s
[
0
].
srcPath
).
assertEqual
(
'
default/c++/
'
);
}
installer
.
uninstall
(
bundleName
,
{
userId
:
100
,
...
...
appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/js/test/ExampleJsunit.test.js
浏览文件 @
f417bb2b
...
...
@@ -97,7 +97,7 @@ describe('ActsBundleManagerTest', function () {
expect
(
datainfo
.
compatibleVersion
).
assertEqual
(
5
)
expect
(
datainfo
.
targetVersion
).
assertEqual
(
5
)
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
].
moduleName
).
assertEqual
(
"
entry
"
)
}
...
...
@@ -2426,8 +2426,7 @@ describe('ActsBundleManagerTest', function () {
});
async
function
getInfo
()
{
var
bundleOptions
=
{
userId
:
100
,
networkId
:
""
userId
:
100
};
var
dataInfo
=
await
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
bundleOptions
);
expect
(
dataInfo
.
name
).
assertEqual
(
NAME1
)
...
...
@@ -2450,7 +2449,7 @@ describe('ActsBundleManagerTest', function () {
expect
(
dataInfo
.
compatibleVersion
).
assertEqual
(
5
)
expect
(
dataInfo
.
targetVersion
).
assertEqual
(
5
)
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
].
moduleName
).
assertEqual
(
"
entry
"
)
}
...
...
@@ -2495,8 +2494,7 @@ describe('ActsBundleManagerTest', function () {
});
async
function
getInfo
()
{
var
bundleOptions
=
{
userId
:
100
,
networkId
:
""
userId
:
100
};
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
bundleOptions
,
(
err
,
dataInfo
)
=>
{
expect
(
dataInfo
.
name
).
assertEqual
(
NAME1
)
...
...
@@ -2519,7 +2517,7 @@ describe('ActsBundleManagerTest', function () {
expect
(
dataInfo
.
compatibleVersion
).
assertEqual
(
5
)
expect
(
dataInfo
.
targetVersion
).
assertEqual
(
5
)
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
].
moduleName
).
assertEqual
(
"
entry
"
)
}
...
...
@@ -2565,8 +2563,7 @@ describe('ActsBundleManagerTest', function () {
});
async
function
getInfo
()
{
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
{
userId
:
1
,
networkId
:
""
userId
:
1
}).
then
(
data
=>
{
expect
().
assertFail
();
}).
catch
(
err
=>
{
...
...
@@ -2604,8 +2601,7 @@ describe('ActsBundleManagerTest', function () {
});
async
function
getInfo
()
{
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
{
userId
:
1
,
networkId
:
""
userId
:
1
},
(
err
,
dataInfo
)
=>
{
expect
(
err
).
assertEqual
(
1
);
expect
(
dataInfo
).
assertEqual
(
undefined
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录