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

!7094 entryDir and moduleSourceDir is empty

Merge pull request !7094 from zhoujun62/my_xts_acts
......@@ -277,11 +277,8 @@ export default function getHapModuleInfoJsunit() {
expect(typeof (info.iconId)).assertEqual("string");
expect(typeof (info.process)).assertEqual("string");
expect(typeof (info.supportedModes)).assertEqual("number");
expect(Array.isArray(info.moduleSourceDirs)).assertEqual(true);
expect(Array.isArray(info.permissions)).assertEqual(true);
expect(Array.isArray(info.moduleInfos)).assertEqual(true);
expect(typeof (info.entryDir)).assertEqual("string");
expect(info.name).assertEqual("com.ohos.acecollaboration");
expect(info.description).assertEqual("");
expect(info.descriptionId).assertEqual(0);
......@@ -291,38 +288,20 @@ export default function getHapModuleInfoJsunit() {
expect(info.icon).assertEqual("$media:icon");
expect(info.process).assertEqual("com.ohos.acecollaboration");
expect(info.supportedModes).assertEqual(0);
expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.ohos.acecollaboration");
if (info.moduleSourceDirs.length == 1){
expect(info.moduleInfos[0].moduleName).assertEqual("entry");
expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.ohos.acecollaboration");
}else if(info.moduleSourceDirs.length == 2) {
} else if(info.moduleSourceDirs.length == 2) {
if (info.moduleInfos[0].moduleName == "myapplication1") {
expect(info.moduleInfos[0].moduleName).assertEqual("myapplication1");
expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.example.myapplication1");
expect(info.moduleInfos[1].moduleName).assertEqual("entry");
expect(info.moduleInfos[1].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.ohos.acecollaboration");
}else{
} else {
expect(info.moduleInfos[0].moduleName).assertEqual("myapplication2");
expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.example.myapplication2");
expect(info.moduleInfos[1].moduleName).assertEqual("entry");
expect(info.moduleInfos[1].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.ohos.acecollaboration");
}
}else {
} else if (info.moduleSourceDirs.length == 3) {
expect(info.moduleInfos[0].moduleName).assertEqual("myapplication1");
expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.example.myapplication1");
expect(info.moduleInfos[1].moduleName).assertEqual("myapplication2");
expect(info.moduleInfos[1].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.example.myapplication2");
expect(info.moduleInfos[2].moduleName).assertEqual("entry");
expect(info.moduleInfos[2].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.ohos.acecollaboration");
}
console.log(msg + "---checkApplicationInfo End--- ");
......
......@@ -85,10 +85,8 @@ export default function abilityTest() {
expect(typeof (data.iconId)).assertEqual("string");
expect(typeof (data.process)).assertEqual("string");
expect(typeof (data.supportedModes)).assertEqual("number");
expect(Array.isArray(data.moduleSourceDirs)).assertEqual(true);
expect(Array.isArray(data.permissions)).assertEqual(true);
expect(Array.isArray(data.moduleInfos)).assertEqual(true);
expect(typeof (data.entryDir)).assertEqual("string");
expect(typeof (data.codePath)).assertEqual("string");
expect(typeof (data.removable)).assertEqual("boolean");
......@@ -104,15 +102,8 @@ export default function abilityTest() {
expect(data.iconId.length).assertLarger(0);
expect(data.process).assertEqual("com.example.staticabilitystagecontext");
expect(data.supportedModes).assertEqual(0);
expect(data.moduleSourceDirs.length).assertEqual(1);
expect(data.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/" +
"com.example.staticabilitystagecontext/com.example.staticabilitystagecontext");
expect(data.moduleInfos.length).assertEqual(1);
expect(data.moduleInfos[0].moduleName).assertEqual("com.example.staticabilitystagecontext");
expect(data.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.example.staticabilitystagecontext/com.example.staticabilitystagecontext");
expect(data.entryDir).assertEqual("/data/app/el1/bundle/public/" +
"com.example.staticabilitystagecontext/com.example.staticabilitystagecontext");
expect(data.codePath).assertEqual("/data/app/el1/bundle/public/" +
"com.example.staticabilitystagecontext");
expect(data.removable).assertEqual(true);
......@@ -174,4 +165,4 @@ export default function abilityTest() {
console.log("checkHapModuleInfo end " + data);
}
})
}
\ No newline at end of file
}
......@@ -270,10 +270,8 @@ export default function abilityTest() {
expect(typeof (data.iconId)).assertEqual("string");
expect(typeof (data.process)).assertEqual("string");
expect(typeof (data.supportedModes)).assertEqual("number");
expect(Array.isArray(data.moduleSourceDirs)).assertEqual(true);
expect(Array.isArray(data.permissions)).assertEqual(true);
expect(Array.isArray(data.moduleInfos)).assertEqual(true);
expect(typeof (data.entryDir)).assertEqual("string");
expect(typeof (data.codePath)).assertEqual("string");
expect(typeof (data.removable)).assertEqual("boolean");
console.log("checkApplicationInfo_expect_typeof_end")
......@@ -288,15 +286,8 @@ export default function abilityTest() {
expect(data.iconId.length).assertLarger(0);
expect(data.process).assertEqual("com.example.staticinfomationquery");
expect(data.supportedModes).assertEqual(0);
expect(data.moduleSourceDirs.length).assertEqual(1);
expect(data.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/" +
"com.example.staticinfomationquery/com.example.staticinfomationquery");
expect(data.moduleInfos.length).assertEqual(1);
expect(data.moduleInfos[0].moduleName).assertEqual("com.example.staticinfomationquery");
expect(data.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.example.staticinfomationquery/com.example.staticinfomationquery");
expect(data.entryDir).assertEqual("/data/app/el1/bundle/public/" +
"com.example.staticinfomationquery/com.example.staticinfomationquery");
expect(data.codePath).assertEqual("/data/app/el1/bundle/public/com.example.staticinfomationquery")
expect(data.removable).assertEqual(true);
console.log("checkApplicationInfo end " + data);
......@@ -358,4 +349,4 @@ export default function abilityTest() {
console.log("checkHapModuleInfo end " + data);
}
})
}
\ No newline at end of file
}
......@@ -891,10 +891,8 @@ describe('ActsFeatureAbilityTest', function () {
expect(typeof (info.iconId)).assertEqual("string");
expect(typeof (info.process)).assertEqual("string");
expect(typeof (info.supportedModes)).assertEqual("number");
expect(Array.isArray(info.moduleSourceDirs)).assertEqual(true);
expect(Array.isArray(info.permissions)).assertEqual(true);
expect(Array.isArray(info.moduleInfos)).assertEqual(true);
expect(typeof (info.entryDir)).assertEqual("string");
expect(info.name).assertEqual("com.example.actsfeatureabilitytest");
expect(info.description).assertEqual("descriptionTest");
......@@ -907,13 +905,7 @@ describe('ActsFeatureAbilityTest', function () {
// expect(info.iconId).assertEqual(0); //create by DevEco when building HAP.
expect(info.process).assertEqual("com.example.actsfeatureabilitytest");
expect(info.supportedModes).assertEqual(0);
expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/" +
"com.example.actsfeatureabilitytest/com.example.actsfeatureabilitytest");
expect(info.moduleInfos[0].moduleName).assertEqual("entry");
expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.example.actsfeatureabilitytest/com.example.actsfeatureabilitytest");
expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/" +
"com.example.actsfeatureabilitytest/com.example.actsfeatureabilitytest");
console.info("getApplicationInfo : end")
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册