Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
7dd65423
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看板
未验证
提交
7dd65423
编写于
9月 16, 2022
作者:
O
openharmony_ci
提交者:
Gitee
9月 16, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5434 【包管理子系统】【master】修改用例名
Merge pull request !5434 from ry/master
上级
99a62067
7a42f9f9
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
446 addition
and
446 deletion
+446
-446
bundlemanager/bundle_standard/bundlemanager/actsbmsaccesstokentest/src/main/js/test/ActsBmsAccessTokenTest.test.js
...tokentest/src/main/js/test/ActsBmsAccessTokenTest.test.js
+24
-24
bundlemanager/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets
...entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets
+103
-103
bundlemanager/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets
...try/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets
+16
-16
bundlemanager/bundle_standard/bundlemanager/actsbmsgetinfostest/src/main/js/test/ActsBmsGetBackGroundModes.test.js
...ostest/src/main/js/test/ActsBmsGetBackGroundModes.test.js
+15
-15
bundlemanager/bundle_standard/bundlemanager/actsbmsgetinfostest/src/main/js/test/ActsBmsQueryAbilityByWant.test.js
...ostest/src/main/js/test/ActsBmsQueryAbilityByWant.test.js
+9
-9
bundlemanager/bundle_standard/bundlemanager/actsbmsjsunpermissiontest/src/main/js/test/ActsBmsJsUnPermissionTest.test.js
...ontest/src/main/js/test/ActsBmsJsUnPermissionTest.test.js
+23
-23
bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByAbility.test.ets
...test/entry/src/main/ets/test/GetProfileByAbility.test.ets
+22
-22
bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByExtensionAbility.test.ets
...y/src/main/ets/test/GetProfileByExtensionAbility.test.ets
+22
-22
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagertest/src/main/js/test/ExampleJsunit.test.js
...sbundlemanagertest/src/main/js/test/ExampleJsunit.test.js
+212
-212
未找到文件。
bundlemanager/bundle_standard/bundlemanager/actsbmsaccesstokentest/src/main/js/test/ActsBmsAccessTokenTest.test.js
浏览文件 @
7dd65423
...
...
@@ -37,11 +37,11 @@ describe('ActsBmsAccessTokenTest', function () {
});
/*
* @tc.number:
bms_AccessTokenId_0100
* @tc.name:
test accessTokenId
* @tc.number:
BMS_SECURITY_INITIALIZE_0004
* @tc.name:
getAccessTokenIdOfEntry
* @tc.desc: get the accessTokenId
*/
it
(
'
bms_AccessTokenId_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
getAccessTokenIdOfEntry
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getApplicationInfo
(
BUNDLE_NAME1
,
bundle
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
userId
)
.
then
(
applicationInfo
=>
{
console
.
info
(
'
accessTokenId:
'
+
applicationInfo
.
accessTokenId
);
...
...
@@ -55,11 +55,11 @@ describe('ActsBmsAccessTokenTest', function () {
});
/*
* @tc.number:
bms_AccessTokenId_0200
* @tc.name:
test reqPermissionStates
* @tc.number:
SUB_BMS_APPINFO_QUERYPERMISSION_0001
* @tc.name:
getReqPermissionOfEntry
* @tc.desc: get the reqPermissions and reqPermissionStates
*/
it
(
'
bms_AccessTokenId_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
getReqPermissionOfEntry
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getBundleInfo
(
BUNDLE_NAME3
,
bundle
.
BundleFlag
.
GET_BUNDLE_WITH_REQUESTED_PERMISSION
)
.
then
(
bundleInfo
=>
{
expect
(
bundleInfo
.
name
).
assertEqual
(
BUNDLE_NAME3
);
...
...
@@ -79,11 +79,11 @@ describe('ActsBmsAccessTokenTest', function () {
});
/*
* @tc.number:
bms_AccessTokenId_0300
* @tc.name:
test reqPermissionStates
* @tc.number:
SUB_BMS_APPINFO_QUERYPERMISSION_0008
* @tc.name:
getReqPermissionUpdateEntry
* @tc.desc: get the reqPermissions and reqPermissionStates
*/
it
(
'
bms_AccessTokenId_0300
'
,
0
,
async
function
(
done
)
{
it
(
'
getReqPermissionUpdateEntry
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getBundleInfo
(
BUNDLE_NAME2
,
bundle
.
BundleFlag
.
GET_BUNDLE_WITH_REQUESTED_PERMISSION
)
.
then
(
bundleInfo
=>
{
expect
(
bundleInfo
.
name
).
assertEqual
(
BUNDLE_NAME2
);
...
...
@@ -107,11 +107,11 @@ describe('ActsBmsAccessTokenTest', function () {
});
/*
* @tc.number:
bms_AccessTokenId_0400
* @tc.name:
test reqPermissionStates
* @tc.number:
SUB_BMS_APPINFO_QUERYPERMISSION_0003
* @tc.name:
getReqPermissionUpdateEntryAndFeature
* @tc.desc: get the reqPermissions and reqPermissionStates
*/
it
(
'
bms_AccessTokenId_0400
'
,
0
,
async
function
(
done
)
{
it
(
'
getReqPermissionUpdateEntryAndFeature
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getBundleInfo
(
BUNDLE_NAME1
,
bundle
.
BundleFlag
.
GET_BUNDLE_WITH_REQUESTED_PERMISSION
)
.
then
(
bundleInfo
=>
{
expect
(
bundleInfo
.
name
).
assertEqual
(
BUNDLE_NAME1
);
...
...
@@ -137,14 +137,14 @@ describe('ActsBmsAccessTokenTest', function () {
});
/**
* @tc.number
bms_AccessTokenId_0500
* @tc.name
BUNDLE::getBundleInfos
* @tc.number
BMS_SECURITY_INITIALIZE_0013
* @tc.name
getAccessTokenIdWithDefault
* @tc.desc Test getBundleInfos interfaces with with a flag
*/
it
(
"
bms_AccessTokenId_0500
"
,
0
,
async
function
(
done
)
{
it
(
"
getAccessTokenIdWithDefault
"
,
0
,
async
function
(
done
)
{
await
bundle
.
getApplicationInfo
(
BUNDLE_NAME1
,
bundle
.
BundleFlag
.
GET_BUNDLE_DEFAULT
)
.
then
((
applicationInfo
)
=>
{
console
.
info
(
"
bms_AccessTokenId_0500
accessTokenId:
"
+
applicationInfo
.
accessTokenId
);
console
.
info
(
"
getAccessTokenIdWithDefault
accessTokenId:
"
+
applicationInfo
.
accessTokenId
);
expect
(
applicationInfo
.
name
).
assertEqual
(
BUNDLE_NAME1
);
expect
(
applicationInfo
.
accessTokenId
).
assertLarger
(
0
);
done
();
...
...
@@ -155,14 +155,14 @@ describe('ActsBmsAccessTokenTest', function () {
});
/**
* @tc.number
bms_AccessTokenId_0600
* @tc.name
BUNDLE::getBundleInfo
s
* @tc.number
BMS_SECURITY_INITIALIZE_0014
* @tc.name
getAccessTokenIdWithGetAbilitie
s
* @tc.desc Test getBundleInfos interfaces with a flag
*/
it
(
"
bms_AccessTokenId_0600
"
,
0
,
async
function
(
done
)
{
it
(
"
getAccessTokenIdWithGetAbilities
"
,
0
,
async
function
(
done
)
{
await
bundle
.
getApplicationInfo
(
BUNDLE_NAME1
,
bundle
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
)
.
then
((
applicationInfo
)
=>
{
console
.
info
(
"
bms_AccessTokenId_0600
accessTokenId:
"
+
applicationInfo
.
accessTokenId
);
console
.
info
(
"
getAccessTokenIdWithGetAbilities
accessTokenId:
"
+
applicationInfo
.
accessTokenId
);
expect
(
applicationInfo
.
name
).
assertEqual
(
BUNDLE_NAME1
);
expect
(
applicationInfo
.
accessTokenId
).
assertLarger
(
0
);
done
();
...
...
@@ -173,14 +173,14 @@ describe('ActsBmsAccessTokenTest', function () {
});
/**
* @tc.number
bms_AccessTokenId_0700
* @tc.name
BUNDLE::getBundleInfos
* @tc.number
BMS_SECURITY_INITIALIZE_0015
* @tc.name
getAccessTokenIdWithGetPermission
* @tc.desc Test getBundleInfos interfaces with a flag
*/
it
(
"
bms_AccessTokenId_0700
"
,
0
,
async
function
(
done
)
{
it
(
"
getAccessTokenIdWithGetPermission
"
,
0
,
async
function
(
done
)
{
await
bundle
.
getApplicationInfo
(
BUNDLE_NAME1
,
bundle
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
)
.
then
((
applicationInfo
)
=>
{
console
.
info
(
"
bms_AccessTokenId_0700
accessTokenId:
"
+
applicationInfo
.
accessTokenId
);
console
.
info
(
"
getAccessTokenIdWithGetPermission
accessTokenId:
"
+
applicationInfo
.
accessTokenId
);
expect
(
applicationInfo
.
name
).
assertEqual
(
BUNDLE_NAME1
);
expect
(
applicationInfo
.
accessTokenId
).
assertLarger
(
0
);
done
();
...
...
bundlemanager/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets
浏览文件 @
7dd65423
...
...
@@ -66,335 +66,335 @@ export default function actsBmsJsModuleNameTest() {
});
/*
* @tc.number:
GetabilityInfo_010
0
* @tc.name:
test getAbilityInfo
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_003
0
* @tc.name:
getAbilityInfoEmptyModule
* @tc.desc: test empty moduleName
*/
it('
GetabilityInfo_0100
', 0, async function (done) {
it('
getAbilityInfoEmptyModule
', 0, async function (done) {
await bundle.getAbilityInfo(BUNDLE_NAME, MODULE_NAME1, ABILITY_NAME)
.then(data => {
expect(data).assertFail();
}).catch((err) => {
console.error('[
GetabilityInfo_0100
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
getAbilityInfoEmptyModule
]Operation failed. Err: ' + JSON.stringify(err));
expect(err).assertEqual(INVALID_CODE);
});
bundle.getAbilityInfo(BUNDLE_NAME, MODULE_NAME1, ABILITY_NAME, (err, data) => {
expect(err).assertEqual(INVALID_CODE);
if (err) {
console.error('[
GetabilityInfo_0100
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
getAbilityInfoEmptyModule
]Operation failed. Err: ' + JSON.stringify(err));
}
console.info("'[
GetabilityInfo_0100
]Return data: " + JSON.stringify(data));
console.info("'[
getAbilityInfoEmptyModule
]Return data: " + JSON.stringify(data));
done();
});
});
/*
* @tc.number:
GetabilityInfo_020
0
* @tc.name:
test getAbilityInfo
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_002
0
* @tc.name:
getAbilityInfoInvalidModule
* @tc.desc: test non-existent moduleName
*/
it('
GetabilityInfo_0200
', 0, async function (done) {
it('
getAbilityInfoInvalidModule
', 0, async function (done) {
await bundle.getAbilityInfo(BUNDLE_NAME, MODULE_NAME2, ABILITY_NAME)
.then(data => {
expect(data).assertFail();
}).catch((err) => {
console.error('[
GetabilityInfo_0200
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
getAbilityInfoInvalidModule
]Operation failed. Err: ' + JSON.stringify(err));
expect(err).assertEqual(INVALID_CODE);
});
bundle.getAbilityInfo(BUNDLE_NAME, MODULE_NAME2, ABILITY_NAME, (err, data) => {
expect(err).assertEqual(INVALID_CODE);
if (err) {
console.error('[
GetabilityInfo_0200
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
getAbilityInfoInvalidModule
]Operation failed. Err: ' + JSON.stringify(err));
}
console.info("'[
GetabilityInfo_0200
]Return data : " + JSON.stringify(data));
console.info("'[
getAbilityInfoInvalidModule
]Return data : " + JSON.stringify(data));
done();
});
});
/*
* @tc.number:
GetabilityInfo_0300
* @tc.name:
test getAbilityInfo
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_0018
* @tc.name:
getAbilityInfoHasModule
* @tc.desc: test existent moduleName
*/
it('
GetabilityInfo_0300
', 0, async function (done) {
it('
getAbilityInfoHasModule
', 0, async function (done) {
await bundle.getAbilityInfo(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME)
.then(data => {
console.info('[
GetabilityInfo_0300
]Return data successful: ' + JSON.stringify(data));
console.info('[
getAbilityInfoHasModule
]Return data successful: ' + JSON.stringify(data));
checkDataInfo(data);
}).catch((err) => {
console.error('[
GetabilityInfo_0300
]Operation . Err: ' + JSON.stringify(err));
console.error('[
getAbilityInfoHasModule
]Operation . Err: ' + JSON.stringify(err));
expect(err).assertFail();
});
bundle.getAbilityInfo(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME, (err, data) => {
checkDataInfo(data);
expect(err).assertEqual(SUCCESS_CODE);
if (err) {
console.error('[
GetabilityInfo_0300
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
getAbilityInfoHasModule
]Operation failed. Err: ' + JSON.stringify(err));
}
console.info("'[
GetabilityInfo_0300
]Return data: " + JSON.stringify(data));
console.info("'[
getAbilityInfoHasModule
]Return data: " + JSON.stringify(data));
done();
});
});
/*
* @tc.number:
GetAbilityIcon_0100
* @tc.name:
test getAbilityIcon
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_0031
* @tc.name:
getAbilityIconEmptyModule
* @tc.desc: test empty moduleName
*/
it('
GetAbilityIcon_0100
', 0, async function (done) {
it('
getAbilityIconEmptyModule
', 0, async function (done) {
await bundle.getAbilityIcon(BUNDLE_NAME, MODULE_NAME1, ABILITY_NAME)
.then(data => {
expect(data).assertFail();
}).catch((err) => {
console.error('[
GetAbilityIcon_0100
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
getAbilityIconEmptyModule
]Operation failed. Err: ' + JSON.stringify(err));
expect(err).assertEqual(INVALID_CODE);
});
bundle.getAbilityIcon(BUNDLE_NAME, MODULE_NAME1, ABILITY_NAME, (err, data) => {
expect(err).assertEqual(INVALID_CODE);
if (err) {
console.error('[
GetAbilityIcon_0100
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
getAbilityIconEmptyModule
]Operation failed. Err: ' + JSON.stringify(err));
}
console.info("'[
GetAbilityIcon_0100
]Return data: " + JSON.stringify(data));
console.info("'[
getAbilityIconEmptyModule
]Return data: " + JSON.stringify(data));
done();
});
});
/*
* @tc.number:
GetAbilityIcon_0200
* @tc.name:
test getAbilityIcon
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_0028
* @tc.name:
getAbilityIconInvalidModule
* @tc.desc: test non-existent moduleName
*/
it('
GetAbilityIcon_0200
', 0, async function (done) {
it('
getAbilityIconInvalidModule
', 0, async function (done) {
await bundle.getAbilityIcon(BUNDLE_NAME, MODULE_NAME2, ABILITY_NAME)
.then(data => {
expect(data).assertFail();
}).catch((err) => {
console.error('[
GetAbilityIcon_0200
]Operation successful. Err: ' + JSON.stringify(err));
console.error('[
getAbilityIconInvalidModule
]Operation successful. Err: ' + JSON.stringify(err));
expect(err).assertEqual(INVALID_CODE);
});
bundle.getAbilityIcon(BUNDLE_NAME, MODULE_NAME2, ABILITY_NAME, (err, data) => {
expect(err).assertEqual(INVALID_CODE);
if (err) {
console.error('[
GetAbilityIcon_0200
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
getAbilityIconInvalidModule
]Operation failed. Err: ' + JSON.stringify(err));
}
console.info("'[
GetAbilityIcon_0200
]Return data: " + JSON.stringify(data));
console.info("'[
getAbilityIconInvalidModule
]Return data: " + JSON.stringify(data));
done();
});
});
/*
* @tc.number:
GetAbilityIcon_0300
* @tc.name:
test getAbilityIcon
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_0026
* @tc.name:
getAbilityIconHasModule
* @tc.desc: test existent moduleName
*/
it('
GetAbilityIcon_0300
', 0, async function (done) {
it('
getAbilityIconHasModule
', 0, async function (done) {
await bundle.getAbilityIcon(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME)
.then(data => {
console.info('[
GetAbilityIcon_0300
]Return data successful: ' + JSON.stringify(data));
console.info('[
getAbilityIconHasModule
]Return data successful: ' + JSON.stringify(data));
expect(data.getBytesNumberPerRow()).assertLarger(0);
}).catch((err) => {
console.error('[
GetAbilityIcon_0300
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
getAbilityIconHasModule
]Operation failed. Err: ' + JSON.stringify(err));
expect(err).assertFail();
});
bundle.getAbilityIcon(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME, (err, data) => {
expect(err).assertEqual(SUCCESS_CODE);
expect(data.getBytesNumberPerRow()).assertLarger(0);
if (err) {
console.error('[
GetAbilityIcon_0300
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
getAbilityIconHasModule
]Operation failed. Err: ' + JSON.stringify(err));
}
console.info("'[
GetAbilityIcon_0300
]Return data: " + JSON.stringify(data));
console.info("'[
getAbilityIconHasModule
]Return data: " + JSON.stringify(data));
done();
});
});
/*
* @tc.number:
GetAbilityLabel_0100
* @tc.name:
test getAbilityLabel
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_0032
* @tc.name:
getAbilityLabelEmptyModule
* @tc.desc: test empty moduleName
*/
it('
GetAbilityLabel_0100
', 0, async function (done) {
it('
getAbilityLabelEmptyModule
', 0, async function (done) {
await bundle.getAbilityLabel(BUNDLE_NAME, MODULE_NAME1, ABILITY_NAME)
.then(data => {
expect(data).assertFail();
}).catch((err) => {
console.error('[
GetAbilityLabel_0100
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
getAbilityLabelEmptyModule
]Operation failed. Err: ' + JSON.stringify(err));
expect(err).assertEqual(INVALID_CODE);
});
bundle.getAbilityLabel(BUNDLE_NAME, MODULE_NAME1, ABILITY_NAME, (err, data) => {
expect(err).assertEqual(INVALID_CODE);
if (err) {
console.error('[
GetAbilityLabel_0100
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
getAbilityLabelEmptyModule
]Operation failed. Err: ' + JSON.stringify(err));
}
console.info("'[
GetAbilityLabel_0100
]Return data: " + JSON.stringify(data));
console.info("'[
getAbilityLabelEmptyModule
]Return data: " + JSON.stringify(data));
done();
});
});
/*
* @tc.number:
GetAbilityLabel_0200
* @tc.name:
test getAbilityLabel
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_0024
* @tc.name:
getAbilityLabelInvalidModule
* @tc.desc: test non-existent moduleName
*/
it('
GetAbilityLabel_0200
', 0, async function (done) {
it('
getAbilityLabelInvalidModule
', 0, async function (done) {
await bundle.getAbilityLabel(BUNDLE_NAME, MODULE_NAME2, ABILITY_NAME)
.then(data => {
expect(data).assertFail();
}).catch((err) => {
console.error('[
GetAbilityLabel_0200
]Operation . Err: ' + JSON.stringify(err));
console.error('[
getAbilityLabelInvalidModule
]Operation . Err: ' + JSON.stringify(err));
expect(err).assertEqual(INVALID_CODE);
});
bundle.getAbilityLabel(BUNDLE_NAME, MODULE_NAME2, ABILITY_NAME, (err, data) => {
expect(err).assertEqual(INVALID_CODE);
if (err) {
console.error('[
GetAbilityLabel_0200
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
getAbilityLabelInvalidModule
]Operation failed. Err: ' + JSON.stringify(err));
}
console.info("'[
GetAbilityLabel_0200
]Return data: " + JSON.stringify(data));
console.info("'[
getAbilityLabelInvalidModule
]Return data: " + JSON.stringify(data));
done();
});
});
/*
* @tc.number:
GetAbilityLabel_0300
* @tc.name:
test getAbilityLabel
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_0022
* @tc.name:
getAbilityLabelHasModule
* @tc.desc: test existent moduleName
*/
it('
GetAbilityLabel_0300
', 0, async function (done) {
it('
getAbilityLabelHasModule
', 0, async function (done) {
await bundle.getAbilityLabel(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME)
.then(data => {
console.info('[
GetAbilityLabel_0300
]Return data successful: ' + JSON.stringify(data));
console.info('[
getAbilityLabelHasModule
]Return data successful: ' + JSON.stringify(data));
expect(data).assertEqual("bmsfirstright");
}).catch((err) => {
console.error('[
GetAbilityLabel_0300
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
getAbilityLabelHasModule
]Operation failed. Err: ' + JSON.stringify(err));
expect(err).assertFail();
});
bundle.getAbilityLabel(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME, (err, data) => {
expect(err).assertNull();
if (err) {
console.error('[
GetAbilityLabel_0300
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
getAbilityLabelHasModule
]Operation failed. Err: ' + JSON.stringify(err));
}
expect(data).assertEqual("bmsfirstright");
console.info("'[
GetAbilityLabel_0300
]Return data: " + JSON.stringify(data));
console.info("'[
getAbilityLabelHasModule
]Return data: " + JSON.stringify(data));
done();
});
});
/*
* @tc.number:
IsAbilityEnabled_010
0
* @tc.name:
test isAbilityEnabled
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_001
0
* @tc.name:
isAbilityEnabledEmptyModule
* @tc.desc: test empty moduleName
*/
it('
IsAbilityEnabled_0100
', 0, async function (done) {
it('
isAbilityEnabledEmptyModule
', 0, async function (done) {
let abilityInfo = generateAbilityInfoForTest(ABILITY_INFO_ONE.bundleName, ABILITY_INFO_ONE.name, ABILITY_INFO_ONE.moduleName);
await bundle.isAbilityEnabled(abilityInfo)
.then(data => {
console.info('[
IsAbilityEnabled_0100
]Return data successful: ' + JSON.stringify(data));
console.info('[
isAbilityEnabledEmptyModule
]Return data successful: ' + JSON.stringify(data));
expect(data).assertTrue();
}).catch((err) => {
console.error('[
IsAbilityEnabled_0100
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
isAbilityEnabledEmptyModule
]Operation failed. Err: ' + JSON.stringify(err));
expect(err).assertFail();
});
bundle.isAbilityEnabled(abilityInfo, (err, data) => {
expect(err).assertEqual(SUCCESS_CODE);
if (err) {
console.error('[
IsAbilityEnabled_0100
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
isAbilityEnabledEmptyModule
]Operation failed. Err: ' + JSON.stringify(err));
}
expect(data).assertTrue();
console.info("'[
IsAbilityEnabled_0100
]Return data: " + JSON.stringify(data));
console.info("'[
isAbilityEnabledEmptyModule
]Return data: " + JSON.stringify(data));
done();
});
});
/*
* @tc.number:
IsAbilityEnabled_0200
* @tc.name:
test isAbilityEnabled
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_0011
* @tc.name:
isAbilityEnabledInvalidModule
* @tc.desc: test non-existent moduleName
*/
it('
IsAbilityEnabled_0200
', 0, async function (done) {
it('
isAbilityEnabledInvalidModule
', 0, async function (done) {
let abilityInfo = generateAbilityInfoForTest(ABILITY_INFO_TWO.bundleName, ABILITY_INFO_TWO.name, ABILITY_INFO_TWO.moduleName);
await bundle.isAbilityEnabled(abilityInfo)
.then(data => {
expect(data).assertEqual(false);
}).catch((err) => {
console.error('[
IsAbilityEnabled_0200
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
isAbilityEnabledInvalidModule
]Operation failed. Err: ' + JSON.stringify(err));
expect(err).assertFail();
});
bundle.isAbilityEnabled(abilityInfo, (err, data) => {
expect(data).assertEqual(false);
if (err) {
console.error('[
IsAbilityEnabled_0200
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
isAbilityEnabledInvalidModule
]Operation failed. Err: ' + JSON.stringify(err));
}
expect(err).assertEqual(SUCCESS_CODE);
console.info("'[
IsAbilityEnabled_0200
]Return data: " + JSON.stringify(data));
console.info("'[
isAbilityEnabledInvalidModule
]Return data: " + JSON.stringify(data));
done();
});
});
/*
* @tc.number:
IsAbilityEnabled_0300
* @tc.name:
test isAbilityEnabled
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_0008
* @tc.name:
isAbilityEnabledHasModule
* @tc.desc: test existent moduleName
*/
it('
IsAbilityEnabled_0300
', 0, async function (done) {
it('
isAbilityEnabledHasModule
', 0, async function (done) {
let abilityInfo = generateAbilityInfoForTest(ABILITY_INFO_THREE.bundleName, ABILITY_INFO_THREE.name, ABILITY_INFO_THREE.moduleName);
await bundle.isAbilityEnabled(abilityInfo)
.then(data => {
console.info('[
IsAbilityEnabled_0300
]Return data successful: ' + JSON.stringify(data));
console.info('[
isAbilityEnabledHasModule
]Return data successful: ' + JSON.stringify(data));
expect(data).assertTrue();
}).catch((err) => {
console.error('[
IsAbilityEnabled_0300
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
isAbilityEnabledHasModule
]Operation failed. Err: ' + JSON.stringify(err));
expect(err).assertFail();
});
bundle.isAbilityEnabled(abilityInfo, (err, data) => {
expect(err).assertEqual(SUCCESS_CODE);
if (err) {
console.error('[
IsAbilityEnabled_0300
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
isAbilityEnabledHasModule
]Operation failed. Err: ' + JSON.stringify(err));
}
expect(data).assertTrue();
console.info("'[
IsAbilityEnabled_0300
]Return data: " + JSON.stringify(data));
console.info("'[
isAbilityEnabledHasModule
]Return data: " + JSON.stringify(data));
done();
});
});
/*
* @tc.number:
IsAbilityEnabled_0400
* @tc.name:
test isAbilityEnabled
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_0012
* @tc.name:
isAbilityEnabledUndefinedModule
* @tc.desc: test empty moduleName
*/
it('
IsAbilityEnabled_0400
', 0, async function (done) {
it('
isAbilityEnabledUndefinedModule
', 0, async function (done) {
let abilityInfo = generateAbilityInfoForTest(ABILITY_INFO_FOUR.bundleName, ABILITY_INFO_FOUR.name, ABILITY_INFO_FOUR.moduleName);
await bundle.isAbilityEnabled(abilityInfo)
.then(data => {
expect(data).assertFail();
}).catch((err) => {
console.error('[
IsAbilityEnabled_0400
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
isAbilityEnabledUndefinedModule
]Operation failed. Err: ' + JSON.stringify(err));
expect(err).assertEqual(INVALID_PARAM);
});
bundle.isAbilityEnabled(abilityInfo, (err, data) => {
expect(data).assertEqual(undefined);
if (err) {
console.error('[
IsAbilityEnabled_0400
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
isAbilityEnabledUndefinedModule
]Operation failed. Err: ' + JSON.stringify(err));
}
expect(err).assertEqual(INVALID_PARAM);
console.info("'[
IsAbilityEnabled_0400
]Return data: " + JSON.stringify(data));
console.info("'[
isAbilityEnabledUndefinedModule
]Return data: " + JSON.stringify(data));
done();
});
});
/*
* @tc.number:
QueryAbilityByWant_0100
* @tc.name:
test queryAbilityByWant
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_0033
* @tc.name:
queryAbilityByWantEmptyModule
* @tc.desc: test empty moduleName
*/
it('
QueryAbilityByWant_0100
', 0, async function (done) {
it('
queryAbilityByWantEmptyModule
', 0, async function (done) {
await bundle.queryAbilityByWant({
bundleName: BUNDLE_NAME,
abilityName: ABILITY_NAME,
moduleName: MODULE_NAME1
}, DEFAULT_FLAG, userId).then(data => {
checkDataInfo(data[0]);
console.info("'[
QueryAbilityByWant_0100
]Return data : " + JSON.stringify(data));
console.info("'[
queryAbilityByWantEmptyModule
]Return data : " + JSON.stringify(data));
}).catch(err => {
console.info("[
QueryAbilityByWant_0100
]Operation failed. Err: " + JSON.stringify(err));
console.info("[
queryAbilityByWantEmptyModule
]Operation failed. Err: " + JSON.stringify(err));
expect(err).assertFail();
});
bundle.queryAbilityByWant({
...
...
@@ -404,20 +404,20 @@ export default function actsBmsJsModuleNameTest() {
}, DEFAULT_FLAG, userId, (err, data) => {
expect(err).assertEqual(SUCCESS_CODE);
if (err) {
console.error('[
QueryAbilityByWant_0100
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
queryAbilityByWantEmptyModule
]Operation failed. Err: ' + JSON.stringify(err));
}
checkDataInfo(data[0]);
console.info("'[
QueryAbilityByWant_0100
]Return data : " + JSON.stringify(data));
console.info("'[
queryAbilityByWantEmptyModule
]Return data : " + JSON.stringify(data));
done();
});
});
/*
* @tc.number:
QueryAbilityByWant_0200
* @tc.name:
test queryAbilityByWant
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_0002
* @tc.name:
queryAbilityByWantInvalidModule
* @tc.desc: test non-existent moduleName
*/
it('
QueryAbilityByWant_0200
', 0, async function (done) {
it('
queryAbilityByWantInvalidModule
', 0, async function (done) {
await bundle.queryAbilityByWant({
bundleName: BUNDLE_NAME,
abilityName: ABILITY_NAME,
...
...
@@ -425,7 +425,7 @@ export default function actsBmsJsModuleNameTest() {
}, DEFAULT_FLAG, userId).then(data => {
expect(data).assertFail();
}).catch(err => {
console.error('[
QueryAbilityByWant_0200
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
queryAbilityByWantInvalidModule
]Operation failed. Err: ' + JSON.stringify(err));
expect(err).assertEqual(INVALID_CODE);
});
bundle.queryAbilityByWant({
...
...
@@ -433,29 +433,29 @@ export default function actsBmsJsModuleNameTest() {
abilityName: ABILITY_NAME,
moduleName: MODULE_NAME2
}, DEFAULT_FLAG, userId, (err, data) => {
console.info("'[
QueryAbilityByWant_0200
]Return data " + JSON.stringify(data));
console.info("'[
queryAbilityByWantInvalidModule
]Return data " + JSON.stringify(data));
expect(data).assertEqual("QueryAbilityInfos failed");
console.error('[
QueryAbilityByWant_0200
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
queryAbilityByWantInvalidModule
]Operation failed. Err: ' + JSON.stringify(err));
expect(err).assertEqual(INVALID_CODE);
done();
});
});
/*
* @tc.number:
QueryAbilityByWant_0300
* @tc.name:
test queryAbilityByWant
* @tc.number:
SUB_BMS_APPINFO_QUERYMODULE_0001
* @tc.name:
queryAbilityByWantHasModule
* @tc.desc: test existent moduleName
*/
it('
QueryAbilityByWant_0300
', 0, async function (done) {
it('
queryAbilityByWantHasModule
', 0, async function (done) {
await bundle.queryAbilityByWant({
bundleName: BUNDLE_NAME,
abilityName: ABILITY_NAME,
moduleName: MODULE_NAME3
}, DEFAULT_FLAG, userId).then(data => {
checkDataInfo(data[0]);
console.info("'[
QueryAbilityByWant_0300
]Return data : " + JSON.stringify(data));
console.info("'[
queryAbilityByWantHasModule
]Return data : " + JSON.stringify(data));
}).catch(err => {
console.info("[
QueryAbilityByWant_0300
]Operation failed. Err: " + JSON.stringify(err));
console.info("[
queryAbilityByWantHasModule
]Operation failed. Err: " + JSON.stringify(err));
expect(err).assertFail();
});
bundle.queryAbilityByWant({
...
...
@@ -465,10 +465,10 @@ export default function actsBmsJsModuleNameTest() {
}, DEFAULT_FLAG, userId, (err, data) => {
expect(err).assertEqual(SUCCESS_CODE);
if (err) {
console.error('[
QueryAbilityByWant_0300
]Operation failed. Err: ' + JSON.stringify(err));
console.error('[
queryAbilityByWantHasModule
]Operation failed. Err: ' + JSON.stringify(err));
}
checkDataInfo(data[0]);
console.info("'[
QueryAbilityByWant_0300
]Return data : " + JSON.stringify(data));
console.info("'[
queryAbilityByWantHasModule
]Return data : " + JSON.stringify(data));
done();
});
});
...
...
bundlemanager/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets
浏览文件 @
7dd65423
...
...
@@ -44,10 +44,10 @@ export default function actsBmsJsUnPermissionTest() {
/**
* @tc.number getApplicationInfos_1300
* @tc.name getApplicationInfos
_1300
* @tc.name getApplicationInfos
UnPermission
* @tc.desc test getAllApplicationInfo
*/
it
(
'getApplicationInfos
_1300
'
,
0
,
async
function
(
done
)
{
it
(
'getApplicationInfos
UnPermission
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
)
.
then
(
data
=>
{
expect
()
.
assertFail
();
})
.
catch
(
err
=>
{
...
...
@@ -62,10 +62,10 @@ export default function actsBmsJsUnPermissionTest() {
/**
* @tc.number getBundleInfo_2000
* @tc.name getBundleInfo
_2000
* @tc.name getBundleInfo
UnPermission
* @tc.desc test getBundleInfo
*/
it
(
'getBundleInfo
_2000
'
,
0
,
async
function
(
done
)
{
it
(
'getBundleInfo
UnPermission
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getBundleInfo
(
BUNDLE_NAME_OTHER
,
DEFAULT_FLAG
,
{
userId
:
userId
})
.
then
(
data
=>
{
expect
()
.
assertFail
();
})
.
catch
(
err
=>
{
...
...
@@ -80,10 +80,10 @@ export default function actsBmsJsUnPermissionTest() {
/**
* @tc.number getApplicationInfo_1800
* @tc.name getApplicationInfo
_1800
* @tc.name getApplicationInfo
UnPermission
* @tc.desc test getApplicationInfo
*/
it
(
'getApplicationInfo
_1800
'
,
0
,
async
function
(
done
)
{
it
(
'getApplicationInfo
UnPermission
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getApplicationInfo
(
BUNDLE_NAME_OTHER
,
DEFAULT_FLAG
)
.
then
(
data
=>
{
expect
()
.
assertFail
();
})
.
catch
(
err
=>
{
...
...
@@ -98,10 +98,10 @@ export default function actsBmsJsUnPermissionTest() {
/*
* @tc.number: SUB_BMS_HAP_STATUS_0011
* @tc.name:
test hasInstalled
* @tc.name:
hasInstalledUnPermissionSelf
* @tc.desc: test hasInstalled without permission
*/
it
(
'
SUB_BMS_HAP_STATUS_0011
'
,
0
,
async
function
(
done
)
{
it
(
'
hasInstalledUnPermissionSelf
'
,
0
,
async
function
(
done
)
{
let
flag
=
0
;
pkg
.
hasInstalled
({
bundleName
:
SELF_BUNDLENAME
,
...
...
@@ -124,10 +124,10 @@ export default function actsBmsJsUnPermissionTest() {
/*
* @tc.number: SUB_BMS_HAP_STATUS_0012
* @tc.name:
test hasInstalled
* @tc.name:
hasInstalledUnPermissionOther
* @tc.desc: test hasInstalled without permission
*/
it
(
'
SUB_BMS_HAP_STATUS_0012
'
,
0
,
async
function
(
done
)
{
it
(
'
hasInstalledUnPermissionOther
'
,
0
,
async
function
(
done
)
{
let
flag
=
0
;
pkg
.
hasInstalled
({
bundleName
:
BUNDLE_NAME_OTHER
,
...
...
@@ -150,10 +150,10 @@ export default function actsBmsJsUnPermissionTest() {
/*
* @tc.number: SUB_BMS_APPINFO_GETABILITYICON_0006
* @tc.name:
test getAbilityIc
on
* @tc.name:
getAbilityIconUnPermissi
on
* @tc.desc: test getAbilityIcon without permission
*/
it
(
'
SUB_BMS_APPINFO_GETABILITYICON_0006
'
,
0
,
async
function
(
done
)
{
it
(
'
getAbilityIconUnPermission
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getAbilityIcon
(
BUNDLE_NAME_OTHER
,
ABILITIY_NAME_OTHER
)
.
then
(
pixelmap
=>
{
expect
(
pixelmap
)
.
assertFail
();
})
.
catch
(
err
=>
{
...
...
@@ -166,8 +166,8 @@ export default function actsBmsJsUnPermissionTest() {
});
/*
* @tc.number:
getAbilityInfo_100
* @tc.name:
test getAbilityInfo
* @tc.number:
SUB_BMS_APPINFO_GETABILITYINFO_0008
* @tc.name:
getAbilityInfoUnPermissionSelf
* @tc.desc: test getAbilityInfo
*/
it
(
'getAbilityInfo_200'
,
0
,
async
function
(
done
)
{
...
...
@@ -199,10 +199,10 @@ export default function actsBmsJsUnPermissionTest() {
/*
* @tc.number: SUB_BMS_APPINFO_EXTENSION_0019
* @tc.name:
test queryExtensionAbilityInfos api
* @tc.name:
queryExtensionAbilityInfosUnPermission
* @tc.desc: test queryExtensionAbilityInfos no permission
*/
it
(
'
SUB_BMS_APPINFO_EXTENSION_0019
'
,
0
,
async
function
(
done
)
{
it
(
'
queryExtensionAbilityInfosUnPermission
'
,
0
,
async
function
(
done
)
{
await
bundle
.
queryExtensionAbilityInfos
(
{
"bundleName"
:
BUNDLE_NAME1
,
...
...
bundlemanager/bundle_standard/bundlemanager/actsbmsgetinfostest/src/main/js/test/ActsBmsGetBackGroundModes.test.js
浏览文件 @
7dd65423
...
...
@@ -58,11 +58,11 @@ describe('ActsBmsGetBackGroundModes', function () {
});
/*
* @tc.number:
bms_backGroundModes_0100
* @tc.name:
Get the backgroundModes information of the application through queryAbilityByWant
* @tc.number:
SUB_BMS_APPINFO_QUERY_0085
* @tc.name:
getBackgroundModesMultiAbility
* @tc.desc: Get the information of the background modes from multi-ability application
*/
it
(
'
bms_backGroundModes_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
getBackgroundModesMultiAbility
'
,
0
,
async
function
(
done
)
{
let
dataInfos
=
await
bundle
.
queryAbilityByWant
({
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
],
...
...
@@ -100,12 +100,12 @@ describe('ActsBmsGetBackGroundModes', function () {
});
/*
* @tc.number:
bms_backGroundModes_0200
* @tc.name:
Get the backgroundModes information of the application through queryAbilityByWant
* @tc.number:
SUB_BMS_APPINFO_QUERY_0086
* @tc.name:
getBackgroundModesAllModes
* @tc.desc: Get all background modes information, and each ability of the application
* contains one of the background mode
*/
it
(
'
bms_backGroundModes_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
getBackgroundModesAllModes
'
,
0
,
async
function
(
done
)
{
let
dataInfos
=
await
bundle
.
queryAbilityByWant
({
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
],
...
...
@@ -121,11 +121,11 @@ describe('ActsBmsGetBackGroundModes', function () {
});
/*
* @tc.number:
bms_backGroundModes_0300
* @tc.name:
Get the backgroundModes information of the application through queryAbilityByWant
* @tc.number:
SUB_BMS_APPINFO_QUERY_0087
* @tc.name:
getBackgroundModesInvalidModes
* @tc.desc: Read the backgroundModes information of the app's ability and replace invalid attributes
*/
it
(
'
bms_backGroundModes_0300
'
,
0
,
async
function
(
done
)
{
it
(
'
getBackgroundModesInvalidModes
'
,
0
,
async
function
(
done
)
{
let
dataInfos
=
await
bundle
.
queryAbilityByWant
({
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
],
...
...
@@ -160,11 +160,11 @@ describe('ActsBmsGetBackGroundModes', function () {
});
/*
* @tc.number:
bms_backGroundModes_0400
* @tc.name:
Get the backgroundModes information of the application through queryAbilityByWant
* @tc.number:
SUB_BMS_APPINFO_QUERY_0088
* @tc.name:
getBackgroundModesNotModes
* @tc.desc: Read the backgroundModes information of the app's ability and replace invalid attributes
*/
it
(
'
bms_backGroundModes_0400
'
,
0
,
async
function
(
done
)
{
it
(
'
getBackgroundModesNotModes
'
,
0
,
async
function
(
done
)
{
let
dataInfos
=
await
bundle
.
queryAbilityByWant
({
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
],
...
...
@@ -181,11 +181,11 @@ describe('ActsBmsGetBackGroundModes', function () {
});
/*
* @tc.number:
bms_backGroundModes_0500
* @tc.name:
Get the backgroundModes information of the application through queryAbilityByWant
* @tc.number:
SUB_BMS_APPINFO_QUERY_0089
* @tc.name:
getBackgroundModesMultiHap
* @tc.desc: Get the backgroundModes information of the multi-hap package of the application
*/
it
(
'
bms_backGroundModes_0500
'
,
0
,
async
function
(
done
)
{
it
(
'
getBackgroundModesMultiHap
'
,
0
,
async
function
(
done
)
{
let
dataInfos
=
await
bundle
.
queryAbilityByWant
({
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
],
...
...
bundlemanager/bundle_standard/bundlemanager/actsbmsgetinfostest/src/main/js/test/ActsBmsQueryAbilityByWant.test.js
浏览文件 @
7dd65423
...
...
@@ -38,12 +38,12 @@ describe('ActsBmsQueryAbilityByWant', function () {
});
/*
* @tc.number:
bms_queryAbilityByWant_0100
* @tc.name:
queryAbilityByWant callback by other callback
* @tc.number:
SUB_BMS_APPINFO_QUERYSYS_0008
* @tc.name:
queryAbilityByWantThirdApp
* @tc.desc: 1.queryAbilityByWant callback
* 2.queryAbilityByWant for third app
*/
it
(
'
bms_queryAbilityByWant_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
queryAbilityByWantThirdApp
'
,
0
,
async
function
(
done
)
{
await
bundle
.
queryAbilityByWant
({
action
:
ACTION_NAME
,
entities
:
[
ENTITY_NAME
],
...
...
@@ -67,12 +67,12 @@ describe('ActsBmsQueryAbilityByWant', function () {
});
/*
* @tc.number:
bms_queryAbilityByWant_0200
* @tc.name:
queryAbilityByWant callback by other callback
* @tc.number:
SUB_BMS_APPINFO_QUERYSYS_0007
* @tc.name:
queryAbilityByWantSystemApp
* @tc.desc: 1.queryAbilityByWant callback
* 2.queryAbilityByWant for systemapp
*/
it
(
'
bms_queryAbilityByWant_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
queryAbilityByWantSystemApp
'
,
0
,
async
function
(
done
)
{
await
bundle
.
queryAbilityByWant
(
{
action
:
ACTION_NAME
,
...
...
@@ -107,11 +107,11 @@ describe('ActsBmsQueryAbilityByWant', function () {
});
/*
* @tc.number:
bms_queryAbilityByEntities_0300
* @tc.name:
Use the implicit query method in queryAbilityByWant to get abilityInfos
* @tc.number:
SUB_BMS_APPINFO_QUERY_0084
* @tc.name:
queryAbilityByWantImplicitByEntities
* @tc.desc: The entities in the parameter want pass in the new field, and use the implicit query to get abilitInfos
*/
it
(
'
bms_queryAbilityByEntities_0300
'
,
0
,
async
function
(
done
)
{
it
(
'
queryAbilityByWantImplicitByEntities
'
,
0
,
async
function
(
done
)
{
let
dataInfos
=
await
bundle
.
queryAbilityByWant
({
action
:
ACTION_NAME
,
entities
:
[
"
entity.app.music
"
,
...
...
bundlemanager/bundle_standard/bundlemanager/actsbmsjsunpermissiontest/src/main/js/test/ActsBmsJsUnPermissionTest.test.js
浏览文件 @
7dd65423
...
...
@@ -38,11 +38,11 @@ describe('ActsBmsJsUnPermissionTest', function () {
});
/*
* @tc.number: getApplicationInfo
Test_1
00
* @tc.name:
test getApplicationInfo
* @tc.number: getApplicationInfo
_19
00
* @tc.name:
getApplicationInfoUnPermissionUserId
* @tc.desc: test getApplicationInfo
*/
it
(
'
getApplicationInfo
Test_100
'
,
0
,
async
function
(
done
)
{
it
(
'
getApplicationInfo
UnPermissionUserId
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getApplicationInfo
(
LAUNCHER_BUNDLE_NAME
,
DEFAULT_FLAG
,
userId
).
then
(
data
=>
{
expect
().
assertFail
();
}).
catch
(
err
=>
{
...
...
@@ -56,11 +56,11 @@ describe('ActsBmsJsUnPermissionTest', function () {
});
/*
* @tc.number: getA
llApplicationInfoTest_1
00
* @tc.name:
test getAllApplicationInfo
* @tc.number: getA
pplicationInfos_15
00
* @tc.name:
getApplicationInfosUnPermissionUserId
* @tc.desc: test getAllApplicationInfo
*/
it
(
'
getA
llApplicationInfoTest_100
'
,
0
,
async
function
(
done
)
{
it
(
'
getA
pplicationInfosUnPermissionUserId
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
,
userId
).
then
(
data
=>
{
expect
().
assertFail
();
}).
catch
(
err
=>
{
...
...
@@ -74,11 +74,11 @@ describe('ActsBmsJsUnPermissionTest', function () {
});
/*
* @tc.number: getBundleInfo
Test_1
00
* @tc.name:
test getBundleInfo
* @tc.number: getBundleInfo
_23
00
* @tc.name:
getBundleInfoUnPermissionUserId
* @tc.desc: test getBundleInfo
*/
it
(
'
getBundleInfo
Test_100
'
,
0
,
async
function
(
done
)
{
it
(
'
getBundleInfo
UnPermissionUserId
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getBundleInfo
(
LAUNCHER_BUNDLE_NAME
,
userId
).
then
(
data
=>
{
expect
().
assertFail
();
}).
catch
(
err
=>
{
...
...
@@ -92,11 +92,11 @@ describe('ActsBmsJsUnPermissionTest', function () {
});
/*
* @tc.number: get
AllBundleInfoTest_1
00
* @tc.name:
test getAllBundleInfo
* @tc.number: get
BundleInfos_10
00
* @tc.name:
getAllBundleInfoUnPermission
* @tc.desc: test getAllBundleInfo
*/
it
(
'
getAllBundleInfo
Test_100
'
,
0
,
async
function
(
done
)
{
it
(
'
getAllBundleInfo
UnPermission
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getAllBundleInfo
(
DEFAULT_FLAG
).
then
(
data
=>
{
expect
().
assertFail
();
}).
catch
(
err
=>
{
...
...
@@ -110,11 +110,11 @@ describe('ActsBmsJsUnPermissionTest', function () {
});
/*
* @tc.number:
queryAbilityByWantTest_100
* @tc.name:
test queryAbilityByWant
* @tc.number:
SUB_BMS_APPINFO_QUERY_0015
* @tc.name:
queryAbilityByWantUnPermission
* @tc.desc: test queryAbilityByWant
*/
it
(
'
queryAbilityByWant
Test_100
'
,
0
,
async
function
(
done
)
{
it
(
'
queryAbilityByWant
UnPermission
'
,
0
,
async
function
(
done
)
{
await
bundle
.
queryAbilityByWant
({
bundleName
:
LAUNCHER_BUNDLE_NAME
,
abilityName
:
LAUNCHER_MAIN_ABILITY
...
...
@@ -135,11 +135,11 @@ describe('ActsBmsJsUnPermissionTest', function () {
});
/*
* @tc.number:
getLaunchWantForBundleTest_10
0
* @tc.name:
test getLaunchWantForBundle
* @tc.number:
SUB_BMS_APPINFO_QUERY_001
0
* @tc.name:
getLaunchWantForBundleUnPermission
* @tc.desc: test getLaunchWantForBundle
*/
it
(
'
getLaunchWantForBundle
Test_100
'
,
0
,
async
function
(
done
)
{
it
(
'
getLaunchWantForBundle
UnPermission
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getLaunchWantForBundle
(
LAUNCHER_BUNDLE_NAME
).
then
(
data
=>
{
expect
().
assertFail
();
}).
catch
(
err
=>
{
...
...
@@ -153,12 +153,12 @@ describe('ActsBmsJsUnPermissionTest', function () {
});
/*
* @tc.number:
getAbilityLabelTest_100
* @tc.name: getAbilityLabel
: Gets the specified ability label
* @tc.number:
SUB_BMS_APPINFO_GETABILITYLABELP_0006
* @tc.name: getAbilityLabel
UnPermission
* @tc.desc: Check the return value of the interface
* @tc.level 0
*/
it
(
'
getAbilityLabel
Test_100
'
,
0
,
async
function
(
done
)
{
it
(
'
getAbilityLabel
UnPermission
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getAbilityLabel
(
LAUNCHER_BUNDLE_NAME
,
LAUNCHER_MAIN_ABILITY
)
.
then
((
data
)
=>
{
expect
().
assertFail
();
...
...
@@ -174,8 +174,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
});
/*
* @tc.number:
getAbilityInfo_100
* @tc.name:
test getAbilityInfo
* @tc.number:
SUB_BMS_APPINFO_GETABILITYINFO_0006
* @tc.name:
getAbilityInfoUnPermission
* @tc.desc: test getAbilityInfo
*/
it
(
'
getAbilityInfo_100
'
,
0
,
async
function
(
done
)
{
...
...
bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByAbility.test.ets
浏览文件 @
7dd65423
...
...
@@ -32,7 +32,7 @@ const PROFILE_JSON_STRING = "{\"src\":[\"MainAbility/pages/index/index\",\"MainA
export default function getProfileByAbility() {
describe('getProfileByAbility', function () {
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
2
1
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
1
1
* @tc.name: getProfileByAbilityInvalidModulePro
* @tc.desc: Check the invalid moduleName (by promise)
* @tc.level 0
...
...
@@ -50,7 +50,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
31
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
15
* @tc.name: getProfileByAbilityEmptyModulePro
* @tc.desc: Check the empty moduleName (by promise)
* @tc.level 0
...
...
@@ -68,7 +68,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
28
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
17
* @tc.name: getProfileByAbilityInvalidModuleCall
* @tc.desc: Check the invalid moduleName (by callback)
* @tc.level 0
...
...
@@ -87,7 +87,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_003
7
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_003
4
* @tc.name: getProfileByAbilityEmptyModuleCall
* @tc.desc: Check the empty moduleName (by callback)
* @tc.level 0
...
...
@@ -106,7 +106,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_001
3
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_001
2
* @tc.name: getProfileByAbilityInvalidAbilityPro
* @tc.desc: Check the invalid abilityName (by promise)
* @tc.level 0
...
...
@@ -124,7 +124,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
32
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
29
* @tc.name: getProfileByAbilityEmptyAbilityPro
* @tc.desc: Check the empty abilityName (by promise)
* @tc.level 0
...
...
@@ -142,7 +142,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_002
3
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_002
2
* @tc.name: getProfileByAbilityInvalidAbilityCall
* @tc.desc: Check the invalid abilityName (by callback)
* @tc.level 0
...
...
@@ -161,7 +161,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
38
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
29
* @tc.name: getProfileByAbilityEmptyAbilityCall
* @tc.desc: Check the empty abilityName (by callback)
* @tc.level 0
...
...
@@ -180,7 +180,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_002
5
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_002
4
* @tc.name: getProfileByAbilityCallback
* @tc.desc: Check the valid metadataName (by callback)
* @tc.level 0
...
...
@@ -200,7 +200,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_002
7
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_002
6
* @tc.name: getProfileByAbilityInvalidMetaDataCall
* @tc.desc: Check the invalid metadataName (by callback)
* @tc.level 0
...
...
@@ -219,7 +219,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_003
9
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_003
6
* @tc.name: getProfileByAbilityEmptyMetaDataCall
* @tc.desc: Check the empty metadataName (by callback)
* @tc.level 0
...
...
@@ -241,7 +241,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_000
3
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_000
2
* @tc.name: getProfileByAbilityPromise
* @tc.desc: Check the valid metadataName (by promise)
* @tc.level 0
...
...
@@ -261,7 +261,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
16
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
04
* @tc.name: getProfileByAbilityInvalidMetaDataPro
* @tc.desc: Check the invalid metadataName (by promise)
* @tc.level 0
...
...
@@ -279,7 +279,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_003
3
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_003
0
* @tc.name: getProfileByAbilityEmptyMetaDataPro
* @tc.desc: Check the empty metadataName (by promise)
* @tc.level 0
...
...
@@ -301,7 +301,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
10
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
09
* @tc.name: getProfileByAbilityNoMetaDataPro
* @tc.desc: without metadataName (by promise)
* @tc.level 0
...
...
@@ -323,7 +323,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
9
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
8
* @tc.name: getProfileByAbilityNoProfilePro
* @tc.desc: no profile configured under the ability (by promise)
* @tc.level 0
...
...
@@ -341,7 +341,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
3
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
5
* @tc.name: getProfileByAbilityNotPrefixPro
* @tc.desc: resource has no prefix '$profile:' (by promise)
* @tc.level 0
...
...
@@ -359,7 +359,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
2
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
4
* @tc.name: getProfileByAbilityNotPrefixCall
* @tc.desc: resource has no prefix '$profile:' (by callback)
* @tc.level 0
...
...
@@ -378,7 +378,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
19
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
07
* @tc.name: getProfileByAbilityNotSuffixPro
* @tc.desc: profile is .txt suffix (by promise)
* @tc.level 0
...
...
@@ -397,7 +397,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
1
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
0
* @tc.name: getProfileByAbilityNotSuffixCall
* @tc.desc: profile is .txt suffix (by callback)
* @tc.level 0
...
...
@@ -416,7 +416,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
20
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
08
* @tc.name: getProfileByAbilityNoJsonPro
* @tc.desc: profile is invalid json format (by promise)
* @tc.level 0
...
...
@@ -434,7 +434,7 @@ export default function getProfileByAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
7
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
6
* @tc.name: getProfileByAbilityNoJsonCall
* @tc.desc: profile is invalid json format (by callback)
* @tc.level 0
...
...
bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByExtensionAbility.test.ets
浏览文件 @
7dd65423
...
...
@@ -32,7 +32,7 @@ const PROFILE_JSON_STRING = "{\"src\":[\"MainAbility/pages/index/index\",\"MainA
export default function getProfileByExtensionAbility() {
describe('getProfileByExtensionAbility', function () {
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
1
1
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
2
1
* @tc.name: getProfileByExtensionInvalidModulePro
* @tc.desc: Check the invalid moduleName (by promise)
* @tc.level 0
...
...
@@ -50,7 +50,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
15
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
31
* @tc.name: getProfileByExtensionEmptyModulePro
* @tc.desc: Check the Empty moduleName (by promise)
* @tc.level 0
...
...
@@ -68,7 +68,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
17
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
28
* @tc.name: getProfileByExtensionEmptyModuleCall
* @tc.desc: Check the invalid moduleName (by callback)
* @tc.level 0
...
...
@@ -87,7 +87,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_003
4
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_003
7
* @tc.name: getProfileByExtensionEmptyModuleCall
* @tc.desc: Check the Empty moduleName (by callback)
* @tc.level 0
...
...
@@ -106,7 +106,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_001
2
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_001
3
* @tc.name: getProfileByExtensionInvalidAbilityPro
* @tc.desc: Check the invalid abilityName (by promise)
* @tc.level 0
...
...
@@ -124,7 +124,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
29
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
32
* @tc.name: getProfileByExtensionEmptyAbilityPro
* @tc.desc: Check the Empty abilityName (by promise)
* @tc.level 0
...
...
@@ -142,7 +142,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_002
2
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_002
3
* @tc.name: getProfileByExtensionInvalidAbilityCall
* @tc.desc: Check the invalid abilityName (by callback)
* @tc.level 0
...
...
@@ -161,7 +161,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_003
5
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_003
8
* @tc.name: getProfileByExtensionEmptyAbilityCall
* @tc.desc: Check the Empty abilityName (by callback)
* @tc.level 0
...
...
@@ -180,7 +180,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_002
4
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_002
5
* @tc.name: getProfileByExtensionAbilityCallback
* @tc.desc: Check the valid metadataName (by callback)
* @tc.level 0
...
...
@@ -200,7 +200,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_002
6
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_002
7
* @tc.name: getProfileByExtensionInvalidMetaDataCall
* @tc.desc: Check the invalid metadataName (by callback)
* @tc.level 0
...
...
@@ -219,7 +219,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_003
6
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_003
9
* @tc.name: getProfileByExtensionEmptyMetaDataCall
* @tc.desc: Check the empty metadataName (by callback)
* @tc.level 0
...
...
@@ -241,7 +241,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_000
2
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_000
3
* @tc.name: getProfileByExtensionAbilityPromise
* @tc.desc: Check the valid metadataName (by promise)
* @tc.level 0
...
...
@@ -261,7 +261,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
04
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
16
* @tc.name: getProfileByExtensionInvalidMetaDataPro
* @tc.desc: Check the invalid metadataName (by promise)
* @tc.level 0
...
...
@@ -279,7 +279,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_003
0
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_003
3
* @tc.name: getProfileByExtensionEmptyMetaDataPro
* @tc.desc: Check the empty metadataName (by promise)
* @tc.level 0
...
...
@@ -301,7 +301,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
09
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
10
* @tc.name: getProfileByExtensionAbilityNoMetaDataPro
* @tc.desc: without metadataName (by promise)
* @tc.level 0
...
...
@@ -323,7 +323,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
8
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
9
* @tc.name: getProfileByExtensionAbilityNoProfilePro
* @tc.desc: no profile configured under the ability (by promise)
* @tc.level 0
...
...
@@ -341,7 +341,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
5
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
3
* @tc.name: getProfileByExtensionNotPrefixPro
* @tc.desc: resource has no prefix '$profile:' (by promise)
* @tc.level 0
...
...
@@ -359,7 +359,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
4
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
2
* @tc.name: getProfileByExtensionNotPrefixCall
* @tc.desc: resource has no prefix '$profile:' (by callback)
* @tc.level 0
...
...
@@ -378,7 +378,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
07
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
19
* @tc.name: getProfileByExtensionNotSuffixPro
* @tc.desc: profile is .txt suffix (by promise)
* @tc.level 0
...
...
@@ -397,7 +397,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
0
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
1
* @tc.name: getProfileByExtensionNotSuffixCall
* @tc.desc: profile is .txt suffix (by callback)
* @tc.level 0
...
...
@@ -416,7 +416,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
08
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_00
20
* @tc.name: getProfileByExtensionNoJsonPro
* @tc.desc: profile is invalid json format (by promise)
* @tc.level 0
...
...
@@ -434,7 +434,7 @@ export default function getProfileByExtensionAbility() {
})
/*
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
6
* @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_004
7
* @tc.name: getProfileByExtensionNoJsonCall
* @tc.desc: profile is invalid json format (by callback)
* @tc.level 0
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagertest/src/main/js/test/ExampleJsunit.test.js
浏览文件 @
7dd65423
...
...
@@ -49,10 +49,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getBundleInfo_0100
* @tc.name
BUNDLEMGR::getBundleInfo
* @tc.name
testGetBundleInfoReqPermissionPromise
* @tc.desc Test getBundleInfo interfaces with one hap.(by promise)
*/
it
(
'
getBundleInfo_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoReqPermissionPromise
'
,
0
,
async
function
(
done
)
{
let
datainfo
=
await
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
|
demo
.
BundleFlag
.
GET_BUNDLE_WITH_REQUESTED_PERMISSION
);
expect
(
datainfo
.
name
).
assertEqual
(
NAME1
);
...
...
@@ -103,11 +103,11 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number getBundleInfo_0
2
00
* @tc.name
BUNDLEMGR::getBundleInfo
* @tc.number getBundleInfo_0
6
00
* @tc.name
testGetBundeInfoReqPermissionCallback
* @tc.desc Test getBundleInfo interfaces with one hap.(by callback)
*/
it
(
'
getBundleInfo_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundeInfoReqPermissionCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
|
demo
.
BundleFlag
.
GET_BUNDLE_WITH_REQUESTED_PERMISSION
,
OnReceiveEvent
);
...
...
@@ -118,7 +118,7 @@ describe('ActsBundleManagerTest', function () {
})
function
checkBundleInfo0200
(
datainfo
)
{
console
.
info
(
"
getBundleInfo_0200
dataInfo ====
"
+
datainfo
);
console
.
info
(
"
testGetBundeInfoReqPermissionCallback
dataInfo ====
"
+
datainfo
);
expect
(
datainfo
.
name
).
assertEqual
(
NAME1
);
expect
(
datainfo
.
vendor
).
assertEqual
(
"
example
"
);
expect
(
datainfo
.
versionCode
).
assertEqual
(
VERSIONCODE1
);
...
...
@@ -166,13 +166,13 @@ describe('ActsBundleManagerTest', function () {
}
/**
* @tc.number getBundleInfo_0
3
00
* @tc.name
BUNDLE::getBundleInfo
* @tc.number getBundleInfo_0
2
00
* @tc.name
testGetBundleInfoMultiHapPromise
* @tc.desc Test getBundleInfo interfaces with two haps.(by promise)
*/
it
(
'
getBundleInfo_0300
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoMultiHapPromise
'
,
0
,
async
function
(
done
)
{
let
datainfo
=
await
demo
.
getBundleInfo
(
NAME2
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
);
console
.
info
(
"
getBundleInfo_0300
dataInfo ====
"
+
datainfo
);
console
.
info
(
"
testGetBundleInfoMultiHapPromise
dataInfo ====
"
+
datainfo
);
expect
(
datainfo
.
name
).
assertEqual
(
NAME2
);
expect
(
datainfo
.
vendor
).
assertEqual
(
"
example
"
);
expect
(
datainfo
.
versionCode
).
assertEqual
(
1
);
...
...
@@ -190,14 +190,14 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number getBundleInfo_0
4
00
* @tc.name
BUNDLE::getBundleInfo
* @tc.number getBundleInfo_0
7
00
* @tc.name
testGetBundleInfoMultiHapCallback
* @tc.desc Test getBundleInfo interfaces with two haps.(by callback)
*/
it
(
'
getBundleInfo_0400
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoMultiHapCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getBundleInfo
(
NAME2
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
OnReceiveEvent
);
function
OnReceiveEvent
(
err
,
datainfo
)
{
console
.
info
(
"
getBundleInfo_0400
dataInfo ====
"
+
datainfo
);
console
.
info
(
"
testGetBundleInfoMultiHapCallback
dataInfo ====
"
+
datainfo
);
expect
(
datainfo
.
name
).
assertEqual
(
NAME2
);
expect
(
datainfo
.
vendor
).
assertEqual
(
"
example
"
);
expect
(
datainfo
.
versionCode
).
assertEqual
(
1
);
...
...
@@ -216,13 +216,13 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number getBundleInfo_0
5
00
* @tc.name
BUNDLE::getBundleInfo
* @tc.number getBundleInfo_0
3
00
* @tc.name
testGetBundleInfoPromise
* @tc.desc Test getBundleInfo interfaces with one hap. (by promise)
*/
it
(
'
getBundleInfo_0500
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoPromise
'
,
0
,
async
function
(
done
)
{
let
datainfo
=
await
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
);
console
.
info
(
"
getBundleInfo_0500
dataInfo ====
"
+
datainfo
);
console
.
info
(
"
testGetBundleInfoPromise
dataInfo ====
"
+
datainfo
);
expect
(
datainfo
.
name
).
assertEqual
(
NAME1
);
expect
(
datainfo
.
vendor
).
assertEqual
(
"
example
"
);
expect
(
datainfo
.
versionCode
).
assertEqual
(
VERSIONCODE1
);
...
...
@@ -259,15 +259,15 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number getBundleInfo_0
6
00
* @tc.name
BUNDLE::getBundleInfo
* @tc.number getBundleInfo_0
8
00
* @tc.name
testGetBundleInfoCallback
* @tc.desc Test getBundleInfo interfaces with one hap. (by callback)
*/
it
(
'
getBundleInfo_0600
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
|
demo
.
BundleFlag
.
GET_ABILITY_INFO_WITH_DISABLE
,
OnReceiveEvent
);
function
OnReceiveEvent
(
err
,
datainfo
)
{
console
.
info
(
"
getBundleInfo_0600
dataInfo ====
"
+
datainfo
);
console
.
info
(
"
testGetBundleInfoCallback
dataInfo ====
"
+
datainfo
);
expect
(
datainfo
.
name
).
assertEqual
(
NAME1
);
expect
(
datainfo
.
vendor
).
assertEqual
(
"
example
"
);
expect
(
datainfo
.
versionCode
).
assertEqual
(
VERSIONCODE1
);
...
...
@@ -305,54 +305,54 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number getBundleInfo_0
7
00
* @tc.name
BUNDLE::getBundleInfo
* @tc.number getBundleInfo_0
4
00
* @tc.name
testGetBundleInfoNotExistPromise
* @tc.desc Test getBundleInfo interfaces with error hap. (by promise)
*/
it
(
'
getBundleInfo_0700
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoNotExistPromise
'
,
0
,
async
function
(
done
)
{
await
demo
.
getBundleInfo
(
'
error
'
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
).
then
(
datainfo
=>
{
console
.
info
(
"
getBundleInfo_0700
success:
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetBundleInfoNotExistPromise
success:
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
).
assertFail
();
done
();
}).
catch
(
err
=>
{
console
.
info
(
"
getBundleInfo_0700
err:
"
+
JSON
.
stringify
(
err
));
console
.
info
(
"
testGetBundleInfoNotExistPromise
err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
1
);
done
();
});
})
/**
* @tc.number getBundleInfo_0
8
00
* @tc.name
BUNDLE::getBundleInfo
* @tc.number getBundleInfo_0
9
00
* @tc.name
testGetBundleInfoNotExistCallback
* @tc.desc Test getBundleInfo interfaces with error hap. (by callback)
*/
it
(
'
getBundleInfo_0800
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoNotExistCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getBundleInfo
(
'
error
'
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
OnReceiveEvent
);
function
OnReceiveEvent
(
err
,
datainfo
)
{
if
(
err
)
{
console
.
info
(
"
getBundleInfo_0800
err
"
+
JSON
.
stringify
(
err
));
console
.
info
(
"
testGetBundleInfoNotExistCallback
err
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
1
);
done
();
return
;
}
console
.
info
(
"
getBundleInfo_0800
success
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetBundleInfoNotExistCallback
success
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
).
assertFail
();
done
();
}
})
/**
* @tc.number getBundleInfo_0
9
00
* @tc.name
BUNDLE::getBundleInfo
* @tc.number getBundleInfo_0
5
00
* @tc.name
testGetBundleInfoInvalidParamPromise
* @tc.desc Test getBundleInfo interfaces with none hap. (by promise)
*/
it
(
'
getBundleInfo_0900
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoInvalidParamPromise
'
,
0
,
async
function
(
done
)
{
await
demo
.
getBundleInfo
(
'
'
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
).
then
(
datainfo
=>
{
console
.
info
(
"
getBundleInfo_0900
success
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetBundleInfoInvalidParamPromise
success
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
).
assertFail
();
done
();
}).
catch
(
err
=>
{
console
.
info
(
"
getBundleInfo_0900
fail
"
+
JSON
.
stringify
(
err
));
console
.
info
(
"
testGetBundleInfoInvalidParamPromise
fail
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
1
);
done
();
});
...
...
@@ -360,19 +360,19 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getBundleInfo_1000
* @tc.name
BUNDLE::getBundleInfo
* @tc.name
testGetBundleInfoInvalidParamCallback
* @tc.desc Test getBundleInfo interfaces with none hap. (by callback)
*/
it
(
'
getBundleInfo_1000
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoInvalidParamCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getBundleInfo
(
'
'
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
OnReceiveEvent
);
function
OnReceiveEvent
(
err
,
datainfo
)
{
if
(
err
)
{
console
.
info
(
"
getBundleInfo_1000
err
"
+
JSON
.
stringify
(
err
));
console
.
info
(
"
testGetBundleInfoInvalidParamCallback
err
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
1
);
done
();
return
;
}
console
.
info
(
"
getBundleInfo_1000
success
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetBundleInfoInvalidParamCallback
success
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
).
assertFail
();
done
();
}
...
...
@@ -380,12 +380,12 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getBundleInfo_1100
* @tc.name
BUNDLE::getBundleInfo
* @tc.name
testGetBundleInfoDifferentParamPromise
* @tc.desc Test getBundleInfo interfaces with one hap and different param. (by promise)
*/
it
(
'
getBundleInfo_1100
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoDifferentParamPromise
'
,
0
,
async
function
(
done
)
{
let
datainfo
=
await
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
)
console
.
info
(
"
getBundleInfo_1100
dataInfo ====
"
+
datainfo
);
console
.
info
(
"
testGetBundleInfoDifferentParamPromise
dataInfo ====
"
+
datainfo
);
expect
(
datainfo
.
name
).
assertEqual
(
NAME1
);
expect
(
datainfo
.
vendor
).
assertEqual
(
"
example
"
);
expect
(
datainfo
.
versionCode
).
assertEqual
(
VERSIONCODE1
);
...
...
@@ -406,13 +406,13 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getBundleInfo_1200
* @tc.name
BUNDLE::getBundleInfo
* @tc.name
testGetBundleInfoDifferentParamCallback
* @tc.desc Test getBundleInfo interfaces with one hap and different param. (by callback)
*/
it
(
'
getBundleInfo_1200
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoDifferentParamCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
OnReceiveEvent
)
function
OnReceiveEvent
(
err
,
datainfo
)
{
console
.
info
(
"
getBundleInfo_1200
dataInfo ====
"
+
datainfo
);
console
.
info
(
"
testGetBundleInfoDifferentParamCallback
dataInfo ====
"
+
datainfo
);
expect
(
datainfo
.
name
).
assertEqual
(
NAME1
);
expect
(
datainfo
.
vendor
).
assertEqual
(
"
example
"
);
expect
(
datainfo
.
versionCode
).
assertEqual
(
VERSIONCODE1
);
...
...
@@ -437,23 +437,23 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number getBundleInfo_1
4
00
* @tc.name
BUNDLE::getBundleInfo
* @tc.number getBundleInfo_1
3
00
* @tc.name
testGetBundleInfoSystemAppCallback
* @tc.desc Test getBundleInfo interfaces with systemApp.(by callback)
*/
it
(
'
getBundleInfo_1400
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoSystemAppCallback
'
,
0
,
async
function
(
done
)
{
let
bundleOptions
=
{
userId
:
userId
};
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
bundleOptions
,
(
err
,
datainfo
)
=>
{
if
(
err
)
{
console
.
info
(
"
getBundleInfo_1400
fail:
"
+
JSON
.
stringify
(
err
));
console
.
info
(
"
testGetBundleInfoSystemAppCallback
fail:
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertFail
();
done
();
return
;
}
console
.
info
(
"
getBundleInfo_1400
success:
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetBundleInfoSystemAppCallback
success:
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
.
name
).
assertEqual
(
NAME1
);
expect
(
datainfo
.
vendor
).
assertEqual
(
"
example
"
);
expect
(
datainfo
.
versionCode
).
assertEqual
(
1
);
...
...
@@ -469,17 +469,17 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number getBundleInfo_1
5
00
* @tc.name
BUNDLEMGR::getBundleInfo
* @tc.number getBundleInfo_1
4
00
* @tc.name
testGetBundleInfoCurrentUserIdPromise
* @tc.desc Test getBundleInfo interface with current userId (by promise).
*/
it
(
'
getBundleInfo_1500
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoCurrentUserIdPromise
'
,
0
,
async
function
(
done
)
{
let
bundleOptions
=
{
userId
:
userId
};
let
dataInfo
=
await
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
bundleOptions
);
console
.
info
(
"
getBundleInfo_1500
start --------
"
);
console
.
info
(
"
getBundleInfo_1500
dataInfo ====
"
+
dataInfo
);
console
.
info
(
"
testGetBundleInfoCurrentUserIdPromise
start --------
"
);
console
.
info
(
"
testGetBundleInfoCurrentUserIdPromise
dataInfo ====
"
+
dataInfo
);
expect
(
dataInfo
.
name
).
assertEqual
(
NAME1
);
expect
(
dataInfo
.
vendor
).
assertEqual
(
"
example
"
);
expect
(
dataInfo
.
versionCode
).
assertEqual
(
VERSIONCODE1
);
...
...
@@ -513,22 +513,22 @@ describe('ActsBundleManagerTest', function () {
expect
(
dataInfo
.
appInfo
.
moduleInfos
[
j
].
moduleSourceDir
).
assertEqual
(
DIR1
);
}
expect
(
dataInfo
.
appInfo
.
enabled
).
assertEqual
(
true
);
console
.
info
(
"
getBundleInfo_1500
end --------
"
);
console
.
info
(
"
testGetBundleInfoCurrentUserIdPromise
end --------
"
);
done
();
})
/**
* @tc.number getBundleInfo_1
6
00
* @tc.name
BUNDLE::getBundleInfo
* @tc.number getBundleInfo_1
5
00
* @tc.name
testGetBundleInfoCurrentUserIdCallback
* @tc.desc Test getBundleInfo interface with current userId (by callback).
*/
it
(
'
getBundleInfo_1600
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoCurrentUserIdCallback
'
,
0
,
async
function
(
done
)
{
let
bundleOptions
=
{
userId
:
userId
};
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
bundleOptions
,
(
err
,
dataInfo
)
=>
{
console
.
info
(
"
getBundleInfo_1600
start --------
"
);
console
.
info
(
"
getBundleInfo_1600
dataInfo ====
"
+
dataInfo
);
console
.
info
(
"
testGetBundleInfoCurrentUserIdCallback
start --------
"
);
console
.
info
(
"
testGetBundleInfoCurrentUserIdCallback
dataInfo ====
"
+
dataInfo
);
expect
(
dataInfo
.
name
).
assertEqual
(
NAME1
);
expect
(
dataInfo
.
vendor
).
assertEqual
(
"
example
"
);
expect
(
dataInfo
.
versionCode
).
assertEqual
(
VERSIONCODE1
);
...
...
@@ -561,46 +561,46 @@ describe('ActsBundleManagerTest', function () {
expect
(
dataInfo
.
appInfo
.
moduleInfos
[
j
].
moduleName
).
assertEqual
(
"
entry
"
);
expect
(
dataInfo
.
appInfo
.
moduleInfos
[
j
].
moduleSourceDir
).
assertEqual
(
DIR1
);
}
console
.
info
(
"
getBundleInfo_1600
end --------
"
);
console
.
info
(
"
testGetBundleInfoCurrentUserIdCallback
end --------
"
);
done
();
});
})
/**
* @tc.number getBundleInfo_
17
00
* @tc.name
BUNDLEMGR::getBundleInfo
* @tc.number getBundleInfo_
21
00
* @tc.name
testGetBundleInfoOtherUserIdPromise
* @tc.desc Test getBundleInfo interface with other userId (by promise).
*/
it
(
'
getBundleInfo_1700
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoOtherUserIdPromise
'
,
0
,
async
function
(
done
)
{
await
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
{
userId
:
1
}).
then
(
data
=>
{
console
.
info
(
"
getBundleInfo_1700
success
"
+
JSON
.
stringify
(
data
));
console
.
info
(
"
testGetBundleInfoOtherUserIdPromise
success
"
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
();
done
();
}).
catch
(
err
=>
{
console
.
info
(
"
getBundleInfo_1700
err
"
+
JSON
.
stringify
(
err
));
console
.
info
(
"
testGetBundleInfoOtherUserIdPromise
err
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
1
);
done
();
});
})
/**
* @tc.number getBundleInfo_
18
00
* @tc.name
BUNDLE::getBundleInfo
* @tc.number getBundleInfo_
22
00
* @tc.name
testGetBundleInfoOtherUserIdCallback
* @tc.desc Test getBundleInfo interface with other userId (by callback).
*/
it
(
'
getBundleInfo_1800
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetBundleInfoOtherUserIdCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getBundleInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
{
userId
:
1
},
(
err
,
dataInfo
)
=>
{
if
(
err
)
{
console
.
info
(
"
getBundleInfo_1800
err
"
+
JSON
.
stringify
(
err
));
console
.
info
(
"
testGetBundleInfoOtherUserIdCallback
err
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
1
);
done
();
return
;
}
console
.
info
(
"
getBundleInfo_1800
success
"
+
JSON
.
stringify
(
dataInfo
));
console
.
info
(
"
testGetBundleInfoOtherUserIdCallback
success
"
+
JSON
.
stringify
(
dataInfo
));
expect
(
dataInfo
).
assertFail
();
done
();
});
...
...
@@ -608,10 +608,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getApplicationInfos_0100
* @tc.name
BUNDLE::getApplicationInfos
* @tc.name
testGetAllApplicationInfoPromise
* @tc.desc Test getApplicationInfos interfaces with one hap.
*/
it
(
'
getApplicationInfos_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllApplicationInfoPromise
'
,
0
,
async
function
(
done
)
{
let
datainfo
=
await
demo
.
getAllApplicationInfo
(
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
);
checkgetApplicationInfos
(
datainfo
);
done
();
...
...
@@ -645,10 +645,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getApplicationInfos_0600
* @tc.name
BUNDLE::getApplicationInfos
* @tc.name
testGetAllApplicationInfoCallback
* @tc.desc Test getApplicationInfos interfaces with one hap.
*/
it
(
'
getApplicationInfos_0600
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllApplicationInfoCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getAllApplicationInfo
(
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
,
(
error
,
datainfo
)
=>
{
expect
(
datainfo
.
length
).
assertLarger
(
0
);
...
...
@@ -668,10 +668,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getBundleInfos_0100
* @tc.name
BUNDLE::getBundleInfos
* @tc.name
testGetAllBundleInfoPromise
* @tc.desc Test getBundleInfos interfaces with one hap.
*/
it
(
'
getBundleInfos_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllBundleInfoPromise
'
,
0
,
async
function
(
done
)
{
let
data
=
await
demo
.
getAllBundleInfo
(
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
);
expect
(
typeof
data
).
assertEqual
(
OBJECT
);
expect
(
data
.
length
).
assertLarger
(
0
);
...
...
@@ -692,10 +692,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getApplicationInfo_0100
* @tc.name
BUNDLE::getApplicationInfo
* @tc.name
testGetApplicationInfoMetaDataPromise
* @tc.desc Test getApplicationInfo interfaces with one hap. (by promise)
*/
it
(
'
getApplicationInfo_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoMetaDataPromise
'
,
0
,
async
function
(
done
)
{
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
|
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_METADATA
,
userId
).
then
(
datainfo
=>
{
...
...
@@ -731,22 +731,22 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number getApplicationInfo_0
2
00
* @tc.name
BUNDLE::getApplicationInfo
* @tc.number getApplicationInfo_0
6
00
* @tc.name
testGetApplicationInfoMetaDataCallback
* @tc.desc Test getApplicationInfo interfaces with one hap. (by callback)
*/
it
(
'
getApplicationInfo_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoMetaDataCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
|
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_METADATA
,
userId
,
(
error
,
datainfo
)
=>
{
if
(
error
)
{
console
.
info
(
"
getApplicationInfo_0200
fail:
"
+
JSON
.
stringify
(
error
));
console
.
info
(
"
testGetApplicationInfoMetaDataCallback
fail:
"
+
JSON
.
stringify
(
error
));
expect
(
error
).
assertFail
();
done
();
return
;
}
expect
(
typeof
datainfo
).
assertEqual
(
OBJECT
);
console
.
info
(
"
getApplicationInfo_0200
success:
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetApplicationInfoMetaDataCallback
success:
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
.
moduleSourceDirs
.
length
).
assertLarger
(
0
);
expect
(
datainfo
.
moduleInfos
.
length
).
assertLarger
(
0
);
expect
(
datainfo
.
name
).
assertEqual
(
NAME1
);
...
...
@@ -773,14 +773,14 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number getApplicationInfo_0
3
00
* @tc.name
BUNDLE::getApplicationInfo
* @tc.number getApplicationInfo_0
2
00
* @tc.name
testGetApplicationInfoTwoHapPromise
* @tc.desc Test getApplicationInfo interfaces with two haps. (by promise)
*/
it
(
'
getApplicationInfo_0300
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoTwoHapPromise
'
,
0
,
async
function
(
done
)
{
let
datainfo
=
await
demo
.
getApplicationInfo
(
NAME2
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
);
console
.
info
(
"
getApplicationInfo_0300
result
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetApplicationInfoTwoHapPromise
result
"
+
JSON
.
stringify
(
datainfo
));
expect
(
typeof
datainfo
).
assertEqual
(
OBJECT
);
expect
(
datainfo
.
name
.
length
).
assertLarger
(
0
);
expect
(
datainfo
.
description
.
length
).
assertLarger
(
0
);
...
...
@@ -810,14 +810,14 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number getApplicationInfo_0
4
00
* @tc.name
BUNDLE::getApplicationInfo
* @tc.number getApplicationInfo_0
7
00
* @tc.name
testGetApplicationInfoTwoHapCallback
* @tc.desc Test getApplicationInfo interfaces with two haps. (by callback)
*/
it
(
'
getApplicationInfo_0400
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoTwoHapCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getApplicationInfo
(
NAME2
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
,
(
error
,
datainfo
)
=>
{
console
.
info
(
"
getApplicationInfo_0400
result
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetApplicationInfoTwoHapCallback
result
"
+
JSON
.
stringify
(
datainfo
));
expect
(
typeof
datainfo
).
assertEqual
(
OBJECT
);
expect
(
datainfo
.
name
.
length
).
assertLarger
(
0
);
expect
(
datainfo
.
description
.
length
).
assertLarger
(
0
);
...
...
@@ -848,14 +848,14 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number getApplicationInfo_0
5
00
* @tc.name
BUNDLE::getApplicationInfo
* @tc.number getApplicationInfo_0
3
00
* @tc.name
testGetApplicationInfoThereHapPromise
* @tc.desc Test getApplicationInfo interfaces with three haps. (by promise)
*/
it
(
'
getApplicationInfo_0500
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoThereHapPromise
'
,
0
,
async
function
(
done
)
{
let
datainfo
=
await
demo
.
getApplicationInfo
(
NAME3
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
);
console
.
info
(
"
getApplicationInfo_0500
result
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetApplicationInfoThereHapPromise
result
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
.
name
).
assertEqual
(
NAME3
);
expect
(
datainfo
.
label
).
assertEqual
(
"
$string:app_name
"
);
expect
(
datainfo
.
icon
).
assertEqual
(
"
$media:icon
"
);
...
...
@@ -872,14 +872,14 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number getApplicationInfo_
06
00
* @tc.name
BUNDLE::getApplicationInfo
* @tc.number getApplicationInfo_
20
00
* @tc.name
testGetApplicationInfoThereHapCallback
* @tc.desc Test getApplicationInfo interfaces with three haps. (by callback)
*/
it
(
'
getApplicationInfo_0600
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoThereHapCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getApplicationInfo
(
NAME3
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
,
(
error
,
datainfo
)
=>
{
console
.
info
(
"
getApplicationInfo_0600
result
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetApplicationInfoThereHapCallback
result
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
.
name
).
assertEqual
(
NAME3
);
expect
(
datainfo
.
label
).
assertEqual
(
"
$string:app_name
"
);
expect
(
datainfo
.
icon
).
assertEqual
(
"
$media:icon
"
);
...
...
@@ -897,56 +897,56 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number getApplicationInfo_0
7
00
* @tc.name
BUNDLE::getApplicationInfo
* @tc.number getApplicationInfo_0
4
00
* @tc.name
testGetApplicationInfoNotExistCallback
* @tc.desc Test getApplicationInfo interfaces with error hap. (by promise)
*/
it
(
'
getApplicationInfo_0700
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoNotExistCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getApplicationInfo
(
ERROR
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
).
then
(
datainfo
=>
{
console
.
info
(
"
getApplicationInfo_0700
success
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetApplicationInfoNotExistCallback
success
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
).
assertFail
();
done
();
}).
catch
(
err
=>
{
console
.
info
(
"
getApplicationInfo_0700
err
"
+
JSON
.
stringify
(
err
));
console
.
info
(
"
testGetApplicationInfoNotExistCallback
err
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertEqual
(
1
);
done
();
});
})
/**
* @tc.number getApplicationInfo_0
8
00
* @tc.name
BUNDLE::getApplicationInfo
* @tc.number getApplicationInfo_0
9
00
* @tc.name
testGetApplicationInfoNotExistPromise
* @tc.desc Test getApplicationInfo interfaces with error hap. (by callback)
*/
it
(
'
getApplicationInfo_0800
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoNotExistPromise
'
,
0
,
async
function
(
done
)
{
await
demo
.
getApplicationInfo
(
ERROR
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
,
(
error
,
datainfo
)
=>
{
if
(
error
)
{
console
.
info
(
"
getApplicationInfo_0800
fail
"
+
JSON
.
stringify
(
error
));
console
.
info
(
"
testGetApplicationInfoNotExistPromise
fail
"
+
JSON
.
stringify
(
error
));
expect
(
error
).
assertEqual
(
1
);
done
();
return
;
}
console
.
info
(
"
getApplicationInfo_0800
success
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetApplicationInfoNotExistPromise
success
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
).
assertFail
();
done
();
})
})
/**
* @tc.number getApplicationInfo_0
9
00
* @tc.name
BUNDLE::getApplicationInfo
* @tc.number getApplicationInfo_0
5
00
* @tc.name
testGetApplicationInfoInvalidParamPromise
* @tc.desc Test getApplicationInfo interfaces with none hap. (by promise)
*/
it
(
'
getApplicationInfo_0900
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoInvalidParamPromise
'
,
0
,
async
function
(
done
)
{
await
demo
.
getApplicationInfo
(
''
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
).
then
(
datainfo
=>
{
console
.
info
(
"
getApplicationInfo_0900
success
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetApplicationInfoInvalidParamPromise
success
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
).
assertFail
();
done
();
}).
catch
(
error
=>
{
console
.
info
(
"
getApplicationInfo_0900
err
"
+
JSON
.
stringify
(
error
));
console
.
info
(
"
testGetApplicationInfoInvalidParamPromise
err
"
+
JSON
.
stringify
(
error
));
expect
(
error
).
assertEqual
(
1
);
done
();
});
...
...
@@ -954,19 +954,19 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getApplicationInfo_1000
* @tc.name
BUNDLE::getApplicationInfo
* @tc.name
testGetApplicationInfoInvalidParamCallback
* @tc.desc Test getApplicationInfo interfaces with none hap. (by callback)
*/
it
(
'
getApplicationInfo_1000
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoInvalidParamCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getApplicationInfo
(
''
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
,
(
error
,
datainfo
)
=>
{
if
(
error
)
{
console
.
info
(
"
getApplicationInfo_1000
fail
"
+
JSON
.
stringify
(
error
));
console
.
info
(
"
testGetApplicationInfoInvalidParamCallback
fail
"
+
JSON
.
stringify
(
error
));
expect
(
error
).
assertEqual
(
1
);
done
();
return
;
}
console
.
info
(
"
getApplicationInfo_1000
success
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetApplicationInfoInvalidParamCallback
success
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
).
assertFail
();
done
();
});
...
...
@@ -974,10 +974,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getApplicationInfo_1100
* @tc.name
BUNDLE::getApplicationInfo
* @tc.name
testGetApplicationInfoDifferentParamPromise
* @tc.desc Test getApplicationInfo interfaces with one hap and different param. (by promise)
*/
it
(
'
getApplicationInfo_1100
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoDifferentParamPromise
'
,
0
,
async
function
(
done
)
{
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
userId
).
then
(
datainfo
=>
{
console
.
info
(
"
getApplicationInfo_1100 success
"
+
JSON
.
stringify
(
datainfo
));
expect
(
typeof
datainfo
).
assertEqual
(
OBJECT
);
...
...
@@ -992,7 +992,7 @@ describe('ActsBundleManagerTest', function () {
expect
(
datainfo
.
supportedModes
).
assertEqual
(
0
);
done
();
}).
catch
(
err
=>
{
console
.
info
(
"
getApplicationInfo_1100
fail
"
+
JSON
.
stringify
(
err
));
console
.
info
(
"
testGetApplicationInfoDifferentParamPromise
fail
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertFail
();
done
();
})
...
...
@@ -1000,18 +1000,18 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getApplicationInfo_1200
* @tc.name
BUNDLE::getApplicationInfo
* @tc.name
testGetApplicationInfoDifferentParamCallback
* @tc.desc Test getApplicationInfo interfaces with one hap and different param. (by callback)
*/
it
(
'
getApplicationInfo_1200
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoDifferentParamCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
userId
,
(
error
,
datainfo
)
=>
{
if
(
error
)
{
console
.
info
(
"
getApplicationInfo_1200
fail
"
+
JSON
.
stringify
(
error
));
console
.
info
(
"
testGetApplicationInfoDifferentParamCallback
fail
"
+
JSON
.
stringify
(
error
));
expect
(
error
).
assertFail
();
done
();
return
;
}
console
.
info
(
"
getApplicationInfo_1200
success
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetApplicationInfoDifferentParamCallback
success
"
+
JSON
.
stringify
(
datainfo
));
expect
(
typeof
datainfo
).
assertEqual
(
OBJECT
);
expect
(
datainfo
.
name
).
assertEqual
(
NAME1
);
expect
(
datainfo
.
label
).
assertEqual
(
"
$string:app_name
"
);
...
...
@@ -1028,13 +1028,13 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getApplicationInfo_1300
* @tc.name
BUNDLE::getApplicationInfo
* @tc.name
testGetApplicationInfoPromise
* @tc.desc Test getApplicationInfo interfaces with one hap. (by promise)
*/
it
(
'
getApplicationInfo_1300
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoPromise
'
,
0
,
async
function
(
done
)
{
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
).
then
(
datainfo
=>
{
console
.
info
(
"
getApplicationInfo_1300
success:
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetApplicationInfoPromise
success:
"
+
JSON
.
stringify
(
datainfo
));
expect
(
typeof
datainfo
).
assertEqual
(
OBJECT
);
expect
(
datainfo
.
name
).
assertEqual
(
NAME1
);
expect
(
datainfo
.
label
).
assertEqual
(
"
$string:app_name
"
);
...
...
@@ -1052,7 +1052,7 @@ describe('ActsBundleManagerTest', function () {
}
done
();
}).
catch
(
error
=>
{
console
.
info
(
"
getApplicationInfo_1300
fail:
"
+
JSON
.
stringify
(
error
));
console
.
info
(
"
testGetApplicationInfoPromise
fail:
"
+
JSON
.
stringify
(
error
));
expect
(
error
).
assertFail
();
done
();
})
...
...
@@ -1060,19 +1060,19 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getApplicationInfo_1400
* @tc.name
BUNDLE::getApplicationInfo
* @tc.name
testGetApplicationInfoCallback
* @tc.desc Test getApplicationInfo interfaces with one hap. (by callback)
*/
it
(
'
getApplicationInfo_1400
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
,
(
error
,
datainfo
)
=>
{
if
(
error
)
{
console
.
info
(
"
getApplicationInfo_1400
fail:
"
+
JSON
.
stringify
(
error
));
console
.
info
(
"
testGetApplicationInfoCallback
fail:
"
+
JSON
.
stringify
(
error
));
expect
(
error
).
assertFail
();
done
();
return
;
}
console
.
info
(
"
getApplicationInfo_1400
success:
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testGetApplicationInfoCallback
success:
"
+
JSON
.
stringify
(
datainfo
));
expect
(
typeof
datainfo
).
assertEqual
(
OBJECT
);
expect
(
datainfo
.
name
).
assertEqual
(
NAME1
);
expect
(
datainfo
.
label
).
assertEqual
(
"
$string:app_name
"
);
...
...
@@ -1094,10 +1094,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getBundleInfos_0600
* @tc.name
BUNDLE::getBundleInfos
* @tc.name
testGetAllBundleInfoCallback
* @tc.desc Test getBundleInfos interfaces with one hap.
*/
it
(
'
getBundleInfos_0600
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllBundleInfoCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getAllBundleInfo
(
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
(
error
,
data
)
=>
{
expect
(
typeof
data
).
assertEqual
(
OBJECT
);
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
...
...
@@ -1118,10 +1118,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getApplicationInfos_0200
* @tc.name
BUNDLE::getApplicationInfos
* @tc.name
testGetAllApplicationInfoTwoHapPromise
* @tc.desc Test getApplicationInfos interfaces with two haps.
*/
it
(
'
getApplicationInfos_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllApplicationInfoTwoHapPromise
'
,
0
,
async
function
(
done
)
{
let
datainfo
=
await
demo
.
getAllApplicationInfo
(
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
);
console
.
info
(
"
==========ActsBmsGetInfosSecondScene is ==========
"
+
JSON
.
stringify
(
datainfo
));
checkgetApplicationInfos
(
datainfo
);
...
...
@@ -1130,10 +1130,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getApplicationInfos_0400
* @tc.name
BUNDLE::getApplicationInfos
* @tc.name
testGetAllApplicationInfoDifferentParamPromise
* @tc.desc Test getApplicationInfos interfaces with two haps and different param.
*/
it
(
'
getApplicationInfos_0400
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllApplicationInfoDifferentParamPromise
'
,
0
,
async
function
(
done
)
{
let
datainfo
=
await
demo
.
getAllApplicationInfo
(
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
userId
);
expect
(
datainfo
.
length
).
assertLarger
(
0
);
checkgetApplicationInfos
(
datainfo
);
...
...
@@ -1142,10 +1142,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getApplicationInfos_0700
* @tc.name
BUNDLE::getApplicationInfos
* @tc.name
testGetAllApplicationInfoTwoHapCallback
* @tc.desc Test getApplicationInfos interfaces with two haps.
*/
it
(
'
getApplicationInfos_0700
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllApplicationInfoTwoHapCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getAllApplicationInfo
(
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
,
(
error
,
datainfo
)
=>
{
for
(
let
i
=
0
;
i
<
datainfo
.
length
;
i
++
)
{
...
...
@@ -1170,10 +1170,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getApplicationInfos_0800
* @tc.name
BUNDLE::getApplicationInfos
* @tc.name
testGetAllApplicationInfoThereHapCallback
* @tc.desc Test getApplicationInfos interfaces with three haps.
*/
it
(
'
getApplicationInfos_0800
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllApplicationInfoThereHapCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getAllApplicationInfo
(
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
userId
,
(
error
,
datainfo
)
=>
{
for
(
let
i
=
0
;
i
<
datainfo
.
length
;
i
++
)
{
expect
(
datainfo
[
i
].
name
.
length
).
assertLarger
(
0
);
...
...
@@ -1197,10 +1197,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getApplicationInfos_0900
* @tc.name
BUNDLE::getApplicationInfos
* @tc.name
testGetAllApplicationInfoDifferentParamCallback
* @tc.desc Test getApplicationInfos interfaces with two haps and different param.
*/
it
(
'
getApplicationInfos_0900
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllApplicationInfoDifferentParamCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getAllApplicationInfo
(
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
userId
,
(
error
,
datainfo
)
=>
{
for
(
let
i
=
0
;
i
<
datainfo
.
length
;
i
++
)
{
expect
(
datainfo
[
i
].
name
.
length
).
assertLarger
(
0
);
...
...
@@ -1224,10 +1224,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getBundleInfos_0200
* @tc.name
BUNDLE::getBundleInfos
* @tc.name
testGetAllBundleInfoTwoHapPromise
* @tc.desc Test getBundleInfos interfaces with two haps.
*/
it
(
'
getBundleInfos_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllBundleInfoTwoHapPromise
'
,
0
,
async
function
(
done
)
{
let
data
=
await
demo
.
getAllBundleInfo
(
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
);
expect
(
typeof
data
).
assertEqual
(
OBJECT
);
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
...
...
@@ -1247,10 +1247,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getBundleInfos_0400
* @tc.name
BUNDLE::getBundleInfos
* @tc.name
testGetAllBundleInfoTwoHapDifferentParamPromise
* @tc.desc Test getBundleInfos interfaces with two haps and different param.
*/
it
(
'
getBundleInfos_0400
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllBundleInfoTwoHapDifferentParamPromise
'
,
0
,
async
function
(
done
)
{
let
data
=
await
demo
.
getAllBundleInfo
(
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
);
expect
(
typeof
data
).
assertEqual
(
OBJECT
);
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
...
...
@@ -1271,10 +1271,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getBundleInfos_0700
* @tc.name
BUNDLE::getBundleInfos
* @tc.name
testGetAllBundleInfoTwoHapCallback
* @tc.desc Test getBundleInfos interfaces with two haps.
*/
it
(
'
getBundleInfos_0700
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllBundleInfoTwoHapCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getAllBundleInfo
(
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
(
error
,
data
)
=>
{
expect
(
typeof
data
).
assertEqual
(
OBJECT
);
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
...
...
@@ -1295,10 +1295,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getBundleInfos_0900
* @tc.name
BUNDLE::getBundleInfos
* @tc.name
testGetAllBundleInfoTwoHapDifferentParamCallback
* @tc.desc Test getBundleInfos interfaces with two haps and different param.
*/
it
(
'
getBundleInfos_0900
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllBundleInfoTwoHapDifferentParamCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getAllBundleInfo
(
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
,
(
error
,
data
)
=>
{
expect
(
typeof
data
).
assertEqual
(
OBJECT
);
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
...
...
@@ -1319,10 +1319,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getBundleInfos_0300
* @tc.name
BUNDLE::getBundleInfos
* @tc.name
testGetAllBundleInfoThereHapPromise
* @tc.desc Test getBundleInfos interfaces with three haps.
*/
it
(
'
getBundleInfos_0300
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllBundleInfoThereHapPromise
'
,
0
,
async
function
(
done
)
{
let
data
=
await
demo
.
getAllBundleInfo
(
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
);
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
expect
(
data
[
i
].
name
.
length
).
assertLarger
(
0
);
...
...
@@ -1341,10 +1341,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getBundleInfos_0500
* @tc.name
BUNDLE::getBundleInfos
* @tc.name
testGetAllBundleInfoThereHapDifferentParamPromise
* @tc.desc Test getBundleInfos interfaces with three haps and different param.
*/
it
(
'
getBundleInfos_0500
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllBundleInfoThereHapDifferentParamPromise
'
,
0
,
async
function
(
done
)
{
let
data
=
await
demo
.
getAllBundleInfo
(
demo
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
);
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
expect
(
data
[
i
].
name
.
length
).
assertLarger
(
0
);
...
...
@@ -1363,10 +1363,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number getBundleInfos_0800
* @tc.name
BUNDLE::getBundleInfos
* @tc.name
testGetAllBundleInfoThereHapCallback
* @tc.desc Test getBundleInfos interfaces with three haps.
*/
it
(
'
getBundleInfos_0800
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetAllBundleInfoThereHapCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getAllBundleInfo
(
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
(
error
,
data
)
=>
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
expect
(
data
[
i
].
name
.
length
).
assertLarger
(
0
);
...
...
@@ -1387,10 +1387,10 @@ describe('ActsBundleManagerTest', function () {
/**
* @tc.number queryAbilityByWant_0100
* @tc.name
BUNDLE::queryAbilityByWant
* @tc.name
testQueryAbilityByWantPromise
* @tc.desc Test queryAbilityByWant interfaces with none hap. (by promise)
*/
it
(
'
queryAbilityByWant_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
testQueryAbilityByWantPromise
'
,
0
,
async
function
(
done
)
{
await
demo
.
queryAbilityByWant
(
{
"
bundleName
"
:
"
com.example.myapplication1
"
,
...
...
@@ -1402,7 +1402,7 @@ describe('ActsBundleManagerTest', function () {
expect
(
data
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
,
len
=
data
.
length
;
i
<
len
;
i
++
)
{
let
datainfo
=
data
[
i
];
console
.
info
(
"
queryAbilityByWant_0100
success:
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testQueryAbilityByWantPromise
success:
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
.
name
).
assertEqual
(
"
com.example.myapplication1.MainAbility
"
);
expect
(
datainfo
.
label
).
assertEqual
(
"
$string:app_name
"
);
expect
(
datainfo
.
description
).
assertEqual
(
DESCRIPTION
);
...
...
@@ -1432,18 +1432,18 @@ describe('ActsBundleManagerTest', function () {
}
done
();
}).
catch
(
err
=>
{
console
.
info
(
"
queryAbilityByWant_0100
err
"
+
JSON
.
stringify
(
err
));
console
.
info
(
"
testQueryAbilityByWantPromise
err
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertFail
();
done
();
})
})
/**
* @tc.number queryAbilityByWant_0
2
00
* @tc.name
BUNDLE::queryAbilityByWant
* @tc.number queryAbilityByWant_0
5
00
* @tc.name
testQueryAbilityByWantCallback
* @tc.desc Test queryAbilityByWant interfaces with none hap. (by callback)
*/
it
(
'
queryAbilityByWant_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
testQueryAbilityByWantCallback
'
,
0
,
async
function
(
done
)
{
demo
.
queryAbilityByWant
(
{
"
bundleName
"
:
"
com.example.myapplication1
"
,
...
...
@@ -1453,7 +1453,7 @@ describe('ActsBundleManagerTest', function () {
demo
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
userId
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
"
queryAbilityByWant_0200
err
"
+
JSON
.
stringify
(
err
));
console
.
info
(
"
testQueryAbilityByWantCallback
err
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertFail
();
done
();
return
;
...
...
@@ -1461,7 +1461,7 @@ describe('ActsBundleManagerTest', function () {
expect
(
data
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
,
len
=
data
.
length
;
i
<
len
;
i
++
)
{
let
datainfo
=
data
[
i
];
console
.
info
(
"
queryAbilityByWant_0200
success:
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testQueryAbilityByWantCallback
success:
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
.
name
).
assertEqual
(
"
com.example.myapplication1.MainAbility
"
);
expect
(
datainfo
.
label
).
assertEqual
(
"
$string:app_name
"
);
expect
(
datainfo
.
description
).
assertEqual
(
DESCRIPTION
);
...
...
@@ -1494,11 +1494,11 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number queryAbilityByWant_0
3
00
* @tc.name
BUNDLE::queryAbilityByWant
* @tc.number queryAbilityByWant_0
2
00
* @tc.name
testQueryAbilityByWantTwoHapPromise
* @tc.desc Test queryAbilityByWant interfaces with two haps. (by promise)
*/
it
(
'
queryAbilityByWant_0300
'
,
0
,
async
function
(
done
)
{
it
(
'
testQueryAbilityByWantTwoHapPromise
'
,
0
,
async
function
(
done
)
{
let
data
=
await
demo
.
queryAbilityByWant
(
{
"
bundleName
"
:
"
com.example.myapplication2
"
,
...
...
@@ -1507,7 +1507,7 @@ describe('ActsBundleManagerTest', function () {
expect
(
data
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
,
len
=
data
.
length
;
i
<
len
;
i
++
)
{
let
datainfo
=
data
[
i
];
console
.
info
(
"
queryAbilityByWant_0300
success:
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testQueryAbilityByWantTwoHapPromise
success:
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
.
name
.
length
).
assertLarger
(
0
);
expect
(
datainfo
.
label
).
assertEqual
(
"
$string:app_name
"
);
expect
(
datainfo
.
description
).
assertEqual
(
DESCRIPTION
);
...
...
@@ -1535,11 +1535,11 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number queryAbilityByWant_0
4
00
* @tc.name
BUNDLE::queryAbilityByWant
* @tc.number queryAbilityByWant_0
6
00
* @tc.name
testQueryAbilityByWantTwoHapCallback
* @tc.desc Test queryAbilityByWant interfaces with two haps. (by callback)
*/
it
(
'
queryAbilityByWant_0400
'
,
0
,
async
function
(
done
)
{
it
(
'
testQueryAbilityByWantTwoHapCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
queryAbilityByWant
(
{
"
bundleName
"
:
"
com.example.myapplication2
"
,
...
...
@@ -1548,7 +1548,7 @@ describe('ActsBundleManagerTest', function () {
expect
(
data
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
,
len
=
data
.
length
;
i
<
len
;
i
++
)
{
let
datainfo
=
data
[
i
];
console
.
info
(
"
queryAbilityByWant_0400
success:
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testQueryAbilityByWantTwoHapCallback
success:
"
+
JSON
.
stringify
(
datainfo
));
expect
(
datainfo
.
name
.
length
).
assertLarger
(
0
);
expect
(
datainfo
.
label
).
assertEqual
(
"
$string:app_name
"
);
expect
(
datainfo
.
description
).
assertEqual
(
DESCRIPTION
);
...
...
@@ -1577,18 +1577,18 @@ describe('ActsBundleManagerTest', function () {
})
/**
* @tc.number queryAbilityByWant_0
5
00
* @tc.name
BUNDLE::queryAbilityByWant
* @tc.number queryAbilityByWant_0
3
00
* @tc.name
testQueryAbilityByWantThereHapPromise
* @tc.desc Test queryAbilityByWant interfaces with three haps. (by promise)
*/
it
(
'
queryAbilityByWant_0500
'
,
0
,
async
function
(
done
)
{
it
(
'
testQueryAbilityByWantThereHapPromise
'
,
0
,
async
function
(
done
)
{
await
demo
.
queryAbilityByWant
({
entities
:
[
'
entity.system.home
'
,
'
entitiesentities
'
]
},
4
,
userId
).
then
(
data
=>
{
checkAbilityInfo0500
(
data
)
done
();
}).
catch
(
err
=>
{
console
.
info
(
"
queryAbilityByWant_0500
err
"
+
JSON
.
stringify
(
err
));
console
.
info
(
"
testQueryAbilityByWantThereHapPromise
err
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertFail
();
done
();
})
...
...
@@ -1598,7 +1598,7 @@ describe('ActsBundleManagerTest', function () {
let
queryResultCount
=
0
;
for
(
let
i
=
0
,
len
=
data
.
length
;
i
<
len
;
i
++
)
{
let
datainfo
=
data
[
i
];
console
.
info
(
"
queryAbilityByWant_0500
success:
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testQueryAbilityByWantThereHapPromise
success:
"
+
JSON
.
stringify
(
datainfo
));
if
(
datainfo
.
bundleName
==
NAME3
)
{
expect
(
datainfo
.
name
).
assertEqual
(
"
com.example.myapplication.MainAbility
"
);
expect
(
datainfo
.
label
).
assertEqual
(
"
$string:app_name
"
);
...
...
@@ -1643,17 +1643,17 @@ describe('ActsBundleManagerTest', function () {
}
/**
* @tc.number queryAbilityByWant_0
6
00
* @tc.name
BUNDLE::queryAbilityByWant
* @tc.number queryAbilityByWant_0
7
00
* @tc.name
testQueryAbilityByWantThereHapCallback
* @tc.desc Test queryAbilityByWant interfaces with three haps. (by callback)
*/
it
(
'
queryAbilityByWant_0600
'
,
0
,
async
function
(
done
)
{
it
(
'
testQueryAbilityByWantThereHapCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
queryAbilityByWant
(
{
entities
:
[
'
entity.system.home
'
,
'
entitiesentities
'
]
},
4
,
userId
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
"
queryAbilityByWant_0600
err
"
+
JSON
.
stringify
(
err
));
console
.
info
(
"
testQueryAbilityByWantThereHapCallback
err
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertFail
();
done
();
return
;
...
...
@@ -1667,7 +1667,7 @@ describe('ActsBundleManagerTest', function () {
let
queryResultCount
=
0
;
for
(
let
i
=
0
,
len
=
data
.
length
;
i
<
len
;
i
++
)
{
let
datainfo
=
data
[
i
];
console
.
info
(
"
queryAbilityByWant_0600
success:
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
testQueryAbilityByWantThereHapCallback
success:
"
+
JSON
.
stringify
(
datainfo
));
if
(
datainfo
.
bundleName
==
NAME3
)
{
expect
(
datainfo
.
name
).
assertEqual
(
"
com.example.myapplication.MainAbility
"
);
expect
(
datainfo
.
label
).
assertEqual
(
"
$string:app_name
"
);
...
...
@@ -1708,76 +1708,76 @@ describe('ActsBundleManagerTest', function () {
}
/**
* @tc.number queryAbilityByWant_0
7
00
* @tc.name
BUNDLE::queryAbilityByWant
* @tc.number queryAbilityByWant_0
8
00
* @tc.name
testQueryAbilityByWantNotExistHapPromise
* @tc.desc Test queryAbilityByWant interfaces with one hap. (by promise)
*/
it
(
'
queryAbilityByWant_0700
'
,
0
,
async
function
(
done
)
{
it
(
'
testQueryAbilityByWantNotExistHapPromise
'
,
0
,
async
function
(
done
)
{
await
demo
.
queryAbilityByWant
(
{
"
bundleName
"
:
"
wrong name
"
,
"
abilityName
"
:
"
com.example.myapplication1.MainAbility
"
},
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
userId
).
then
(
datainfo
=>
{
console
.
info
(
"
queryAbilityByWant_0700
dataInfo : ===========
"
+
datainfo
);
console
.
info
(
"
testQueryAbilityByWantNotExistHapPromise
dataInfo : ===========
"
+
datainfo
);
expect
(
datainfo
).
assertFail
();
done
();
}).
catch
(
err
=>
{
console
.
info
(
"
queryAbilityByWant_0700
err : ===========
"
+
err
);
console
.
info
(
"
testQueryAbilityByWantNotExistHapPromise
err : ===========
"
+
err
);
expect
(
err
).
assertEqual
(
1
);
done
();
})
})
/**
* @tc.number queryAbilityByWant_0
8
00
* @tc.name
BUNDLE::queryAbilityByWant
* @tc.number queryAbilityByWant_0
9
00
* @tc.name
testQueryAbilityByWantNotExistHapCallback
* @tc.desc Test queryAbilityByWant interfaces with one hap. (by callback)
*/
it
(
'
queryAbilityByWant_0800
'
,
0
,
async
function
(
done
)
{
it
(
'
testQueryAbilityByWantNotExistHapCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
queryAbilityByWant
(
{
"
bundleName
"
:
"
wrong name
"
,
"
abilityName
"
:
"
com.example.myapplication1.MainAbility
"
},
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
userId
,
(
err
,
datainfo
)
=>
{
if
(
err
)
{
console
.
info
(
"
queryAbilityByWant_0800
err : ===========
"
+
err
);
console
.
info
(
"
testQueryAbilityByWantNotExistHapCallback
err : ===========
"
+
err
);
expect
(
err
).
assertEqual
(
1
);
done
();
return
;
}
console
.
info
(
"
queryAbilityByWant_0800
dataInfo : ===========
"
+
datainfo
);
console
.
info
(
"
testQueryAbilityByWantNotExistHapCallback
dataInfo : ===========
"
+
datainfo
);
expect
(
datainfo
).
assertFail
();
done
();
})
})
/**
* @tc.number queryAbilityByWant_0
9
00
* @tc.name
BUNDLE::queryAbilityByWant
* @tc.desc Test queryAbilityByWant interfaces with system hap. (by
callback
)
* @tc.number queryAbilityByWant_0
4
00
* @tc.name
testQueryAbilityByWantSystemHapPromise
* @tc.desc Test queryAbilityByWant interfaces with system hap. (by
promise
)
*/
it
(
'
queryAbilityByWant_0900
'
,
0
,
async
function
(
done
)
{
it
(
'
testQueryAbilityByWantSystemHapPromise
'
,
0
,
async
function
(
done
)
{
await
demo
.
queryAbilityByWant
(
{
bundleName
:
"
wrong name
"
,
abilityName
:
"
wrong name
"
,
},
0
,
userId
).
then
(
datainfo
=>
{
console
.
info
(
"
queryAbilityByWant_0900
dataInfo : ===========
"
+
datainfo
);
console
.
info
(
"
testQueryAbilityByWantSystemHapPromise
dataInfo : ===========
"
+
datainfo
);
expect
(
datainfo
.
length
).
assertLarger
(
0
);
done
();
}).
catch
(
err
=>
{
console
.
info
(
"
queryAbilityByWant_0900
err : ===========
"
+
err
);
console
.
info
(
"
testQueryAbilityByWantSystemHapPromise
err : ===========
"
+
err
);
expect
(
err
).
assertEqual
(
1
);
done
();
})
})
/**
* @tc.number queryAbilityByWant_1
0
00
* @tc.name
BUNDLE::queryAbilityByWant
* @tc.number queryAbilityByWant_1
1
00
* @tc.name
testQueryAbilityByWantSystemHapCallback
* @tc.desc Test queryAbilityByWant interfaces with system hap. (by callback)
*/
it
(
'
queryAbilityByWant_1000
'
,
0
,
async
function
(
done
)
{
it
(
'
testQueryAbilityByWantSystemHapCallback
'
,
0
,
async
function
(
done
)
{
demo
.
queryAbilityByWant
(
{
bundleName
:
"
wrong name
"
,
...
...
@@ -1785,8 +1785,8 @@ describe('ActsBundleManagerTest', function () {
},
0
,
userId
,
OnReceiveEvent
);
function
OnReceiveEvent
(
err
,
datainfo
)
{
console
.
info
(
"
queryAbilityByWant_1000
err : ===========
"
+
err
);
console
.
info
(
"
queryAbilityByWant_1000
dataInfo : ===========
"
+
datainfo
);
console
.
info
(
"
testQueryAbilityByWantSystemHapCallback
err : ===========
"
+
err
);
console
.
info
(
"
testQueryAbilityByWantSystemHapCallback
dataInfo : ===========
"
+
datainfo
);
expect
(
err
).
assertEqual
(
1
);
expect
(
datainfo
.
length
).
assertLarger
(
0
);
done
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录