提交 0143d464 编写于 作者: S shilei

fix xts testcase

Signed-off-by: Nshilei <shilei91@huawei.com>
Change-Id: I6c5980a2a651edddf9a9c99d1d2a3acc7339755a
上级 c8d5c589
...@@ -158,7 +158,7 @@ describe('ActsBmsQueryAbilityByWant', function () { ...@@ -158,7 +158,7 @@ describe('ActsBmsQueryAbilityByWant', function () {
expect(data.permissions.length).assertEqual(0); expect(data.permissions.length).assertEqual(0);
expect(data.deviceCapabilities.length).assertEqual(0); expect(data.deviceCapabilities.length).assertEqual(0);
expect(data.deviceTypes[0]).assertEqual('phone'); expect(data.deviceTypes[0]).assertEqual('phone');
expect(data.process).assertEqual(''); expect(data.process).assertEqual(SYSTEM_NAME);
expect(data.uri).assertEqual(''); expect(data.uri).assertEqual('');
expect(data.bundleName).assertEqual(SYSTEM_NAME); expect(data.bundleName).assertEqual(SYSTEM_NAME);
expect(data.moduleName).assertEqual("entry"); expect(data.moduleName).assertEqual("entry");
......
...@@ -54,7 +54,7 @@ describe('ActsBmsJsTest', function () { ...@@ -54,7 +54,7 @@ describe('ActsBmsJsTest', function () {
expect(abilityInfo1.isVisible).assertEqual(true); expect(abilityInfo1.isVisible).assertEqual(true);
expect(abilityInfo1.permissions.length).assertEqual(0); expect(abilityInfo1.permissions.length).assertEqual(0);
expect(abilityInfo1.deviceTypes[0]).assertEqual('phone'); expect(abilityInfo1.deviceTypes[0]).assertEqual('phone');
expect(abilityInfo1.process).assertEqual(""); expect(abilityInfo1.process).assertEqual(BUNDLE_NAME2);
expect(abilityInfo1.uri).assertEqual(""); expect(abilityInfo1.uri).assertEqual("");
expect(abilityInfo1.bundleName).assertEqual(BUNDLE_NAME2); expect(abilityInfo1.bundleName).assertEqual(BUNDLE_NAME2);
expect(abilityInfo1.moduleName).assertEqual("entry"); expect(abilityInfo1.moduleName).assertEqual("entry");
...@@ -130,7 +130,7 @@ describe('ActsBmsJsTest', function () { ...@@ -130,7 +130,7 @@ describe('ActsBmsJsTest', function () {
expect(abilityInfo1.isVisible).assertEqual(true); expect(abilityInfo1.isVisible).assertEqual(true);
expect(abilityInfo1.permissions.length).assertEqual(0); expect(abilityInfo1.permissions.length).assertEqual(0);
expect(abilityInfo1.deviceTypes[0]).assertEqual('phone'); expect(abilityInfo1.deviceTypes[0]).assertEqual('phone');
expect(abilityInfo1.process).assertEqual(""); expect(abilityInfo1.process).assertEqual(BUNDLE_NAME4);
expect(abilityInfo1.uri).assertEqual(""); expect(abilityInfo1.uri).assertEqual("");
expect(abilityInfo1.bundleName).assertEqual(BUNDLE_NAME4); expect(abilityInfo1.bundleName).assertEqual(BUNDLE_NAME4);
expect(abilityInfo1.moduleName).assertEqual("entry"); expect(abilityInfo1.moduleName).assertEqual("entry");
...@@ -173,7 +173,7 @@ describe('ActsBmsJsTest', function () { ...@@ -173,7 +173,7 @@ describe('ActsBmsJsTest', function () {
expect(abilityInfo1.isVisible).assertEqual(true); expect(abilityInfo1.isVisible).assertEqual(true);
expect(abilityInfo1.permissions.length).assertEqual(0); expect(abilityInfo1.permissions.length).assertEqual(0);
expect(abilityInfo1.deviceTypes[0]).assertEqual('phone'); expect(abilityInfo1.deviceTypes[0]).assertEqual('phone');
expect(abilityInfo1.process).assertEqual(""); expect(abilityInfo1.process).assertEqual(BUNDLE_NAME5);
expect(abilityInfo1.uri).assertEqual(""); expect(abilityInfo1.uri).assertEqual("");
expect(abilityInfo1.bundleName).assertEqual(BUNDLE_NAME5); expect(abilityInfo1.bundleName).assertEqual(BUNDLE_NAME5);
expect(abilityInfo1.moduleName).assertEqual("entry"); expect(abilityInfo1.moduleName).assertEqual("entry");
...@@ -205,7 +205,7 @@ describe('ActsBmsJsTest', function () { ...@@ -205,7 +205,7 @@ describe('ActsBmsJsTest', function () {
expect(info.isVisible).assertEqual(true); expect(info.isVisible).assertEqual(true);
expect(info.permissions.length).assertEqual(0); expect(info.permissions.length).assertEqual(0);
expect(info.deviceTypes[0]).assertEqual('phone'); expect(info.deviceTypes[0]).assertEqual('phone');
expect(info.process).assertEqual(""); expect(info.process).assertEqual(BUNDLE_NAME3);
expect(info.uri).assertEqual(""); expect(info.uri).assertEqual("");
expect(info.bundleName).assertEqual(BUNDLE_NAME3); expect(info.bundleName).assertEqual(BUNDLE_NAME3);
expect(info.moduleName).assertEqual("entry"); expect(info.moduleName).assertEqual("entry");
......
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
"autoDesignWidth": false "autoDesignWidth": false
} }
} }
] ],
"description":"$string:entry_description"
} }
} }
\ No newline at end of file
...@@ -232,7 +232,7 @@ export default function GetabilityInfo() { ...@@ -232,7 +232,7 @@ export default function GetabilityInfo() {
expect(Array.isArray(data.deviceCapabilities)).assertEqual(true); expect(Array.isArray(data.deviceCapabilities)).assertEqual(true);
expect(data.deviceTypes[0]).assertEqual("phone"); expect(data.deviceTypes[0]).assertEqual("phone");
expect(typeof (data.process)).assertEqual("string"); expect(typeof (data.process)).assertEqual("string");
expect(data.process).assertEqual(""); expect(data.process).assertEqual("com.open.harmony.packagemag");
expect(typeof (data.uri)).assertEqual("string"); expect(typeof (data.uri)).assertEqual("string");
expect(data.uri).assertEqual(""); expect(data.uri).assertEqual("");
expect(data.moduleName).assertEqual("entry"); expect(data.moduleName).assertEqual("entry");
...@@ -251,7 +251,7 @@ export default function GetabilityInfo() { ...@@ -251,7 +251,7 @@ export default function GetabilityInfo() {
expect(typeof (info.accessTokenId)).assertEqual("number"); expect(typeof (info.accessTokenId)).assertEqual("number");
expect(info.accessTokenId > 0).assertTrue(); expect(info.accessTokenId > 0).assertTrue();
expect(typeof (info.description)).assertEqual("string"); expect(typeof (info.description)).assertEqual("string");
expect(info.description).assertEqual("$string:mainability_description"); expect(info.description).assertEqual("$string:entry_description");
expect(typeof (info.descriptionId)).assertEqual("number"); expect(typeof (info.descriptionId)).assertEqual("number");
expect(info.descriptionId > 0).assertTrue(); expect(info.descriptionId > 0).assertTrue();
expect(typeof (info.icon)).assertEqual("string"); expect(typeof (info.icon)).assertEqual("string");
...@@ -268,7 +268,7 @@ export default function GetabilityInfo() { ...@@ -268,7 +268,7 @@ export default function GetabilityInfo() {
expect(typeof (info.supportedModes)).assertEqual("number"); expect(typeof (info.supportedModes)).assertEqual("number");
expect(info.supportedModes).assertEqual(0); expect(info.supportedModes).assertEqual(0);
expect(typeof (info.process)).assertEqual("string"); expect(typeof (info.process)).assertEqual("string");
expect(info.process).assertEqual(""); expect(info.process).assertEqual("com.open.harmony.packagemag");
expect(Array.isArray(info.moduleSourceDirs)).assertEqual(true); expect(Array.isArray(info.moduleSourceDirs)).assertEqual(true);
expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.open.harmony.packagemag/com.open.harmony.packagemag"); expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.open.harmony.packagemag/com.open.harmony.packagemag");
expect(Array.isArray(info.permissions)).assertEqual(true); expect(Array.isArray(info.permissions)).assertEqual(true);
...@@ -282,7 +282,7 @@ export default function GetabilityInfo() { ...@@ -282,7 +282,7 @@ export default function GetabilityInfo() {
expect(data.icon).assertEqual("$media:icon"); expect(data.icon).assertEqual("$media:icon");
expect(data.isVisible).assertEqual(true); expect(data.isVisible).assertEqual(true);
expect(data.deviceTypes[0]).assertEqual("phone"); expect(data.deviceTypes[0]).assertEqual("phone");
expect(data.process).assertEqual(""); expect(data.process).assertEqual("com.example.third1");
expect(data.uri).assertEqual(""); expect(data.uri).assertEqual("");
expect(data.moduleName).assertEqual("entry"); expect(data.moduleName).assertEqual("entry");
expect(data.type).assertEqual(1); expect(data.type).assertEqual(1);
...@@ -308,7 +308,7 @@ export default function GetabilityInfo() { ...@@ -308,7 +308,7 @@ export default function GetabilityInfo() {
expect(info.name).assertEqual("com.example.third1"); expect(info.name).assertEqual("com.example.third1");
expect(info.codePath).assertEqual("/data/app/el1/bundle/public/com.example.third1"); expect(info.codePath).assertEqual("/data/app/el1/bundle/public/com.example.third1");
expect(info.accessTokenId > 0).assertTrue(); expect(info.accessTokenId > 0).assertTrue();
expect(info.description).assertEqual("$string:mainability_description"); expect(info.description).assertEqual("$string:entry_description");
expect(info.descriptionId > 0).assertTrue(); expect(info.descriptionId > 0).assertTrue();
expect(info.icon).assertEqual("$media:icon"); expect(info.icon).assertEqual("$media:icon");
expect(info.iconId > 0).assertTrue(); expect(info.iconId > 0).assertTrue();
...@@ -317,7 +317,7 @@ export default function GetabilityInfo() { ...@@ -317,7 +317,7 @@ export default function GetabilityInfo() {
expect(info.systemApp).assertEqual(false); expect(info.systemApp).assertEqual(false);
expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.example.third1/com.example.third1.entry"); 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("com.example.third1");
expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.example.third1/com.example.third1.entry"); expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.example.third1/com.example.third1.entry");
expect(JSON.stringify(info.metaData)).assertEqual("{}"); expect(JSON.stringify(info.metaData)).assertEqual("{}");
expect(JSON.stringify(info.metadata)).assertEqual("{}"); expect(JSON.stringify(info.metadata)).assertEqual("{}");
......
...@@ -305,7 +305,7 @@ export default function applicationBundleJsunit() { ...@@ -305,7 +305,7 @@ export default function applicationBundleJsunit() {
console.info(msg + JSON.stringify(data[i])); console.info(msg + JSON.stringify(data[i]));
expect(data[i].name).assertEqual('com.open.harmony.packagemag'); expect(data[i].name).assertEqual('com.open.harmony.packagemag');
expect(data[i].codePath).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag'); expect(data[i].codePath).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag');
expect(data[i].description).assertEqual('$string:mainability_description'); expect(data[i].description).assertEqual('$string:entry_description');
if (data[i].descriptionId !== 0) { if (data[i].descriptionId !== 0) {
expect(data[i].descriptionId > 0).assertEqual(true); expect(data[i].descriptionId > 0).assertEqual(true);
} }
...@@ -321,7 +321,7 @@ export default function applicationBundleJsunit() { ...@@ -321,7 +321,7 @@ export default function applicationBundleJsunit() {
}; };
expect(data[i].systemApp).assertEqual(true); expect(data[i].systemApp).assertEqual(true);
expect(data[i].supportedModes).assertEqual(0); expect(data[i].supportedModes).assertEqual(0);
expect(data[i].process).assertEqual(""); expect(data[i].process).assertEqual('com.open.harmony.packagemag');
expect(data[i].entryDir).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag' + expect(data[i].entryDir).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag' +
'/com.open.harmony.packagemag'); '/com.open.harmony.packagemag');
expect(data[i].enabled).assertEqual(true); expect(data[i].enabled).assertEqual(true);
......
...@@ -372,7 +372,7 @@ export default function applicationBundleJsunit() { ...@@ -372,7 +372,7 @@ export default function applicationBundleJsunit() {
expect(data.name).assertEqual('com.open.harmony.packagemag'); expect(data.name).assertEqual('com.open.harmony.packagemag');
expect(data.codePath).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag'); expect(data.codePath).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag');
expect(data.accessTokenId > 0).assertEqual(true); expect(data.accessTokenId > 0).assertEqual(true);
expect(data.description).assertEqual('$string:mainability_description'); expect(data.description).assertEqual('$string:entry_description');
expect(data.descriptionId > 0).assertEqual(true); expect(data.descriptionId > 0).assertEqual(true);
expect(data.icon).assertEqual('$media:icon'); expect(data.icon).assertEqual('$media:icon');
expect(data.iconId > 0).assertEqual(true); expect(data.iconId > 0).assertEqual(true);
...@@ -381,7 +381,7 @@ export default function applicationBundleJsunit() { ...@@ -381,7 +381,7 @@ export default function applicationBundleJsunit() {
expect(data.labelId > 0).assertEqual(true); expect(data.labelId > 0).assertEqual(true);
expect(data.systemApp).assertEqual(true); expect(data.systemApp).assertEqual(true);
expect(data.supportedModes).assertEqual(0); expect(data.supportedModes).assertEqual(0);
expect(data.process).assertEqual(""); expect(data.process).assertEqual('com.open.harmony.packagemag');
expect(data.entryDir).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag' + expect(data.entryDir).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag' +
'/com.open.harmony.packagemag'); '/com.open.harmony.packagemag');
expect(data.enabled).assertEqual(true); expect(data.enabled).assertEqual(true);
...@@ -402,7 +402,7 @@ export default function applicationBundleJsunit() { ...@@ -402,7 +402,7 @@ export default function applicationBundleJsunit() {
expect(data.name).assertEqual('com.open.harmony.packagemag'); expect(data.name).assertEqual('com.open.harmony.packagemag');
expect(data.codePath).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag'); expect(data.codePath).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag');
expect(data.accessTokenId > 0).assertEqual(true); expect(data.accessTokenId > 0).assertEqual(true);
expect(data.description).assertEqual('$string:mainability_description'); expect(data.description).assertEqual('$string:entry_description');
expect(data.descriptionId > 0).assertEqual(true); expect(data.descriptionId > 0).assertEqual(true);
expect(data.icon).assertEqual('$media:icon'); expect(data.icon).assertEqual('$media:icon');
expect(data.iconId > 0).assertEqual(true); expect(data.iconId > 0).assertEqual(true);
...@@ -411,7 +411,7 @@ export default function applicationBundleJsunit() { ...@@ -411,7 +411,7 @@ export default function applicationBundleJsunit() {
expect(data.labelId > 0).assertEqual(true); expect(data.labelId > 0).assertEqual(true);
expect(data.systemApp).assertEqual(true); expect(data.systemApp).assertEqual(true);
expect(data.supportedModes).assertEqual(0); expect(data.supportedModes).assertEqual(0);
expect(data.process).assertEqual(""); expect(data.process).assertEqual('com.open.harmony.packagemag');
expect(data.entryDir).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag' + expect(data.entryDir).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag' +
'/com.open.harmony.packagemag'); '/com.open.harmony.packagemag');
expect(data.enabled).assertEqual(true); expect(data.enabled).assertEqual(true);
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
{ {
"name": "description_serviceability", "name": "description_serviceability",
"value": "hap sample empty service" "value": "hap sample empty service"
},
{
"name": "entry_description",
"value": "entry_description"
} }
] ]
} }
\ No newline at end of file
...@@ -171,6 +171,7 @@ ...@@ -171,6 +171,7 @@
"grantMode": "system_grant", "grantMode": "system_grant",
"availableScope": ["signature"] "availableScope": ["signature"]
} }
] ],
"description":"$string:entry_description"
} }
} }
\ No newline at end of file
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
{ {
"name": "mainability_description", "name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability" "value": "JS_Phone_Empty Feature Ability"
},
{
"name": "entry_description",
"value": "entry_description"
} }
] ]
} }
\ No newline at end of file
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
"description": "BMS_PERMISSION_MUSIC permission in detail", "description": "BMS_PERMISSION_MUSIC permission in detail",
"label": "BMS_PERMISSION_MUSIC permission" "label": "BMS_PERMISSION_MUSIC permission"
} }
] ],
"description":"$string:entry_description"
} }
} }
\ No newline at end of file
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
{ {
"name": "mainability_description", "name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability" "value": "JS_Phone_Empty Feature Ability"
},
{
"name": "entry_description",
"value": "entry_description"
} }
] ]
} }
\ No newline at end of file
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
"description": "BMS_PERMISSION_CAMERA permission in detail", "description": "BMS_PERMISSION_CAMERA permission in detail",
"label": "BMS_PERMISSION_CAMERA permission" "label": "BMS_PERMISSION_CAMERA permission"
} }
] ],
"description":"$string:entry_description"
} }
} }
\ No newline at end of file
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
{ {
"name": "mainability_description", "name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability" "value": "JS_Phone_Empty Feature Ability"
},
{
"name": "entry_description",
"value": "entry_description"
} }
] ]
} }
\ No newline at end of file
...@@ -102,6 +102,7 @@ ...@@ -102,6 +102,7 @@
"value":"metaDataValue", "value":"metaDataValue",
"extra":"$string:app_name" "extra":"$string:app_name"
}] }]
} },
"description":"$string:entry_description"
} }
} }
\ No newline at end of file
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
{ {
"name": "mainability_description", "name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability" "value": "JS_Phone_Empty Feature Ability"
},
{
"name": "entry_description",
"value": "entry_description"
} }
] ]
} }
\ No newline at end of file
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
"description": "BMS_PERMISSION_WECHAT permission in detail", "description": "BMS_PERMISSION_WECHAT permission in detail",
"label": "BMS_PERMISSION_WECHAT permission" "label": "BMS_PERMISSION_WECHAT permission"
} }
] ],
"description":"$string:entry_description"
} }
} }
\ No newline at end of file
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
{ {
"name": "mainability_description", "name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability" "value": "JS_Phone_Empty Feature Ability"
},
{
"name": "entry_description",
"value": "entry_description"
} }
] ]
} }
\ No newline at end of file
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
"description": "BMS_PERMISSION_MUSIC permission in detail", "description": "BMS_PERMISSION_MUSIC permission in detail",
"label": "BMS_PERMISSION_MUSIC permission" "label": "BMS_PERMISSION_MUSIC permission"
} }
] ],
"description":"$string:entry_description"
} }
} }
\ No newline at end of file
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
{ {
"name": "mainability_description", "name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability" "value": "JS_Phone_Empty Feature Ability"
},
{
"name": "entry_description",
"value": "entry_description"
} }
] ]
} }
\ No newline at end of file
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
"description": "BMS_PERMISSION_CAMERA permission in detail", "description": "BMS_PERMISSION_CAMERA permission in detail",
"label": "BMS_PERMISSION_CAMERA permission" "label": "BMS_PERMISSION_CAMERA permission"
} }
] ],
"description":"$string:entry_description"
} }
} }
\ No newline at end of file
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
{ {
"name": "mainability_description", "name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability" "value": "JS_Phone_Empty Feature Ability"
},
{
"name": "entry_description",
"value": "entry_description"
} }
] ]
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册