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

!4712 XTS-3.1release元能力失败用例适配

Merge pull request !4712 from chengxingzhen/OpenHarmony-3.1-Release
......@@ -288,7 +288,7 @@ export default function getHapModuleInfoJsunit() {
expect(info.systemApp).assertEqual(true);
expect(info.enabled).assertEqual(true);
expect(info.label).assertEqual("$string:entry_MainAbility");
expect(info.icon).assertEqual("$media:icon");
expect(info.icon).assertEqual("");
expect(info.process).assertEqual("com.ohos.acecollaboration");
expect(info.supportedModes).assertEqual(0);
expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/" +
......
......@@ -94,7 +94,7 @@ export default function getHapModuleInfoJsunit() {
for (var k = 0; k < data.deviceTypes.length; k++) {
console.log(msg + "getHapModuleInfo data.deviceTypes[" + k + "] : " + data.deviceTypes[k]);
}
console.log(msg + "checkHapModuleInfo abilityInfos length : " + data.abilityInfos.length);
console.log(msg + "checkHapModuleInfo abilityInfos length : " + data.abilityInfo.length);
console.log(msg + "checkHapModuleInfo moduleName : " + data.moduleName);
console.log(msg + "checkHapModuleInfo mainAbilityName : " + data.mainAbilityName);
console.log(msg + "checkHapModuleInfo installationFree : " + data.installationFree);
......@@ -110,23 +110,23 @@ export default function getHapModuleInfoJsunit() {
expect(typeof (data.supportedModes)).assertEqual("number");
expect(Array.isArray(data.reqCapabilities)).assertEqual(true);
expect(Array.isArray(data.deviceTypes)).assertEqual(true);
expect(Array.isArray(data.abilityInfos)).assertEqual(true);
expect(Array.isArray(data.abilityInfo)).assertEqual(true);
expect(typeof (data.moduleName)).assertEqual("string");
expect(typeof (data.mainAbilityName)).assertEqual("string");
expect(typeof (data.installationFree)).assertEqual("boolean");
expect(data.name).assertEqual("com.ohos.acecollaboration");
expect(data.name).assertEqual("com.ohos.acecollaboration.MyApplication");
expect(data.description).assertEqual("");
expect(data.descriptionId).assertEqual(0);
expect(data.icon).assertEqual("$media:icon");
expect(data.label).assertEqual("$string:entry_MainAbility");
expect(data.labelId).assertEqual(0);
expect(data.iconId).assertEqual(0);
expect(data.labelId).assertEqual(16777224);
expect(data.iconId).assertEqual(16777227);
expect(data.backgroundImg).assertEqual("");
expect(data.supportedModes).assertEqual(0);
expect(data.deviceTypes[0]).assertEqual("phone");
checkAbilityInfo(msg,data.abilityInfos[0]);
checkAbilityInfo(msg,data.abilityInfo[0]);
expect(data.moduleName).assertEqual("entry")
expect(data.mainAbilityName).assertEqual("");
expect(data.mainAbilityName).assertEqual("com.ohos.acecollaboration.MainAbility");
expect(data.installationFree).assertEqual(false);
console.log(msg + "---checkHapModuleInfo End---");
}
......
......@@ -20,6 +20,7 @@
"module": {
"package": "com.example.actsfeatureabilitytest",
"name": ".MyApplication",
"mainAbility": "com.example.actsfeatureabilitytest.MainAbility",
"deviceType": [
"phone"
],
......
......@@ -847,7 +847,7 @@ describe('ActsFeatureAbilityTest', function () {
expect(info.enabled).assertEqual(true);
expect(info.label).assertEqual("$string:app_name");
// expect(info.labelId).assertEqual(0); //create by DevEco when building HAP.
expect(info.icon).assertEqual("$media:icon");
expect(info.icon).assertEqual('');
// expect(info.iconId).assertEqual(0); //create by DevEco when building HAP.
expect(info.process).assertEqual("processTest");
expect(info.supportedModes).assertEqual(0);
......@@ -1060,7 +1060,7 @@ describe('ActsFeatureAbilityTest', function () {
// checkAbilityInfo
function checkAbilityInfo(data) {
console.info("checkAbilityInfo start " + data);
console.info("checkAbilityInfo start " + JSON.stringify(data));
expect(typeof (data)).assertEqual("object");
expect(typeof (data.bundleName)).assertEqual("string");
......@@ -1104,7 +1104,7 @@ describe('ActsFeatureAbilityTest', function () {
expect(data.moduleName).assertEqual("entry");
expect(data.process).assertEqual("processTestAbility");
expect(data.targetAbility).assertEqual("");
expect(data.backgroundModes).assertEqual(0);
expect(data.backgroundModes).assertEqual(1);
expect(data.isVisible).assertEqual(true);
expect(data.formEnabled).assertEqual(false);
expect(data.type).assertEqual(1);
......@@ -1185,20 +1185,20 @@ describe('ActsFeatureAbilityTest', function () {
expect(typeof (data.moduleName)).assertEqual("string");
expect(typeof (data.mainAbilityName)).assertEqual("string");
expect(typeof (data.installationFree)).assertEqual("boolean");
expect(data.name).assertEqual("com.example.actsfeatureabilitytest");
expect(data.name).assertEqual("com.example.actsfeatureabilitytest.MyApplication");
expect(data.description).assertEqual("descriptionTest");
expect(data.descriptionId).assertEqual(0);
expect(data.icon).assertEqual("$media:icon");
expect(data.label).assertEqual("$string:app_name");
expect(data.labelId).assertEqual(0);
expect(data.iconId).assertEqual(0);
expect(data.labelId).assertEqual(16777216);
expect(data.iconId).assertEqual(16777219);
expect(data.backgroundImg).assertEqual("");
expect(data.supportedModes).assertEqual(0);
expect(data.reqCapabilities[0]).assertEqual("reqCapabilitiesTest1");
expect(data.reqCapabilities[1]).assertEqual("reqCapabilitiesTest2");
expect(data.deviceTypes[0]).assertEqual("phone");
expect(data.moduleName).assertEqual("entry")
expect(data.mainAbilityName).assertEqual("");
expect(data.mainAbilityName).assertEqual("com.example.actsfeatureabilitytest.MainAbility");
expect(data.installationFree).assertEqual(false);
console.info("checkHapModuleInfo end " + data);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册