提交 bc519597 编写于 作者: J junyi233

ApplicaitonInfo 新增labelIndex和iconIndex字段

Signed-off-by: Njunyi233 <zhengjun29@huawei.com>
上级 6044d68b
...@@ -558,7 +558,7 @@ export default function actsBmsJsModuleNameTest() { ...@@ -558,7 +558,7 @@ export default function actsBmsJsModuleNameTest() {
permissions: [], deviceTypes: [], deviceCapabilities: [], readPermission: "", writePermission: "", permissions: [], deviceTypes: [], deviceCapabilities: [], readPermission: "", writePermission: "",
applicationInfo: { applicationInfo: {
name: "", description: "", descriptionId: 0, systemApp: true, enabled: true, label: "", name: "", description: "", descriptionId: 0, systemApp: true, enabled: true, label: "",
labelId: "", icon: "", iconId: "", process: "", supportedModes: 0, moduleSourceDirs: [], labelId: "", labelIndex: "", icon: "", iconId: "", iconIndex: "", process: "", supportedModes: 0, moduleSourceDirs: [],
permissions: [], moduleInfos: [], entryDir: "", codePath: "", metaData: map1, metadata: map2, permissions: [], moduleInfos: [], entryDir: "", codePath: "", metaData: map1, metadata: map2,
removable: true, accessTokenId: 0, uid: 0, entityType: "", fingerprint: "", removable: true, accessTokenId: 0, uid: 0, entityType: "", fingerprint: "",
iconResource: resource, labelResource: resource, descriptionResource: resource, iconResource: resource, labelResource: resource, descriptionResource: resource,
......
...@@ -269,8 +269,12 @@ export default function actsBmsJsUnPermissionTest() { ...@@ -269,8 +269,12 @@ export default function actsBmsJsUnPermissionTest() {
expect(info.descriptionId).assertEqual(0); expect(info.descriptionId).assertEqual(0);
expect(info.icon).assertEqual("$media:icon"); expect(info.icon).assertEqual("$media:icon");
expect(info.iconId > 0).assertTrue(); expect(info.iconId > 0).assertTrue();
expect(info.iconIndex > 0).assertTrue();
expect(info.iconIndex).assertEqual(info.iconId);
expect(info.label).assertEqual("$string:entry_MainAbility"); expect(info.label).assertEqual("$string:entry_MainAbility");
expect(info.labelId > 0).assertTrue(); expect(info.labelId > 0).assertTrue();
expect(info.labelIndex > 0).assertTrue();
expect(info.labelIndex).assertEqual(info.labelId);
expect(info.systemApp).assertEqual(true); expect(info.systemApp).assertEqual(true);
expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.example.actsbmsetsunpermissiontest/com.example.actsbmsetsunpermissiontest"); expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.example.actsbmsetsunpermissiontest/com.example.actsbmsetsunpermissiontest");
expect(info.supportedModes).assertEqual(0); expect(info.supportedModes).assertEqual(0);
......
...@@ -258,10 +258,16 @@ export default function GetabilityInfo() { ...@@ -258,10 +258,16 @@ export default function GetabilityInfo() {
expect(info.icon).assertEqual("$media:icon"); expect(info.icon).assertEqual("$media:icon");
expect(typeof (info.iconId)).assertEqual("number"); expect(typeof (info.iconId)).assertEqual("number");
expect(info.iconId > 0).assertTrue(); expect(info.iconId > 0).assertTrue();
expect(typeof (info.iconIndex)).assertEqual("number");
expect(info.iconIndex > 0).assertTrue();
expect(info.iconIndex).assertEqual(info.iconId);
expect(typeof (info.label)).assertEqual("string"); expect(typeof (info.label)).assertEqual("string");
expect(info.label).assertEqual("$string:entry_MainAbility"); expect(info.label).assertEqual("$string:entry_MainAbility");
expect(typeof (info.labelId)).assertEqual("number"); expect(typeof (info.labelId)).assertEqual("number");
expect(info.labelId > 0).assertTrue(); expect(info.labelId > 0).assertTrue();
expect(typeof (info.labelIndex)).assertEqual("number");
expect(info.labelIndex > 0).assertTrue();
expect(info.labelIndex).assertEqual(info.labelId);
expect(info.systemApp).assertEqual(true); expect(info.systemApp).assertEqual(true);
expect(typeof (info.entryDir)).assertEqual("string"); expect(typeof (info.entryDir)).assertEqual("string");
expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.open.harmony.packagemag/com.open.harmony.packagemag"); expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.open.harmony.packagemag/com.open.harmony.packagemag");
......
...@@ -226,7 +226,7 @@ export default function isAbilityEnabledETSUnit() { ...@@ -226,7 +226,7 @@ export default function isAbilityEnabledETSUnit() {
permissions: [], deviceTypes: [], deviceCapabilities: [], readPermission: "", writePermission: "", permissions: [], deviceTypes: [], deviceCapabilities: [], readPermission: "", writePermission: "",
applicationInfo: { applicationInfo: {
name: "", description: "", descriptionId: 0, systemApp: true, enabled: true, label: "", name: "", description: "", descriptionId: 0, systemApp: true, enabled: true, label: "",
labelId: "", icon: "", iconId: "", process: "", supportedModes: 0, moduleSourceDirs: [], labelId: "", labelIndex: "", icon: "", iconId: "", iconIndex: "", process: "", supportedModes: 0, moduleSourceDirs: [],
permissions: [], moduleInfos: [], entryDir: "", codePath: "", metaData: map1, metadata: map2, permissions: [], moduleInfos: [], entryDir: "", codePath: "", metaData: map1, metadata: map2,
removable: true, accessTokenId: 0, uid: 0, entityType: "", fingerprint: "", removable: true, accessTokenId: 0, uid: 0, entityType: "", fingerprint: "",
iconResource: resource, labelResource: resource, descriptionResource: resource, iconResource: resource, labelResource: resource, descriptionResource: resource,
......
...@@ -1011,8 +1011,12 @@ export default function QueryExtensionAbilityInfos() { ...@@ -1011,8 +1011,12 @@ export default function QueryExtensionAbilityInfos() {
expect(data[0].applicationInfo.descriptionId).assertLarger(0); expect(data[0].applicationInfo.descriptionId).assertLarger(0);
expect(data[0].applicationInfo.icon).assertEqual("$media:icon"); expect(data[0].applicationInfo.icon).assertEqual("$media:icon");
expect(data[0].applicationInfo.iconId).assertLarger(0); expect(data[0].applicationInfo.iconId).assertLarger(0);
expect(data[0].applicationInfo.iconIndex).assertLarger(0);
expect(data[0].applicationInfo.iconIndex).assertEqual(data[0].applicationInfo.iconId);
expect(data[0].applicationInfo.label).assertEqual("$string:app_name"); expect(data[0].applicationInfo.label).assertEqual("$string:app_name");
expect(data[0].applicationInfo.labelId).assertLarger(0); expect(data[0].applicationInfo.labelId).assertLarger(0);
expect(data[0].applicationInfo.labelIndex).assertLarger(0);
expect(data[0].applicationInfo.labelIndex).assertEqual(data[0].applicationInfo.labelId);
expect(data[0].applicationInfo.systemApp).assertTrue(); expect(data[0].applicationInfo.systemApp).assertTrue();
expect(data[0].applicationInfo.supportedModes).assertEqual(0); expect(data[0].applicationInfo.supportedModes).assertEqual(0);
expect(data[0].applicationInfo.process).assertEqual(""); expect(data[0].applicationInfo.process).assertEqual("");
......
...@@ -301,8 +301,12 @@ export default function getAllApplicationBundleTest() { ...@@ -301,8 +301,12 @@ export default function getAllApplicationBundleTest() {
expect(typeof (data[i].descriptionId)).assertEqual('number'); expect(typeof (data[i].descriptionId)).assertEqual('number');
expect(typeof (data[i].icon)).assertEqual('string'); expect(typeof (data[i].icon)).assertEqual('string');
expect(typeof (data[i].iconId)).assertEqual('number'); expect(typeof (data[i].iconId)).assertEqual('number');
expect(typeof (data[i].iconIndex)).assertEqual('number');
expect(data[i].iconIndex).assertEqual(data[i].iconId);
expect(typeof (data[i].label)).assertEqual('string'); expect(typeof (data[i].label)).assertEqual('string');
expect(typeof (data[i].labelId)).assertEqual('number'); expect(typeof (data[i].labelId)).assertEqual('number');
expect(typeof (data[i].labelIndex)).assertEqual('number');
expect(data[i].labelIndex).assertEqual(data[i].labelId);
expect(typeof (data[i].systemApp)).assertEqual('boolean') expect(typeof (data[i].systemApp)).assertEqual('boolean')
expect(typeof (data[i].supportedModes)).assertEqual('number'); expect(typeof (data[i].supportedModes)).assertEqual('number');
expect(typeof (data[i].process)).assertEqual('string'); expect(typeof (data[i].process)).assertEqual('string');
...@@ -364,8 +368,12 @@ export default function getAllApplicationBundleTest() { ...@@ -364,8 +368,12 @@ export default function getAllApplicationBundleTest() {
expect(data.descriptionId).assertLarger(0); expect(data.descriptionId).assertLarger(0);
expect(data.icon).assertEqual('$media:icon'); expect(data.icon).assertEqual('$media:icon');
expect(data.iconId).assertLarger(0); expect(data.iconId).assertLarger(0);
expect(data.iconIndex).assertLarger(0);
expect(data.iconIndex).assertEqual(data.iconId);
expect(data.label).assertEqual('$string:app_name'); expect(data.label).assertEqual('$string:app_name');
expect(data.labelId).assertLarger(0); expect(data.labelId).assertLarger(0);
expect(data.labelIndex).assertLarger(0);
expect(data.labelIndex).assertEqual(data.labelId);
expect(data.systemApp).assertFalse(); expect(data.systemApp).assertFalse();
expect(data.supportedModes).assertEqual(0); expect(data.supportedModes).assertEqual(0);
expect(data.process).assertEqual(BUNDLE_OTHER); expect(data.process).assertEqual(BUNDLE_OTHER);
......
...@@ -432,8 +432,12 @@ export default function applicationBundleJsunit() { ...@@ -432,8 +432,12 @@ export default function applicationBundleJsunit() {
expect(typeof (data.descriptionId)).assertEqual('number'); expect(typeof (data.descriptionId)).assertEqual('number');
expect(typeof (data.icon)).assertEqual('string'); expect(typeof (data.icon)).assertEqual('string');
expect(typeof (data.iconId)).assertEqual('number'); expect(typeof (data.iconId)).assertEqual('number');
expect(typeof (data.iconIndex)).assertEqual('number');
expect(data.iconIndex).assertEqual(data.iconId);
expect(typeof (data.label)).assertEqual('string'); expect(typeof (data.label)).assertEqual('string');
expect(typeof (data.labelId)).assertEqual('number'); expect(typeof (data.labelId)).assertEqual('number');
expect(typeof (data.labelIndex)).assertEqual('number');
expect(data.labelIndex).assertEqual(data.labelId);
expect(typeof (data.systemApp)).assertEqual('boolean') expect(typeof (data.systemApp)).assertEqual('boolean')
expect(typeof (data.supportedModes)).assertEqual('number'); expect(typeof (data.supportedModes)).assertEqual('number');
expect(typeof (data.process)).assertEqual('string'); expect(typeof (data.process)).assertEqual('string');
...@@ -458,9 +462,13 @@ export default function applicationBundleJsunit() { ...@@ -458,9 +462,13 @@ export default function applicationBundleJsunit() {
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);
expect(data.iconIndex > 0).assertEqual(true);
expect(data.iconIndex).assertEqual(data.iconId);
expect(data.uid > 0).assertEqual(true); expect(data.uid > 0).assertEqual(true);
expect(data.label).assertEqual('$string:entry_MainAbility'); expect(data.label).assertEqual('$string:entry_MainAbility');
expect(data.labelId > 0).assertEqual(true); expect(data.labelId > 0).assertEqual(true);
expect(data.labelIndex > 0).assertEqual(true);
expect(data.labelIndex).assertEqual(data.labelId);
expect(data.systemApp).assertEqual(true); expect(data.systemApp).assertEqual(true);
expect(data.supportedModes).assertEqual(0); expect(data.supportedModes).assertEqual(0);
expect(data.process).assertEqual(BUNDLE_NAME); expect(data.process).assertEqual(BUNDLE_NAME);
...@@ -485,8 +493,12 @@ export default function applicationBundleJsunit() { ...@@ -485,8 +493,12 @@ export default function applicationBundleJsunit() {
expect(data.descriptionId).assertLarger(0); expect(data.descriptionId).assertLarger(0);
expect(data.icon).assertEqual('$media:icon'); expect(data.icon).assertEqual('$media:icon');
expect(data.iconId).assertLarger(0); expect(data.iconId).assertLarger(0);
expect(data.iconIndex).assertLarger(0);
expect(data.iconIndex).assertEqual(data.iconId);
expect(data.label).assertEqual('$string:entry_MainAbility'); expect(data.label).assertEqual('$string:entry_MainAbility');
expect(data.labelId).assertLarger(0); expect(data.labelId).assertLarger(0);
expect(data.labelIndex).assertLarger(0);
expect(data.labelIndex).assertEqual(data.labelId);
expect(data.systemApp).assertTrue(); expect(data.systemApp).assertTrue();
expect(data.supportedModes).assertEqual(0); expect(data.supportedModes).assertEqual(0);
expect(data.process).assertEqual(BUNDLE_NAME); expect(data.process).assertEqual(BUNDLE_NAME);
...@@ -516,8 +528,12 @@ export default function applicationBundleJsunit() { ...@@ -516,8 +528,12 @@ export default function applicationBundleJsunit() {
expect(data.descriptionId).assertLarger(0); expect(data.descriptionId).assertLarger(0);
expect(data.icon).assertEqual('$media:icon'); expect(data.icon).assertEqual('$media:icon');
expect(data.iconId).assertLarger(0); expect(data.iconId).assertLarger(0);
expect(data.iconIndex).assertLarger(0);
expect(data.iconIndex).assertEqual(data.iconId);
expect(data.label).assertEqual('$string:app_name'); expect(data.label).assertEqual('$string:app_name');
expect(data.labelId).assertLarger(0); expect(data.labelId).assertLarger(0);
expect(data.labelIndex).assertLarger(0);
expect(data.labelIndex).assertEqual(data.labelId);
expect(data.systemApp).assertFalse(); expect(data.systemApp).assertFalse();
expect(data.supportedModes).assertEqual(0); expect(data.supportedModes).assertEqual(0);
expect(data.process).assertEqual(BUNDLE_OTHER); expect(data.process).assertEqual(BUNDLE_OTHER);
......
...@@ -627,6 +627,10 @@ describe('ActsBundleManagerTest', function () { ...@@ -627,6 +627,10 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo[i].description.length >= 0).assertTrue(); expect(datainfo[i].description.length >= 0).assertTrue();
expect(datainfo[i].icon.length).assertLarger(0); expect(datainfo[i].icon.length).assertLarger(0);
expect(datainfo[i].label.length).assertLarger(0); expect(datainfo[i].label.length).assertLarger(0);
expect(datainfo[i].iconIndex).assertLarger(0);
expect(datainfo[i].labelIndex).assertLarger(0);
expect(datainfo[i].iconIndex).assertEqual(datainfo[i].iconId);
expect(datainfo[i].labelIndex).assertEqual(datainfo[i].labelId);
} }
expect(datainfo[i].moduleSourceDirs.length).assertLarger(0); expect(datainfo[i].moduleSourceDirs.length).assertLarger(0);
expect(datainfo[i].moduleInfos.length).assertLarger(0); expect(datainfo[i].moduleInfos.length).assertLarger(0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册