未验证 提交 c02c1604 编写于 作者: O openharmony_ci 提交者: Gitee

!3225 新增测试用例+修改拼写错误

Merge pull request !3225 from ry/master
...@@ -22,6 +22,8 @@ const INVALID_CODE = 1; ...@@ -22,6 +22,8 @@ const INVALID_CODE = 1;
const LAUNCHER_BUNDLE_NAME = "com.ohos.launcher"; const LAUNCHER_BUNDLE_NAME = "com.ohos.launcher";
const SELF_BUNDLENAME = "com.example.actsbmsetsunpermissiontest"; const SELF_BUNDLENAME = "com.example.actsbmsetsunpermissiontest";
const SELF_ABILITYNAME = "com.example.actsbmsetsunpermissiontest.MainAbility"; const SELF_ABILITYNAME = "com.example.actsbmsetsunpermissiontest.MainAbility";
const BUNDLE_SETTINGS = "com.ohos.settings";
const ABILITIY_SETTINGS = "com.ohos.settings.MainAbility";
export default function actsBmsJsUnPermissionTest() { export default function actsBmsJsUnPermissionTest() {
describe('actsBmsJsUnPermissionTest', function () { describe('actsBmsJsUnPermissionTest', function () {
...@@ -34,10 +36,8 @@ export default function actsBmsJsUnPermissionTest() { ...@@ -34,10 +36,8 @@ export default function actsBmsJsUnPermissionTest() {
it('getApplicationInfos_1300', 0, async function (done) { it('getApplicationInfos_1300', 0, async function (done) {
await bundle.getAllApplicationInfo(DEFAULT_FLAG).then(data => { await bundle.getAllApplicationInfo(DEFAULT_FLAG).then(data => {
expect().assertFail(); expect().assertFail();
done();
}).catch(err => { }).catch(err => {
expect(err).assertEqual(INVALID_CODE); expect(err).assertEqual(INVALID_CODE);
done();
}); });
bundle.getAllApplicationInfo(DEFAULT_FLAG, (err, data) => { bundle.getAllApplicationInfo(DEFAULT_FLAG, (err, data) => {
expect(err).assertEqual(INVALID_CODE); expect(err).assertEqual(INVALID_CODE);
...@@ -54,10 +54,8 @@ export default function actsBmsJsUnPermissionTest() { ...@@ -54,10 +54,8 @@ export default function actsBmsJsUnPermissionTest() {
it('getBundleInfo_2000', 0, async function (done) { it('getBundleInfo_2000', 0, async function (done) {
await bundle.getBundleInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG, { userId: 100 }).then(data => { await bundle.getBundleInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG, { userId: 100 }).then(data => {
expect().assertFail(); expect().assertFail();
done();
}).catch(err => { }).catch(err => {
expect(err).assertEqual(INVALID_CODE); expect(err).assertEqual(INVALID_CODE);
done();
}); });
bundle.getBundleInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG, { userId: 100 }, (err, data) => { bundle.getBundleInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG, { userId: 100 }, (err, data) => {
expect(err).assertEqual(INVALID_CODE); expect(err).assertEqual(INVALID_CODE);
...@@ -74,10 +72,8 @@ export default function actsBmsJsUnPermissionTest() { ...@@ -74,10 +72,8 @@ export default function actsBmsJsUnPermissionTest() {
it('getApplicationInfo_1800', 0, async function (done) { it('getApplicationInfo_1800', 0, async function (done) {
await bundle.getApplicationInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG).then(data => { await bundle.getApplicationInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG).then(data => {
expect().assertFail(); expect().assertFail();
done();
}).catch(err => { }).catch(err => {
expect(err).assertEqual(INVALID_CODE); expect(err).assertEqual(INVALID_CODE);
done();
}); });
bundle.getApplicationInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG, (err, data) => { bundle.getApplicationInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG, (err, data) => {
expect(err).assertEqual(INVALID_CODE); expect(err).assertEqual(INVALID_CODE);
...@@ -138,6 +134,23 @@ export default function actsBmsJsUnPermissionTest() { ...@@ -138,6 +134,23 @@ export default function actsBmsJsUnPermissionTest() {
}) })
}); });
/*
* @tc.number: SUB_BMS_APPINFO_GETABILITYICON_0006
* @tc.name: test getAbilityIcon
* @tc.desc: test getAbilityIcon without permission
*/
it('SUB_BMS_APPINFO_GETABILITYICON_0006', 0, async function (done) {
await bundle.getAbilityIcon(BUNDLE_SETTINGS, ABILITIY_SETTINGS).then(pixelmap => {
expect(pixelmap).assertFail();
}).catch(err => {
expect(err).assertEqual(1);
});
bundle.getAbilityIcon(BUNDLE_SETTINGS, ABILITIY_SETTINGS, (err, pixelmap) => {
expect(err).assertEqual(1);
done();
});
});
/* /*
* @tc.number: getAbilityInfo_100 * @tc.number: getAbilityInfo_100
* @tc.name: test getAbilityInfo * @tc.name: test getAbilityInfo
...@@ -191,15 +204,15 @@ export default function actsBmsJsUnPermissionTest() { ...@@ -191,15 +204,15 @@ export default function actsBmsJsUnPermissionTest() {
expect(data.descriptionId).assertLarger(0); expect(data.descriptionId).assertLarger(0);
expect(data.formEnabled).assertEqual(false); expect(data.formEnabled).assertEqual(false);
expect(data.iconId).assertLarger(0); expect(data.iconId).assertLarger(0);
except(data.labelId).assertLarger(0); expect(data.labelId).assertLarger(0);
expect(data.subType).assertEqual(0); expect(data.subType).assertEqual(0);
except(data.enabled).assertEqual(true); expect(data.enabled).assertEqual(true);
expect(data.readPermission).assertEqual(""); expect(data.readPermission).assertEqual("");
expect(data.writePermission).assertEqual(""); expect(data.writePermission).assertEqual("");
expect(data.targetAbility).assertEqual(""); expect(data.targetAbility).assertEqual("");
expect(data.theme).assertEqual(""); expect(data.theme).assertEqual("");
expect(data.metaData).assertEqual([]); expect(data.metaData.length).assertEqual(0);
expect(data.metadata).assertEqual([]); expect(data.metadata.length).assertEqual(0);
checkApplicationInfo(data.applicationInfo); checkApplicationInfo(data.applicationInfo);
console.log("---checkAbilityInfo_other End--- "); console.log("---checkAbilityInfo_other End--- ");
} }
...@@ -220,10 +233,10 @@ export default function actsBmsJsUnPermissionTest() { ...@@ -220,10 +233,10 @@ export default function actsBmsJsUnPermissionTest() {
expect(info.supportedModes).assertEqual(0); expect(info.supportedModes).assertEqual(0);
expect(info.process).assertEqual(""); expect(info.process).assertEqual("");
expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.example.actsbmsetsunpermissiontest/com.example.actsbmsetsunpermissiontest"); expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.example.actsbmsetsunpermissiontest/com.example.actsbmsetsunpermissiontest");
expect(info.metaData).expect({}); expect(JSON.stringify(info.metadata)).assertEqual("{}");
expect(info.metadata).expect({}); expect(JSON.stringify(info.metadata)).assertEqual("{}");
expect(info.enabled).expect(true); expect(info.enabled).assertEqual(true);
expect(info.flags).expect(0); expect(info.flags).assertEqual(0);
expect(info.uid).assertLarger(0); expect(info.uid).assertLarger(0);
expect(info.entityType).assertEqual("unspecified"); expect(info.entityType).assertEqual("unspecified");
expect(info.removable).assertEqual(true); expect(info.removable).assertEqual(true);
......
...@@ -27,24 +27,31 @@ ...@@ -27,24 +27,31 @@
"type": "PushKit", "type": "PushKit",
"push": [ "push": [
"bmsThirdBundleTest1.hap->/data/test/bmsThirdBundleTest1.hap", "bmsThirdBundleTest1.hap->/data/test/bmsThirdBundleTest1.hap",
"bmsThirdBundleTestA1.hap->/data/test/bmsThirdBundleTestA1.hap",
"bmsThirdBundleTest5.hap->/data/test/bmsThirdBundleTest5.hap", "bmsThirdBundleTest5.hap->/data/test/bmsThirdBundleTest5.hap",
"bmsSystemBundleTest1.hap->/data/test/bmsSystemBundleTest1.hap", "bmsSystemBundleTest1.hap->/data/test/bmsSystemBundleTest1.hap",
"bmsVendorBundleTest1.hap->/data/test/bmsVendorBundleTest1.hap" "bmsVendorBundleTest1.hap->/data/test/bmsVendorBundleTest1.hap",
"first_right.hap->/data/test/first_right.hap",
"second_right.hap->/data/test/second_right.hap"
] ]
}, },
{ {
"type": "ShellKit", "type": "ShellKit",
"run-command": [ "run-command": [
"bm install -p /data/test/bmsThirdBundleTest1.hap", "bm install -p /data/test/bmsThirdBundleTest1.hap",
"bm install -p /data/test/bmsThirdBundleTestA1.hap",
"bm install -p /data/test/bmsSystemBundleTest1.hap", "bm install -p /data/test/bmsSystemBundleTest1.hap",
"bm install -p /data/test/bmsVendorBundleTest1.hap", "bm install -p /data/test/bmsVendorBundleTest1.hap",
"bm install -p /data/test/bmsThirdBundleTest5.hap" "bm install -p /data/test/bmsThirdBundleTest5.hap",
"bm install -p /data/test/first_right.hap",
"bm install -p /data/test/second_right.hap"
], ],
"teardown-command":[ "teardown-command":[
"bm uninstall -n com.example.third1", "bm uninstall -n com.example.third1",
"bm uninstall -n com.example.system1", "bm uninstall -n com.example.system1",
"bm uninstall -n com.example.vendor1", "bm uninstall -n com.example.vendor1",
"bm uninstall -n com.example.third5", "bm uninstall -n com.example.third5",
"bm uninstall -n com.example.l3jsdemo",
"rm -rf /data/test/" "rm -rf /data/test/"
] ]
} }
......
...@@ -21,11 +21,13 @@ const BUNDLE_NAME2 = 'com.example.third5'; ...@@ -21,11 +21,13 @@ const BUNDLE_NAME2 = 'com.example.third5';
const BUNDLE_NAME3 = 'com.example.noexist'; const BUNDLE_NAME3 = 'com.example.noexist';
const BUNDLE_NAME4 = 'com.example.system1'; const BUNDLE_NAME4 = 'com.example.system1';
const BUNDLE_NAME5 = 'com.example.vendor1'; const BUNDLE_NAME5 = 'com.example.vendor1';
const BUNDLE_NAME6 = 'com.example.l3jsdemo';
const ABILITY_NAME1 = 'com.example.third1.MainAbility'; const ABILITY_NAME1 = 'com.example.third1.MainAbility';
const ABILITY_NAME3 = 'com.example.third5.AMainAbility'; const ABILITY_NAME2 = 'com.example.third5.AMainAbility';
const ABILITY_NAME4 = 'com.example.noexist.MainAbility'; const ABILITY_NAME3 = 'com.example.noexist.MainAbility';
const ABILITY_NAME5 = 'com.example.system1.MainAbility'; const ABILITY_NAME4 = 'com.example.system1.MainAbility';
const ABILITY_NAME6 = 'com.example.vendor1.MainAbility'; const ABILITY_NAME5 = 'com.example.vendor1.MainAbility';
const ABILITY_NAME6 = 'com.example.l3jsdemo.MainAbility';
const USERID = 100; const USERID = 100;
describe('ActsBmsMetaDataTest', function () { describe('ActsBmsMetaDataTest', function () {
...@@ -33,7 +35,7 @@ describe('ActsBmsMetaDataTest', function () { ...@@ -33,7 +35,7 @@ describe('ActsBmsMetaDataTest', function () {
/* /*
* @tc.number: bms_getMetaData_0100 * @tc.number: bms_getMetaData_0100
* @tc.name: test to get meta data for an application. * @tc.name: test to get meta data for an application.
* @tc.desc: get an application's meta data which contains two HAP packages. * @tc.desc: get an ability's meta data when update.
*/ */
it('bms_getMetaData_0100', 0, async function (done) { it('bms_getMetaData_0100', 0, async function (done) {
await bundle.queryAbilityByWant( await bundle.queryAbilityByWant(
...@@ -41,105 +43,173 @@ describe('ActsBmsMetaDataTest', function () { ...@@ -41,105 +43,173 @@ describe('ActsBmsMetaDataTest', function () {
"bundleName": BUNDLE_NAME1, "bundleName": BUNDLE_NAME1,
"abilityName": ABILITY_NAME1 "abilityName": ABILITY_NAME1
}, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => { }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => {
console.info("dataInfos[0].metaData" + JSON.stringify(dataInfos[0].metaData)); let metaData = dataInfos[0].metaData;
let metaData = dataInfos[0].metaData; expect(metaData[0].name).assertEqual("DataA1");
expect(metaData[0].name).assertEqual("Data1"); expect(metaData[0].value).assertEqual("float");
expect(metaData[0].value).assertEqual("float"); expect(metaData[0].extra).assertEqual("$string:mainability_description");
expect(metaData[0].extra).assertEqual("$string:mainability_description"); }).catch(err => {
done(); expect(err).assertFail();
}).catch(err => { });
expect(err).assertFail(); bundle.queryAbilityByWant(
done(); {
}); "bundleName": BUNDLE_NAME1,
"abilityName": ABILITY_NAME1
}, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID, (err, dataInfos) => {
let metaData = dataInfos[0].metaData;
expect(metaData[0].name).assertEqual("DataA1");
expect(metaData[0].value).assertEqual("float");
expect(metaData[0].extra).assertEqual("$string:mainability_description");
done();
});
});
/*
* @tc.number: bms_getMetaData_0200
* @tc.name: test to get meta data for an application.
* @tc.desc: get an ability's meta data which contains two HAP packages.
*/
it('bms_getMetaData_0200', 0, async function (done) {
await bundle.queryAbilityByWant(
{
"bundleName": BUNDLE_NAME6,
"abilityName": ABILITY_NAME6
}, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => {
let metaDataInfo = dataInfos[0].metaData;
expect(metaDataInfo[0].name).assertEqual("Data3");
expect(metaDataInfo[0].value).assertEqual("float");
expect(metaDataInfo[0].extra).assertEqual("$string:mainability_description");
}).catch(err => {
expect(err).assertFail();
});
bundle.queryAbilityByWant(
{
"bundleName": BUNDLE_NAME6,
"abilityName": ABILITY_NAME6
}, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID, (err, dataInfos) => {
let metaData = dataInfos[0].metaData;
expect(metaData[0].name).assertEqual("Data3");
expect(metaData[0].value).assertEqual("float");
expect(metaData[0].extra).assertEqual("$string:mainability_description");
done();
});
}); });
/* /*
* @tc.number: bms_getMetaData_0400 * @tc.number: bms_getMetaData_0400
* @tc.name: test to get meta data for an application. * @tc.name: test to get meta data for an application.
* @tc.desc: get an application's meta data which has one ability. * @tc.desc: get an ability's meta data which has two ability.
*/ */
it('bms_getMetaData_0400', 0, async function (done) { it('bms_getMetaData_0400', 0, async function (done) {
await bundle.queryAbilityByWant( await bundle.queryAbilityByWant(
{ {
bundleName: BUNDLE_NAME2, bundleName: BUNDLE_NAME2,
abilityName: ABILITY_NAME3, abilityName: ABILITY_NAME2,
}, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => { }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => {
console.info("dataInfos[0].metaData" + JSON.stringify(dataInfos[0].metaData)); let metaData = dataInfos[0].metaData;
let metaData = dataInfos[0].metaData; expect(metaData[0].name).assertEqual("Data5A");
expect(metaData[0].name).assertEqual("Data5A"); expect(metaData[0].value).assertEqual("float");
expect(metaData[0].value).assertEqual("float"); expect(metaData[0].extra).assertEqual("$string:mainability_description");
expect(metaData[0].extra).assertEqual("$string:mainability_description"); }).catch(err => {
done(); expect(err).assertFail();
}).catch(err => { });
expect(err).assertFail(); bundle.queryAbilityByWant(
done(); {
}); "bundleName": BUNDLE_NAME2,
"abilityName": ABILITY_NAME2
}, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID, (err, dataInfos) => {
let metaData = dataInfos[0].metaData;
expect(metaData[0].name).assertEqual("Data5A");
expect(metaData[0].value).assertEqual("float");
expect(metaData[0].extra).assertEqual("$string:mainability_description");
done();
});
}); });
/* /*
* @tc.number: bms_getMetaData_0500 * @tc.number: bms_getMetaData_0500
* @tc.name: test to get meta data for an application that does not exist. * @tc.name: test to get meta data for an application that does not exist.
* @tc.desc: get an application's meta data which does not exist. * @tc.desc: get an ability's meta data which does not exist.
*/ */
it('bms_getMetaData_0500', 0, async function (done) { it('bms_getMetaData_0500', 0, async function (done) {
await bundle.queryAbilityByWant( await bundle.queryAbilityByWant(
{ {
bundleName: BUNDLE_NAME3, bundleName: BUNDLE_NAME3,
abilityName: ABILITY_NAME4, abilityName: ABILITY_NAME3,
}, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => { }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => {
expect(dataInfos.length).assertEqual(0); expect(dataInfos).assertFail();
done(); }).catch(err => {
}).catch(err => { expect(err).assertEqual(1);
console.info("err====: " + err); });
expect(err).assertEqual(1); bundle.queryAbilityByWant(
done(); {
}); "bundleName": BUNDLE_NAME3,
"abilityName": ABILITY_NAME3
}, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID, (err, dataInfos) => {
expect(err).assertEqual(1);
expect(dataInfos).assertEqual("QueryAbilityInfos failed");
done();
});
}); });
/* /*
* @tc.number: bms_getMetaData_0600 * @tc.number: bms_getMetaData_0600
* @tc.name: test to get meta data for a system application. * @tc.name: test to get meta data for a system application.
* @tc.desc: get a system application's meta data. * @tc.desc: get a system ability's meta data.
*/ */
it('bms_getMetaData_0600', 0, async function (done) { it('bms_getMetaData_0600', 0, async function (done) {
await bundle.queryAbilityByWant( await bundle.queryAbilityByWant(
{ {
bundleName: BUNDLE_NAME4, bundleName: BUNDLE_NAME4,
abilityName: ABILITY_NAME5, abilityName: ABILITY_NAME4,
}, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => { }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => {
console.info("dataInfos[0].metaData" + JSON.stringify(dataInfos[0].metaData)); let metaData = dataInfos[0].metaData;
let metaData = dataInfos[0].metaData; expect(metaData[0].name).assertEqual("Data1S");
expect(metaData[0].name).assertEqual("Data1S"); expect(metaData[0].value).assertEqual("float");
expect(metaData[0].value).assertEqual("float"); expect(metaData[0].extra).assertEqual("$string:mainability_description");
expect(metaData[0].extra).assertEqual("$string:mainability_description"); }).catch(err => {
done(); expect(err).assertFail();
}).catch(err => { });
expect(err).assertFail(); bundle.queryAbilityByWant(
done(); {
}); "bundleName": BUNDLE_NAME4,
"abilityName": ABILITY_NAME4
}, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID, (err, dataInfos) => {
let metaData = dataInfos[0].metaData;
expect(metaData[0].name).assertEqual("Data1S");
expect(metaData[0].value).assertEqual("float");
expect(metaData[0].extra).assertEqual("$string:mainability_description");
done();
});
}); });
/* /*
* @tc.number: bms_getMetaData_0700 * @tc.number: bms_getMetaData_0700
* @tc.name: test to get meta data for a vendor application. * @tc.name: test to get meta data for a vendor application.
* @tc.desc: get a vendor application's meta data. * @tc.desc: get a vendor ability's meta data.
*/ */
it('bms_getMetaData_0700', 0, async function (done) { it('bms_getMetaData_0700', 0, async function (done) {
await bundle.queryAbilityByWant( await bundle.queryAbilityByWant(
{ {
bundleName: BUNDLE_NAME5, bundleName: BUNDLE_NAME5,
abilityName: ABILITY_NAME6, abilityName: ABILITY_NAME5,
}, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => { }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => {
console.info("dataInfos[0].metaData" + JSON.stringify(dataInfos[0].metaData)); let metaData = dataInfos[0].metaData;
let metaData = dataInfos[0].metaData; expect(metaData[0].name).assertEqual("vendorName");
expect(metaData[0].name).assertEqual(""); expect(metaData[0].value).assertEqual("vendorValue");
expect(metaData[0].value).assertEqual(""); expect(metaData[0].extra).assertEqual("vendorcustomizeData");
expect(metaData[0].extra).assertEqual(""); }).catch(err => {
done(); expect(err).assertFail();
}).catch(err => { });
expect(err).assertFail(); bundle.queryAbilityByWant(
done(); {
}); "bundleName": BUNDLE_NAME5,
"abilityName": ABILITY_NAME5
}, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID, (err, dataInfos) => {
let metaData = dataInfos[0].metaData;
expect(metaData[0].name).assertEqual("vendorName");
expect(metaData[0].value).assertEqual("vendorValue");
expect(metaData[0].extra).assertEqual("vendorcustomizeData");
done();
});
}); });
}) })
\ No newline at end of file
...@@ -298,15 +298,15 @@ export default function GetabilityInfo() { ...@@ -298,15 +298,15 @@ export default function GetabilityInfo() {
expect(data.descriptionId).assertLarger(0); expect(data.descriptionId).assertLarger(0);
expect(data.formEnabled).assertEqual(false); expect(data.formEnabled).assertEqual(false);
expect(data.iconId).assertLarger(0); expect(data.iconId).assertLarger(0);
except(data.labelId).assertLarger(0); expect(data.labelId).assertLarger(0);
expect(data.subType).assertEqual(0); expect(data.subType).assertEqual(0);
except(data.enabled).assertEqual(true); expect(data.enabled).assertEqual(true);
expect(data.readPermission).assertEqual(""); expect(data.readPermission).assertEqual("");
expect(data.writePermission).assertEqual(""); expect(data.writePermission).assertEqual("");
expect(data.targetAbility).assertEqual(""); expect(data.targetAbility).assertEqual("");
expect(data.theme).assertEqual(""); expect(data.theme).assertEqual("");
expect(data.metaData).assertEqual([]); expect(data.metaData.length).assertEqual(0);
expect(data.metadata).assertEqual([]); expect(data.metadata.length).assertEqual(0);
checkApplicationInfo_other(data.applicationInfo); checkApplicationInfo_other(data.applicationInfo);
console.log("---checkAbilityInfo_other End--- "); console.log("---checkAbilityInfo_other End--- ");
} }
...@@ -321,15 +321,15 @@ export default function GetabilityInfo() { ...@@ -321,15 +321,15 @@ export default function GetabilityInfo() {
expect(info.iconId > 0).assertTrue(); expect(info.iconId > 0).assertTrue();
expect(info.label).assertEqual("$string:app_name"); expect(info.label).assertEqual("$string:app_name");
expect(info.labelId > 0).assertTrue(); expect(info.labelId > 0).assertTrue();
expect(info.systemApp).assertEqual(true); expect(info.systemApp).assertEqual(false);
expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.ohos.acecollaboration/com.ohos.acecollaboration"); expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.example.third1/com.example.third1.entry");
expect(info.supportedModes).assertEqual(0); expect(info.supportedModes).assertEqual(0);
expect(info.process).assertEqual(""); expect(info.process).assertEqual("");
expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.ohos.acecollaboration/com.ohos.acecollaboration"); expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.example.third1/com.example.third1.entry");
expect(info.metaData).expect({}); expect(JSON.stringify(info.metaData)).assertEqual("{}");
expect(info.metadata).expect({}); expect(JSON.stringify(info.metadata)).assertEqual("{}");
expect(info.enabled).expect(true); expect(info.enabled).assertEqual(true);
expect(info.flags).expect(0); expect(info.flags).assertEqual(0);
expect(info.uid).assertLarger(0); expect(info.uid).assertLarger(0);
expect(info.entityType).assertEqual("unspecified"); expect(info.entityType).assertEqual("unspecified");
expect(info.removable).assertEqual(true); expect(info.removable).assertEqual(true);
......
...@@ -39,7 +39,16 @@ ...@@ -39,7 +39,16 @@
"label": "$string:app_name", "label": "$string:app_name",
"type": "page", "type": "page",
"homeAbility": true, "homeAbility": true,
"launchType": "standard" "launchType": "standard",
"metaData": {
"customizeData": [
{
"name": "Data3",
"value": "float",
"extra": "$string:mainability_description"
}
]
}
} }
], ],
"deviceType": [ "deviceType": [
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"module": { "module": {
"package": "com.example.third1.entry", "package": "com.example.third1.entry",
"name": "com.example.third1.BmsThirdBundle1", "name": "com.example.third1.BmsThirdBundle1",
"mainAbility": "com.example.third1.AMainAbility", "mainAbility": "com.example.third1.MainAbility",
"colorMode": "dark", "colorMode": "dark",
"deviceType": [ "deviceType": [
"phone" "phone"
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
] ]
} }
], ],
"name": "com.example.third1.AMainAbility", "name": "com.example.third1.MainAbility",
"icon": "$media:icon", "icon": "$media:icon",
"description": "$string:mainability_description", "description": "$string:mainability_description",
"label": "$string:app_name", "label": "$string:app_name",
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
"voip", "voip",
"taskKeeping" "taskKeeping"
], ],
"name": "com.example.third1.AMainAbilityA", "name": "com.example.third1.MainAbilityA",
"icon": "$media:icon", "icon": "$media:icon",
"description": "$string:mainability_description", "description": "$string:mainability_description",
"label": "$string:app_name", "label": "$string:app_name",
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
"label": "$string:shortcut", "label": "$string:shortcut",
"intents": [ "intents": [
{ {
"targetClass": "com.example.third1.AMainAbility", "targetClass": "com.example.third1.MainAbility",
"targetBundle": "com.example.third1" "targetBundle": "com.example.third1"
} }
] ]
......
...@@ -106,8 +106,13 @@ ...@@ -106,8 +106,13 @@
"type": "float", "type": "float",
"description": "$string:mainability_description" "description": "$string:mainability_description"
}], }],
"customizeData": [{ "customizeData": [
}] {
"name": "vendorName",
"value": "vendorValue",
"extra": "vendorcustomizeData"
}
]
} }
} }
], ],
......
...@@ -34,7 +34,16 @@ ...@@ -34,7 +34,16 @@
"label": "$string:app_name", "label": "$string:app_name",
"type": "page", "type": "page",
"homeAbility": false, "homeAbility": false,
"launchType": "standard" "launchType": "standard",
"metaData": {
"customizeData": [
{
"name": "Data2",
"value": "float",
"extra": "$string:mainability_description"
}
]
}
} }
], ],
"deviceType": [ "deviceType": [
......
...@@ -122,7 +122,7 @@ it('ACTS_ZipFile_0300', 0, async function (done) { ...@@ -122,7 +122,7 @@ it('ACTS_ZipFile_0300', 0, async function (done) {
/* /*
* @tc.number: ACTS_ZipFile_0400 * @tc.number: ACTS_ZipFile_0400
* @tc.name: zipFile * @tc.name: zipFile
* @tc.desc: The ouput file is a directory that does not exist * @tc.desc: The output file is a directory that does not exist
*/ */
it('ACTS_ZipFile_0400', 0, async function (done) { it('ACTS_ZipFile_0400', 0, async function (done) {
console.log("==================ACTS_ZipFile_0400 start=================="); console.log("==================ACTS_ZipFile_0400 start==================");
......
...@@ -455,7 +455,7 @@ HWTEST_F(ActsZlibTest, ActsZlibTestSync, Function | MediumTest | Level2) ...@@ -455,7 +455,7 @@ HWTEST_F(ActsZlibTest, ActsZlibTestSync, Function | MediumTest | Level2)
inflateSync(&d_stream); inflateSync(&d_stream);
inflate(&d_stream, Z_FINISH); inflate(&d_stream, Z_FINISH);
inflateEnd(&d_stream); inflateEnd(&d_stream);
printf("after inflateSync: hel%s\n", reinterpret_cast<char *>(uncompr)); printf("after inflateSync: help%s\n", reinterpret_cast<char *>(uncompr));
free(compr); free(compr);
free(uncompr); free(uncompr);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册