diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbmsaccesstokentest/src/main/js/test/ActsBmsAccessTokenTest.test.js b/bundlemanager/bundle_standard/bundlemanager/actsbmsaccesstokentest/src/main/js/test/ActsBmsAccessTokenTest.test.js index e43327dd8a38a8768b4a043a1af34e6076be604e..024b465e5dc7ff7946722181d3a7902d563e911d 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbmsaccesstokentest/src/main/js/test/ActsBmsAccessTokenTest.test.js +++ b/bundlemanager/bundle_standard/bundlemanager/actsbmsaccesstokentest/src/main/js/test/ActsBmsAccessTokenTest.test.js @@ -37,11 +37,11 @@ describe('ActsBmsAccessTokenTest', function () { }); /* - * @tc.number: bms_AccessTokenId_0100 - * @tc.name: test accessTokenId + * @tc.number: BMS_SECURITY_INITIALIZE_0004 + * @tc.name: getAccessTokenIdOfEntry * @tc.desc: get the accessTokenId */ - it('bms_AccessTokenId_0100', 0, async function (done) { + it('getAccessTokenIdOfEntry', 0, async function (done) { await bundle.getApplicationInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId) .then(applicationInfo => { console.info('accessTokenId: ' + applicationInfo.accessTokenId); @@ -55,11 +55,11 @@ describe('ActsBmsAccessTokenTest', function () { }); /* - * @tc.number: bms_AccessTokenId_0200 - * @tc.name: test reqPermissionStates + * @tc.number: SUB_BMS_APPINFO_QUERYPERMISSION_0001 + * @tc.name: getReqPermissionOfEntry * @tc.desc: get the reqPermissions and reqPermissionStates */ - it('bms_AccessTokenId_0200', 0, async function (done) { + it('getReqPermissionOfEntry', 0, async function (done) { await bundle.getBundleInfo(BUNDLE_NAME3, bundle.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION) .then(bundleInfo => { expect(bundleInfo.name).assertEqual(BUNDLE_NAME3); @@ -79,11 +79,11 @@ describe('ActsBmsAccessTokenTest', function () { }); /* - * @tc.number: bms_AccessTokenId_0300 - * @tc.name: test reqPermissionStates + * @tc.number: SUB_BMS_APPINFO_QUERYPERMISSION_0008 + * @tc.name: getReqPermissionUpdateEntry * @tc.desc: get the reqPermissions and reqPermissionStates */ - it('bms_AccessTokenId_0300', 0, async function (done) { + it('getReqPermissionUpdateEntry', 0, async function (done) { await bundle.getBundleInfo(BUNDLE_NAME2, bundle.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION) .then(bundleInfo => { expect(bundleInfo.name).assertEqual(BUNDLE_NAME2); @@ -107,11 +107,11 @@ describe('ActsBmsAccessTokenTest', function () { }); /* - * @tc.number: bms_AccessTokenId_0400 - * @tc.name: test reqPermissionStates + * @tc.number: SUB_BMS_APPINFO_QUERYPERMISSION_0003 + * @tc.name: getReqPermissionUpdateEntryAndFeature * @tc.desc: get the reqPermissions and reqPermissionStates */ - it('bms_AccessTokenId_0400', 0, async function (done) { + it('getReqPermissionUpdateEntryAndFeature', 0, async function (done) { await bundle.getBundleInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION) .then(bundleInfo => { expect(bundleInfo.name).assertEqual(BUNDLE_NAME1); @@ -137,14 +137,14 @@ describe('ActsBmsAccessTokenTest', function () { }); /** - * @tc.number bms_AccessTokenId_0500 - * @tc.name BUNDLE::getBundleInfos + * @tc.number BMS_SECURITY_INITIALIZE_0013 + * @tc.name getAccessTokenIdWithDefault * @tc.desc Test getBundleInfos interfaces with with a flag */ - it("bms_AccessTokenId_0500", 0, async function (done) { + it("getAccessTokenIdWithDefault", 0, async function (done) { await bundle.getApplicationInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_DEFAULT) .then((applicationInfo) => { - console.info("bms_AccessTokenId_0500 accessTokenId: " + applicationInfo.accessTokenId); + console.info("getAccessTokenIdWithDefault accessTokenId: " + applicationInfo.accessTokenId); expect(applicationInfo.name).assertEqual(BUNDLE_NAME1); expect(applicationInfo.accessTokenId).assertLarger(0); done(); @@ -155,14 +155,14 @@ describe('ActsBmsAccessTokenTest', function () { }); /** - * @tc.number bms_AccessTokenId_0600 - * @tc.name BUNDLE::getBundleInfos + * @tc.number BMS_SECURITY_INITIALIZE_0014 + * @tc.name getAccessTokenIdWithGetAbilities * @tc.desc Test getBundleInfos interfaces with a flag */ - it("bms_AccessTokenId_0600", 0, async function (done) { + it("getAccessTokenIdWithGetAbilities", 0, async function (done) { await bundle.getApplicationInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES) .then((applicationInfo) => { - console.info("bms_AccessTokenId_0600 accessTokenId: " + applicationInfo.accessTokenId); + console.info("getAccessTokenIdWithGetAbilities accessTokenId: " + applicationInfo.accessTokenId); expect(applicationInfo.name).assertEqual(BUNDLE_NAME1); expect(applicationInfo.accessTokenId).assertLarger(0); done(); @@ -173,14 +173,14 @@ describe('ActsBmsAccessTokenTest', function () { }); /** - * @tc.number bms_AccessTokenId_0700 - * @tc.name BUNDLE::getBundleInfos + * @tc.number BMS_SECURITY_INITIALIZE_0015 + * @tc.name getAccessTokenIdWithGetPermission * @tc.desc Test getBundleInfos interfaces with a flag */ - it("bms_AccessTokenId_0700", 0, async function (done) { + it("getAccessTokenIdWithGetPermission", 0, async function (done) { await bundle.getApplicationInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION) .then((applicationInfo) => { - console.info("bms_AccessTokenId_0700 accessTokenId: " + applicationInfo.accessTokenId); + console.info("getAccessTokenIdWithGetPermission accessTokenId: " + applicationInfo.accessTokenId); expect(applicationInfo.name).assertEqual(BUNDLE_NAME1); expect(applicationInfo.accessTokenId).assertLarger(0); done(); diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets b/bundlemanager/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets index c9c53e02e64c83c4756f01180de2432a57977804..25556553579cb8866b5b01991d96d52ad8f6a6c0 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets +++ b/bundlemanager/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets @@ -66,335 +66,335 @@ export default function actsBmsJsModuleNameTest() { }); /* - * @tc.number: GetabilityInfo_0100 - * @tc.name: test getAbilityInfo + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0030 + * @tc.name: getAbilityInfoEmptyModule * @tc.desc: test empty moduleName */ - it('GetabilityInfo_0100', 0, async function (done) { + it('getAbilityInfoEmptyModule', 0, async function (done) { await bundle.getAbilityInfo(BUNDLE_NAME, MODULE_NAME1, ABILITY_NAME) .then(data => { expect(data).assertFail(); }).catch((err) => { - console.error('[GetabilityInfo_0100]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[getAbilityInfoEmptyModule]Operation failed. Err: ' + JSON.stringify(err)); expect(err).assertEqual(INVALID_CODE); }); bundle.getAbilityInfo(BUNDLE_NAME, MODULE_NAME1, ABILITY_NAME, (err, data) => { expect(err).assertEqual(INVALID_CODE); if (err) { - console.error('[GetabilityInfo_0100]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[getAbilityInfoEmptyModule]Operation failed. Err: ' + JSON.stringify(err)); } - console.info("'[GetabilityInfo_0100]Return data: " + JSON.stringify(data)); + console.info("'[getAbilityInfoEmptyModule]Return data: " + JSON.stringify(data)); done(); }); }); /* - * @tc.number: GetabilityInfo_0200 - * @tc.name: test getAbilityInfo + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0020 + * @tc.name: getAbilityInfoInvalidModule * @tc.desc: test non-existent moduleName */ - it('GetabilityInfo_0200', 0, async function (done) { + it('getAbilityInfoInvalidModule', 0, async function (done) { await bundle.getAbilityInfo(BUNDLE_NAME, MODULE_NAME2, ABILITY_NAME) .then(data => { expect(data).assertFail(); }).catch((err) => { - console.error('[GetabilityInfo_0200]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[getAbilityInfoInvalidModule]Operation failed. Err: ' + JSON.stringify(err)); expect(err).assertEqual(INVALID_CODE); }); bundle.getAbilityInfo(BUNDLE_NAME, MODULE_NAME2, ABILITY_NAME, (err, data) => { expect(err).assertEqual(INVALID_CODE); if (err) { - console.error('[GetabilityInfo_0200]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[getAbilityInfoInvalidModule]Operation failed. Err: ' + JSON.stringify(err)); } - console.info("'[GetabilityInfo_0200]Return data : " + JSON.stringify(data)); + console.info("'[getAbilityInfoInvalidModule]Return data : " + JSON.stringify(data)); done(); }); }); /* - * @tc.number: GetabilityInfo_0300 - * @tc.name: test getAbilityInfo + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0018 + * @tc.name: getAbilityInfoHasModule * @tc.desc: test existent moduleName */ - it('GetabilityInfo_0300', 0, async function (done) { + it('getAbilityInfoHasModule', 0, async function (done) { await bundle.getAbilityInfo(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME) .then(data => { - console.info('[GetabilityInfo_0300]Return data successful: ' + JSON.stringify(data)); + console.info('[getAbilityInfoHasModule]Return data successful: ' + JSON.stringify(data)); checkDataInfo(data); }).catch((err) => { - console.error('[GetabilityInfo_0300]Operation . Err: ' + JSON.stringify(err)); + console.error('[getAbilityInfoHasModule]Operation . Err: ' + JSON.stringify(err)); expect(err).assertFail(); }); bundle.getAbilityInfo(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME, (err, data) => { checkDataInfo(data); expect(err).assertEqual(SUCCESS_CODE); if (err) { - console.error('[GetabilityInfo_0300]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[getAbilityInfoHasModule]Operation failed. Err: ' + JSON.stringify(err)); } - console.info("'[GetabilityInfo_0300]Return data: " + JSON.stringify(data)); + console.info("'[getAbilityInfoHasModule]Return data: " + JSON.stringify(data)); done(); }); }); /* - * @tc.number: GetAbilityIcon_0100 - * @tc.name: test getAbilityIcon + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0031 + * @tc.name: getAbilityIconEmptyModule * @tc.desc: test empty moduleName */ - it('GetAbilityIcon_0100', 0, async function (done) { + it('getAbilityIconEmptyModule', 0, async function (done) { await bundle.getAbilityIcon(BUNDLE_NAME, MODULE_NAME1, ABILITY_NAME) .then(data => { expect(data).assertFail(); }).catch((err) => { - console.error('[GetAbilityIcon_0100]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[getAbilityIconEmptyModule]Operation failed. Err: ' + JSON.stringify(err)); expect(err).assertEqual(INVALID_CODE); }); bundle.getAbilityIcon(BUNDLE_NAME, MODULE_NAME1, ABILITY_NAME, (err, data) => { expect(err).assertEqual(INVALID_CODE); if (err) { - console.error('[GetAbilityIcon_0100]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[getAbilityIconEmptyModule]Operation failed. Err: ' + JSON.stringify(err)); } - console.info("'[GetAbilityIcon_0100]Return data: " + JSON.stringify(data)); + console.info("'[getAbilityIconEmptyModule]Return data: " + JSON.stringify(data)); done(); }); }); /* - * @tc.number: GetAbilityIcon_0200 - * @tc.name: test getAbilityIcon + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0028 + * @tc.name: getAbilityIconInvalidModule * @tc.desc: test non-existent moduleName */ - it('GetAbilityIcon_0200', 0, async function (done) { + it('getAbilityIconInvalidModule', 0, async function (done) { await bundle.getAbilityIcon(BUNDLE_NAME, MODULE_NAME2, ABILITY_NAME) .then(data => { expect(data).assertFail(); }).catch((err) => { - console.error('[GetAbilityIcon_0200]Operation successful. Err: ' + JSON.stringify(err)); + console.error('[getAbilityIconInvalidModule]Operation successful. Err: ' + JSON.stringify(err)); expect(err).assertEqual(INVALID_CODE); }); bundle.getAbilityIcon(BUNDLE_NAME, MODULE_NAME2, ABILITY_NAME, (err, data) => { expect(err).assertEqual(INVALID_CODE); if (err) { - console.error('[GetAbilityIcon_0200]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[getAbilityIconInvalidModule]Operation failed. Err: ' + JSON.stringify(err)); } - console.info("'[GetAbilityIcon_0200]Return data: " + JSON.stringify(data)); + console.info("'[getAbilityIconInvalidModule]Return data: " + JSON.stringify(data)); done(); }); }); /* - * @tc.number: GetAbilityIcon_0300 - * @tc.name: test getAbilityIcon + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0026 + * @tc.name: getAbilityIconHasModule * @tc.desc: test existent moduleName */ - it('GetAbilityIcon_0300', 0, async function (done) { + it('getAbilityIconHasModule', 0, async function (done) { await bundle.getAbilityIcon(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME) .then(data => { - console.info('[GetAbilityIcon_0300]Return data successful: ' + JSON.stringify(data)); + console.info('[getAbilityIconHasModule]Return data successful: ' + JSON.stringify(data)); expect(data.getBytesNumberPerRow()).assertLarger(0); }).catch((err) => { - console.error('[GetAbilityIcon_0300]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[getAbilityIconHasModule]Operation failed. Err: ' + JSON.stringify(err)); expect(err).assertFail(); }); bundle.getAbilityIcon(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME, (err, data) => { expect(err).assertEqual(SUCCESS_CODE); expect(data.getBytesNumberPerRow()).assertLarger(0); if (err) { - console.error('[GetAbilityIcon_0300]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[getAbilityIconHasModule]Operation failed. Err: ' + JSON.stringify(err)); } - console.info("'[GetAbilityIcon_0300]Return data: " + JSON.stringify(data)); + console.info("'[getAbilityIconHasModule]Return data: " + JSON.stringify(data)); done(); }); }); /* - * @tc.number: GetAbilityLabel_0100 - * @tc.name: test getAbilityLabel + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0032 + * @tc.name: getAbilityLabelEmptyModule * @tc.desc: test empty moduleName */ - it('GetAbilityLabel_0100', 0, async function (done) { + it('getAbilityLabelEmptyModule', 0, async function (done) { await bundle.getAbilityLabel(BUNDLE_NAME, MODULE_NAME1, ABILITY_NAME) .then(data => { expect(data).assertFail(); }).catch((err) => { - console.error('[GetAbilityLabel_0100]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[getAbilityLabelEmptyModule]Operation failed. Err: ' + JSON.stringify(err)); expect(err).assertEqual(INVALID_CODE); }); bundle.getAbilityLabel(BUNDLE_NAME, MODULE_NAME1, ABILITY_NAME, (err, data) => { expect(err).assertEqual(INVALID_CODE); if (err) { - console.error('[GetAbilityLabel_0100]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[getAbilityLabelEmptyModule]Operation failed. Err: ' + JSON.stringify(err)); } - console.info("'[GetAbilityLabel_0100]Return data: " + JSON.stringify(data)); + console.info("'[getAbilityLabelEmptyModule]Return data: " + JSON.stringify(data)); done(); }); }); /* - * @tc.number: GetAbilityLabel_0200 - * @tc.name: test getAbilityLabel + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0024 + * @tc.name: getAbilityLabelInvalidModule * @tc.desc: test non-existent moduleName */ - it('GetAbilityLabel_0200', 0, async function (done) { + it('getAbilityLabelInvalidModule', 0, async function (done) { await bundle.getAbilityLabel(BUNDLE_NAME, MODULE_NAME2, ABILITY_NAME) .then(data => { expect(data).assertFail(); }).catch((err) => { - console.error('[GetAbilityLabel_0200]Operation . Err: ' + JSON.stringify(err)); + console.error('[getAbilityLabelInvalidModule]Operation . Err: ' + JSON.stringify(err)); expect(err).assertEqual(INVALID_CODE); }); bundle.getAbilityLabel(BUNDLE_NAME, MODULE_NAME2, ABILITY_NAME, (err, data) => { expect(err).assertEqual(INVALID_CODE); if (err) { - console.error('[GetAbilityLabel_0200]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[getAbilityLabelInvalidModule]Operation failed. Err: ' + JSON.stringify(err)); } - console.info("'[GetAbilityLabel_0200]Return data: " + JSON.stringify(data)); + console.info("'[getAbilityLabelInvalidModule]Return data: " + JSON.stringify(data)); done(); }); }); /* - * @tc.number: GetAbilityLabel_0300 - * @tc.name: test getAbilityLabel + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0022 + * @tc.name: getAbilityLabelHasModule * @tc.desc: test existent moduleName */ - it('GetAbilityLabel_0300', 0, async function (done) { + it('getAbilityLabelHasModule', 0, async function (done) { await bundle.getAbilityLabel(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME) .then(data => { - console.info('[GetAbilityLabel_0300]Return data successful: ' + JSON.stringify(data)); + console.info('[getAbilityLabelHasModule]Return data successful: ' + JSON.stringify(data)); expect(data).assertEqual("bmsfirstright"); }).catch((err) => { - console.error('[GetAbilityLabel_0300]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[getAbilityLabelHasModule]Operation failed. Err: ' + JSON.stringify(err)); expect(err).assertFail(); }); bundle.getAbilityLabel(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME, (err, data) => { expect(err).assertNull(); if (err) { - console.error('[GetAbilityLabel_0300]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[getAbilityLabelHasModule]Operation failed. Err: ' + JSON.stringify(err)); } expect(data).assertEqual("bmsfirstright"); - console.info("'[GetAbilityLabel_0300]Return data: " + JSON.stringify(data)); + console.info("'[getAbilityLabelHasModule]Return data: " + JSON.stringify(data)); done(); }); }); /* - * @tc.number: IsAbilityEnabled_0100 - * @tc.name: test isAbilityEnabled + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0010 + * @tc.name: isAbilityEnabledEmptyModule * @tc.desc: test empty moduleName */ - it('IsAbilityEnabled_0100', 0, async function (done) { + it('isAbilityEnabledEmptyModule', 0, async function (done) { let abilityInfo = generateAbilityInfoForTest(ABILITY_INFO_ONE.bundleName, ABILITY_INFO_ONE.name, ABILITY_INFO_ONE.moduleName); await bundle.isAbilityEnabled(abilityInfo) .then(data => { - console.info('[IsAbilityEnabled_0100]Return data successful: ' + JSON.stringify(data)); + console.info('[isAbilityEnabledEmptyModule]Return data successful: ' + JSON.stringify(data)); expect(data).assertTrue(); }).catch((err) => { - console.error('[IsAbilityEnabled_0100]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[isAbilityEnabledEmptyModule]Operation failed. Err: ' + JSON.stringify(err)); expect(err).assertFail(); }); bundle.isAbilityEnabled(abilityInfo, (err, data) => { expect(err).assertEqual(SUCCESS_CODE); if (err) { - console.error('[IsAbilityEnabled_0100]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[isAbilityEnabledEmptyModule]Operation failed. Err: ' + JSON.stringify(err)); } expect(data).assertTrue(); - console.info("'[IsAbilityEnabled_0100]Return data: " + JSON.stringify(data)); + console.info("'[isAbilityEnabledEmptyModule]Return data: " + JSON.stringify(data)); done(); }); }); /* - * @tc.number: IsAbilityEnabled_0200 - * @tc.name: test isAbilityEnabled + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0011 + * @tc.name: isAbilityEnabledInvalidModule * @tc.desc: test non-existent moduleName */ - it('IsAbilityEnabled_0200', 0, async function (done) { + it('isAbilityEnabledInvalidModule', 0, async function (done) { let abilityInfo = generateAbilityInfoForTest(ABILITY_INFO_TWO.bundleName, ABILITY_INFO_TWO.name, ABILITY_INFO_TWO.moduleName); await bundle.isAbilityEnabled(abilityInfo) .then(data => { expect(data).assertEqual(false); }).catch((err) => { - console.error('[IsAbilityEnabled_0200]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[isAbilityEnabledInvalidModule]Operation failed. Err: ' + JSON.stringify(err)); expect(err).assertFail(); }); bundle.isAbilityEnabled(abilityInfo, (err, data) => { expect(data).assertEqual(false); if (err) { - console.error('[IsAbilityEnabled_0200]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[isAbilityEnabledInvalidModule]Operation failed. Err: ' + JSON.stringify(err)); } expect(err).assertEqual(SUCCESS_CODE); - console.info("'[IsAbilityEnabled_0200]Return data: " + JSON.stringify(data)); + console.info("'[isAbilityEnabledInvalidModule]Return data: " + JSON.stringify(data)); done(); }); }); /* - * @tc.number: IsAbilityEnabled_0300 - * @tc.name: test isAbilityEnabled + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0008 + * @tc.name: isAbilityEnabledHasModule * @tc.desc: test existent moduleName */ - it('IsAbilityEnabled_0300', 0, async function (done) { + it('isAbilityEnabledHasModule', 0, async function (done) { let abilityInfo = generateAbilityInfoForTest(ABILITY_INFO_THREE.bundleName, ABILITY_INFO_THREE.name, ABILITY_INFO_THREE.moduleName); await bundle.isAbilityEnabled(abilityInfo) .then(data => { - console.info('[IsAbilityEnabled_0300]Return data successful: ' + JSON.stringify(data)); + console.info('[isAbilityEnabledHasModule]Return data successful: ' + JSON.stringify(data)); expect(data).assertTrue(); }).catch((err) => { - console.error('[IsAbilityEnabled_0300]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[isAbilityEnabledHasModule]Operation failed. Err: ' + JSON.stringify(err)); expect(err).assertFail(); }); bundle.isAbilityEnabled(abilityInfo, (err, data) => { expect(err).assertEqual(SUCCESS_CODE); if (err) { - console.error('[IsAbilityEnabled_0300]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[isAbilityEnabledHasModule]Operation failed. Err: ' + JSON.stringify(err)); } expect(data).assertTrue(); - console.info("'[IsAbilityEnabled_0300]Return data: " + JSON.stringify(data)); + console.info("'[isAbilityEnabledHasModule]Return data: " + JSON.stringify(data)); done(); }); }); /* - * @tc.number: IsAbilityEnabled_0400 - * @tc.name: test isAbilityEnabled + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0012 + * @tc.name: isAbilityEnabledUndefinedModule * @tc.desc: test empty moduleName */ - it('IsAbilityEnabled_0400', 0, async function (done) { + it('isAbilityEnabledUndefinedModule', 0, async function (done) { let abilityInfo = generateAbilityInfoForTest(ABILITY_INFO_FOUR.bundleName, ABILITY_INFO_FOUR.name, ABILITY_INFO_FOUR.moduleName); await bundle.isAbilityEnabled(abilityInfo) .then(data => { expect(data).assertFail(); }).catch((err) => { - console.error('[IsAbilityEnabled_0400]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[isAbilityEnabledUndefinedModule]Operation failed. Err: ' + JSON.stringify(err)); expect(err).assertEqual(INVALID_PARAM); }); bundle.isAbilityEnabled(abilityInfo, (err, data) => { expect(data).assertEqual(undefined); if (err) { - console.error('[IsAbilityEnabled_0400]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[isAbilityEnabledUndefinedModule]Operation failed. Err: ' + JSON.stringify(err)); } expect(err).assertEqual(INVALID_PARAM); - console.info("'[IsAbilityEnabled_0400]Return data: " + JSON.stringify(data)); + console.info("'[isAbilityEnabledUndefinedModule]Return data: " + JSON.stringify(data)); done(); }); }); /* - * @tc.number: QueryAbilityByWant_0100 - * @tc.name: test queryAbilityByWant + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0033 + * @tc.name: queryAbilityByWantEmptyModule * @tc.desc: test empty moduleName */ - it('QueryAbilityByWant_0100', 0, async function (done) { + it('queryAbilityByWantEmptyModule', 0, async function (done) { await bundle.queryAbilityByWant({ bundleName: BUNDLE_NAME, abilityName: ABILITY_NAME, moduleName: MODULE_NAME1 }, DEFAULT_FLAG, userId).then(data => { checkDataInfo(data[0]); - console.info("'[QueryAbilityByWant_0100]Return data : " + JSON.stringify(data)); + console.info("'[queryAbilityByWantEmptyModule]Return data : " + JSON.stringify(data)); }).catch(err => { - console.info("[QueryAbilityByWant_0100]Operation failed. Err: " + JSON.stringify(err)); + console.info("[queryAbilityByWantEmptyModule]Operation failed. Err: " + JSON.stringify(err)); expect(err).assertFail(); }); bundle.queryAbilityByWant({ @@ -404,20 +404,20 @@ export default function actsBmsJsModuleNameTest() { }, DEFAULT_FLAG, userId, (err, data) => { expect(err).assertEqual(SUCCESS_CODE); if (err) { - console.error('[QueryAbilityByWant_0100]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[queryAbilityByWantEmptyModule]Operation failed. Err: ' + JSON.stringify(err)); } checkDataInfo(data[0]); - console.info("'[QueryAbilityByWant_0100]Return data : " + JSON.stringify(data)); + console.info("'[queryAbilityByWantEmptyModule]Return data : " + JSON.stringify(data)); done(); }); }); /* - * @tc.number: QueryAbilityByWant_0200 - * @tc.name: test queryAbilityByWant + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0002 + * @tc.name: queryAbilityByWantInvalidModule * @tc.desc: test non-existent moduleName */ - it('QueryAbilityByWant_0200', 0, async function (done) { + it('queryAbilityByWantInvalidModule', 0, async function (done) { await bundle.queryAbilityByWant({ bundleName: BUNDLE_NAME, abilityName: ABILITY_NAME, @@ -425,7 +425,7 @@ export default function actsBmsJsModuleNameTest() { }, DEFAULT_FLAG, userId).then(data => { expect(data).assertFail(); }).catch(err => { - console.error('[QueryAbilityByWant_0200]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[queryAbilityByWantInvalidModule]Operation failed. Err: ' + JSON.stringify(err)); expect(err).assertEqual(INVALID_CODE); }); bundle.queryAbilityByWant({ @@ -433,29 +433,29 @@ export default function actsBmsJsModuleNameTest() { abilityName: ABILITY_NAME, moduleName: MODULE_NAME2 }, DEFAULT_FLAG, userId, (err, data) => { - console.info("'[QueryAbilityByWant_0200]Return data " + JSON.stringify(data)); + console.info("'[queryAbilityByWantInvalidModule]Return data " + JSON.stringify(data)); expect(data).assertEqual("QueryAbilityInfos failed"); - console.error('[QueryAbilityByWant_0200]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[queryAbilityByWantInvalidModule]Operation failed. Err: ' + JSON.stringify(err)); expect(err).assertEqual(INVALID_CODE); done(); }); }); /* - * @tc.number: QueryAbilityByWant_0300 - * @tc.name: test queryAbilityByWant + * @tc.number: SUB_BMS_APPINFO_QUERYMODULE_0001 + * @tc.name: queryAbilityByWantHasModule * @tc.desc: test existent moduleName */ - it('QueryAbilityByWant_0300', 0, async function (done) { + it('queryAbilityByWantHasModule', 0, async function (done) { await bundle.queryAbilityByWant({ bundleName: BUNDLE_NAME, abilityName: ABILITY_NAME, moduleName: MODULE_NAME3 }, DEFAULT_FLAG, userId).then(data => { checkDataInfo(data[0]); - console.info("'[QueryAbilityByWant_0300]Return data : " + JSON.stringify(data)); + console.info("'[queryAbilityByWantHasModule]Return data : " + JSON.stringify(data)); }).catch(err => { - console.info("[QueryAbilityByWant_0300]Operation failed. Err: " + JSON.stringify(err)); + console.info("[queryAbilityByWantHasModule]Operation failed. Err: " + JSON.stringify(err)); expect(err).assertFail(); }); bundle.queryAbilityByWant({ @@ -465,10 +465,10 @@ export default function actsBmsJsModuleNameTest() { }, DEFAULT_FLAG, userId, (err, data) => { expect(err).assertEqual(SUCCESS_CODE); if (err) { - console.error('[QueryAbilityByWant_0300]Operation failed. Err: ' + JSON.stringify(err)); + console.error('[queryAbilityByWantHasModule]Operation failed. Err: ' + JSON.stringify(err)); } checkDataInfo(data[0]); - console.info("'[QueryAbilityByWant_0300]Return data : " + JSON.stringify(data)); + console.info("'[queryAbilityByWantHasModule]Return data : " + JSON.stringify(data)); done(); }); }); diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets b/bundlemanager/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets index fc885350d2ffd08e1a586313475e4fefffff810d..68d6dcd43b24924e3ac7b46faae13440b309aab3 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets +++ b/bundlemanager/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets @@ -44,10 +44,10 @@ export default function actsBmsJsUnPermissionTest() { /** * @tc.number getApplicationInfos_1300 - * @tc.name getApplicationInfos_1300 + * @tc.name getApplicationInfosUnPermission * @tc.desc test getAllApplicationInfo */ - it('getApplicationInfos_1300', 0, async function (done) { + it('getApplicationInfosUnPermission', 0, async function (done) { await bundle.getAllApplicationInfo(DEFAULT_FLAG).then(data => { expect().assertFail(); }).catch(err => { @@ -62,10 +62,10 @@ export default function actsBmsJsUnPermissionTest() { /** * @tc.number getBundleInfo_2000 - * @tc.name getBundleInfo_2000 + * @tc.name getBundleInfoUnPermission * @tc.desc test getBundleInfo */ - it('getBundleInfo_2000', 0, async function (done) { + it('getBundleInfoUnPermission', 0, async function (done) { await bundle.getBundleInfo(BUNDLE_NAME_OTHER, DEFAULT_FLAG, { userId: userId }).then(data => { expect().assertFail(); }).catch(err => { @@ -80,10 +80,10 @@ export default function actsBmsJsUnPermissionTest() { /** * @tc.number getApplicationInfo_1800 - * @tc.name getApplicationInfo_1800 + * @tc.name getApplicationInfoUnPermission * @tc.desc test getApplicationInfo */ - it('getApplicationInfo_1800', 0, async function (done) { + it('getApplicationInfoUnPermission', 0, async function (done) { await bundle.getApplicationInfo(BUNDLE_NAME_OTHER, DEFAULT_FLAG).then(data => { expect().assertFail(); }).catch(err => { @@ -98,10 +98,10 @@ export default function actsBmsJsUnPermissionTest() { /* * @tc.number: SUB_BMS_HAP_STATUS_0011 - * @tc.name: test hasInstalled + * @tc.name: hasInstalledUnPermissionSelf * @tc.desc: test hasInstalled without permission */ - it('SUB_BMS_HAP_STATUS_0011', 0, async function (done) { + it('hasInstalledUnPermissionSelf', 0, async function (done) { let flag = 0; pkg.hasInstalled({ bundleName: SELF_BUNDLENAME, @@ -124,10 +124,10 @@ export default function actsBmsJsUnPermissionTest() { /* * @tc.number: SUB_BMS_HAP_STATUS_0012 - * @tc.name: test hasInstalled + * @tc.name: hasInstalledUnPermissionOther * @tc.desc: test hasInstalled without permission */ - it('SUB_BMS_HAP_STATUS_0012', 0, async function (done) { + it('hasInstalledUnPermissionOther', 0, async function (done) { let flag = 0; pkg.hasInstalled({ bundleName: BUNDLE_NAME_OTHER, @@ -150,10 +150,10 @@ export default function actsBmsJsUnPermissionTest() { /* * @tc.number: SUB_BMS_APPINFO_GETABILITYICON_0006 - * @tc.name: test getAbilityIcon + * @tc.name: getAbilityIconUnPermission * @tc.desc: test getAbilityIcon without permission */ - it('SUB_BMS_APPINFO_GETABILITYICON_0006', 0, async function (done) { + it('getAbilityIconUnPermission', 0, async function (done) { await bundle.getAbilityIcon(BUNDLE_NAME_OTHER, ABILITIY_NAME_OTHER).then(pixelmap => { expect(pixelmap).assertFail(); }).catch(err => { @@ -166,8 +166,8 @@ export default function actsBmsJsUnPermissionTest() { }); /* - * @tc.number: getAbilityInfo_100 - * @tc.name: test getAbilityInfo + * @tc.number: SUB_BMS_APPINFO_GETABILITYINFO_0008 + * @tc.name: getAbilityInfoUnPermissionSelf * @tc.desc: test getAbilityInfo */ it('getAbilityInfo_200', 0, async function (done) { @@ -199,10 +199,10 @@ export default function actsBmsJsUnPermissionTest() { /* * @tc.number: SUB_BMS_APPINFO_EXTENSION_0019 - * @tc.name: test queryExtensionAbilityInfos api + * @tc.name: queryExtensionAbilityInfosUnPermission * @tc.desc: test queryExtensionAbilityInfos no permission */ - it('SUB_BMS_APPINFO_EXTENSION_0019', 0, async function (done) { + it('queryExtensionAbilityInfosUnPermission', 0, async function (done) { await bundle.queryExtensionAbilityInfos( { "bundleName": BUNDLE_NAME1, diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbmsgetinfostest/src/main/js/test/ActsBmsGetBackGroundModes.test.js b/bundlemanager/bundle_standard/bundlemanager/actsbmsgetinfostest/src/main/js/test/ActsBmsGetBackGroundModes.test.js index 965fc8dac4d73f885b08f65edd6edc7441ddc771..2a8b890c99e56aa27e50acdc4cd9327b24d1d9d4 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbmsgetinfostest/src/main/js/test/ActsBmsGetBackGroundModes.test.js +++ b/bundlemanager/bundle_standard/bundlemanager/actsbmsgetinfostest/src/main/js/test/ActsBmsGetBackGroundModes.test.js @@ -58,11 +58,11 @@ describe('ActsBmsGetBackGroundModes', function () { }); /* - * @tc.number: bms_backGroundModes_0100 - * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant + * @tc.number: SUB_BMS_APPINFO_QUERY_0085 + * @tc.name: getBackgroundModesMultiAbility * @tc.desc: Get the information of the background modes from multi-ability application */ - it('bms_backGroundModes_0100', 0, async function (done) { + it('getBackgroundModesMultiAbility', 0, async function (done) { let dataInfos = await bundle.queryAbilityByWant({ action: 'action.system.home', entities: ['entity.system.home'], @@ -100,12 +100,12 @@ describe('ActsBmsGetBackGroundModes', function () { }); /* - * @tc.number: bms_backGroundModes_0200 - * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant + * @tc.number: SUB_BMS_APPINFO_QUERY_0086 + * @tc.name: getBackgroundModesAllModes * @tc.desc: Get all background modes information, and each ability of the application * contains one of the background mode */ - it('bms_backGroundModes_0200', 0, async function (done) { + it('getBackgroundModesAllModes', 0, async function (done) { let dataInfos = await bundle.queryAbilityByWant({ action: 'action.system.home', entities: ['entity.system.home'], @@ -121,11 +121,11 @@ describe('ActsBmsGetBackGroundModes', function () { }); /* - * @tc.number: bms_backGroundModes_0300 - * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant + * @tc.number: SUB_BMS_APPINFO_QUERY_0087 + * @tc.name: getBackgroundModesInvalidModes * @tc.desc: Read the backgroundModes information of the app's ability and replace invalid attributes */ - it('bms_backGroundModes_0300', 0, async function (done) { + it('getBackgroundModesInvalidModes', 0, async function (done) { let dataInfos = await bundle.queryAbilityByWant({ action: 'action.system.home', entities: ['entity.system.home'], @@ -160,11 +160,11 @@ describe('ActsBmsGetBackGroundModes', function () { }); /* - * @tc.number: bms_backGroundModes_0400 - * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant + * @tc.number: SUB_BMS_APPINFO_QUERY_0088 + * @tc.name: getBackgroundModesNotModes * @tc.desc: Read the backgroundModes information of the app's ability and replace invalid attributes */ - it('bms_backGroundModes_0400', 0, async function (done) { + it('getBackgroundModesNotModes', 0, async function (done) { let dataInfos = await bundle.queryAbilityByWant({ action: 'action.system.home', entities: ['entity.system.home'], @@ -181,11 +181,11 @@ describe('ActsBmsGetBackGroundModes', function () { }); /* - * @tc.number: bms_backGroundModes_0500 - * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant + * @tc.number: SUB_BMS_APPINFO_QUERY_0089 + * @tc.name: getBackgroundModesMultiHap * @tc.desc: Get the backgroundModes information of the multi-hap package of the application */ - it('bms_backGroundModes_0500', 0, async function (done) { + it('getBackgroundModesMultiHap', 0, async function (done) { let dataInfos = await bundle.queryAbilityByWant({ action: 'action.system.home', entities: ['entity.system.home'], diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbmsgetinfostest/src/main/js/test/ActsBmsQueryAbilityByWant.test.js b/bundlemanager/bundle_standard/bundlemanager/actsbmsgetinfostest/src/main/js/test/ActsBmsQueryAbilityByWant.test.js index 6a62d66b5d57dd0dea654a93efc5838099596a43..7f2bf11513976df12a35a7d1aae77eab5c20bb33 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbmsgetinfostest/src/main/js/test/ActsBmsQueryAbilityByWant.test.js +++ b/bundlemanager/bundle_standard/bundlemanager/actsbmsgetinfostest/src/main/js/test/ActsBmsQueryAbilityByWant.test.js @@ -38,12 +38,12 @@ describe('ActsBmsQueryAbilityByWant', function () { }); /* - * @tc.number: bms_queryAbilityByWant_0100 - * @tc.name: queryAbilityByWant callback by other callback + * @tc.number: SUB_BMS_APPINFO_QUERYSYS_0008 + * @tc.name: queryAbilityByWantThirdApp * @tc.desc: 1.queryAbilityByWant callback * 2.queryAbilityByWant for third app */ - it('bms_queryAbilityByWant_0100', 0, async function (done) { + it('queryAbilityByWantThirdApp', 0, async function (done) { await bundle.queryAbilityByWant({ action: ACTION_NAME, entities: [ENTITY_NAME], @@ -67,12 +67,12 @@ describe('ActsBmsQueryAbilityByWant', function () { }); /* - * @tc.number: bms_queryAbilityByWant_0200 - * @tc.name: queryAbilityByWant callback by other callback + * @tc.number: SUB_BMS_APPINFO_QUERYSYS_0007 + * @tc.name: queryAbilityByWantSystemApp * @tc.desc: 1.queryAbilityByWant callback * 2.queryAbilityByWant for systemapp */ - it('bms_queryAbilityByWant_0200', 0, async function (done) { + it('queryAbilityByWantSystemApp', 0, async function (done) { await bundle.queryAbilityByWant( { action: ACTION_NAME, @@ -107,11 +107,11 @@ describe('ActsBmsQueryAbilityByWant', function () { }); /* - * @tc.number: bms_queryAbilityByEntities_0300 - * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.number: SUB_BMS_APPINFO_QUERY_0084 + * @tc.name: queryAbilityByWantImplicitByEntities * @tc.desc: The entities in the parameter want pass in the new field, and use the implicit query to get abilitInfos */ - it('bms_queryAbilityByEntities_0300', 0, async function (done) { + it('queryAbilityByWantImplicitByEntities', 0, async function (done) { let dataInfos = await bundle.queryAbilityByWant({ action: ACTION_NAME, entities: ["entity.app.music", diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbmsjsunpermissiontest/src/main/js/test/ActsBmsJsUnPermissionTest.test.js b/bundlemanager/bundle_standard/bundlemanager/actsbmsjsunpermissiontest/src/main/js/test/ActsBmsJsUnPermissionTest.test.js index 0ccf565026732161a012518377482212b709e4ee..f093db21d210344159a8af74f010c9e13fa5c576 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbmsjsunpermissiontest/src/main/js/test/ActsBmsJsUnPermissionTest.test.js +++ b/bundlemanager/bundle_standard/bundlemanager/actsbmsjsunpermissiontest/src/main/js/test/ActsBmsJsUnPermissionTest.test.js @@ -38,11 +38,11 @@ describe('ActsBmsJsUnPermissionTest', function () { }); /* - * @tc.number: getApplicationInfoTest_100 - * @tc.name: test getApplicationInfo + * @tc.number: getApplicationInfo_1900 + * @tc.name: getApplicationInfoUnPermissionUserId * @tc.desc: test getApplicationInfo */ - it('getApplicationInfoTest_100', 0, async function (done) { + it('getApplicationInfoUnPermissionUserId', 0, async function (done) { await bundle.getApplicationInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG, userId).then(data => { expect().assertFail(); }).catch(err => { @@ -56,11 +56,11 @@ describe('ActsBmsJsUnPermissionTest', function () { }); /* - * @tc.number: getAllApplicationInfoTest_100 - * @tc.name: test getAllApplicationInfo + * @tc.number: getApplicationInfos_1500 + * @tc.name: getApplicationInfosUnPermissionUserId * @tc.desc: test getAllApplicationInfo */ - it('getAllApplicationInfoTest_100', 0, async function (done) { + it('getApplicationInfosUnPermissionUserId', 0, async function (done) { await bundle.getAllApplicationInfo(DEFAULT_FLAG, userId).then(data => { expect().assertFail(); }).catch(err => { @@ -74,11 +74,11 @@ describe('ActsBmsJsUnPermissionTest', function () { }); /* - * @tc.number: getBundleInfoTest_100 - * @tc.name: test getBundleInfo + * @tc.number: getBundleInfo_2300 + * @tc.name: getBundleInfoUnPermissionUserId * @tc.desc: test getBundleInfo */ - it('getBundleInfoTest_100', 0, async function (done) { + it('getBundleInfoUnPermissionUserId', 0, async function (done) { await bundle.getBundleInfo(LAUNCHER_BUNDLE_NAME, userId).then(data => { expect().assertFail(); }).catch(err => { @@ -92,11 +92,11 @@ describe('ActsBmsJsUnPermissionTest', function () { }); /* - * @tc.number: getAllBundleInfoTest_100 - * @tc.name: test getAllBundleInfo + * @tc.number: getBundleInfos_1000 + * @tc.name: getAllBundleInfoUnPermission * @tc.desc: test getAllBundleInfo */ - it('getAllBundleInfoTest_100', 0, async function (done) { + it('getAllBundleInfoUnPermission', 0, async function (done) { await bundle.getAllBundleInfo(DEFAULT_FLAG).then(data => { expect().assertFail(); }).catch(err => { @@ -110,11 +110,11 @@ describe('ActsBmsJsUnPermissionTest', function () { }); /* - * @tc.number: queryAbilityByWantTest_100 - * @tc.name: test queryAbilityByWant + * @tc.number: SUB_BMS_APPINFO_QUERY_0015 + * @tc.name: queryAbilityByWantUnPermission * @tc.desc: test queryAbilityByWant */ - it('queryAbilityByWantTest_100', 0, async function (done) { + it('queryAbilityByWantUnPermission', 0, async function (done) { await bundle.queryAbilityByWant({ bundleName: LAUNCHER_BUNDLE_NAME, abilityName: LAUNCHER_MAIN_ABILITY @@ -135,11 +135,11 @@ describe('ActsBmsJsUnPermissionTest', function () { }); /* - * @tc.number: getLaunchWantForBundleTest_100 - * @tc.name: test getLaunchWantForBundle + * @tc.number: SUB_BMS_APPINFO_QUERY_0010 + * @tc.name: getLaunchWantForBundleUnPermission * @tc.desc: test getLaunchWantForBundle */ - it('getLaunchWantForBundleTest_100', 0, async function (done) { + it('getLaunchWantForBundleUnPermission', 0, async function (done) { await bundle.getLaunchWantForBundle(LAUNCHER_BUNDLE_NAME).then(data => { expect().assertFail(); }).catch(err => { @@ -153,12 +153,12 @@ describe('ActsBmsJsUnPermissionTest', function () { }); /* - * @tc.number: getAbilityLabelTest_100 - * @tc.name: getAbilityLabel : Gets the specified ability label + * @tc.number: SUB_BMS_APPINFO_GETABILITYLABELP_0006 + * @tc.name: getAbilityLabelUnPermission * @tc.desc: Check the return value of the interface * @tc.level 0 */ - it('getAbilityLabelTest_100', 0, async function (done) { + it('getAbilityLabelUnPermission', 0, async function (done) { await bundle.getAbilityLabel(LAUNCHER_BUNDLE_NAME, LAUNCHER_MAIN_ABILITY) .then((data) => { expect().assertFail(); @@ -174,8 +174,8 @@ describe('ActsBmsJsUnPermissionTest', function () { }); /* - * @tc.number: getAbilityInfo_100 - * @tc.name: test getAbilityInfo + * @tc.number: SUB_BMS_APPINFO_GETABILITYINFO_0006 + * @tc.name: getAbilityInfoUnPermission * @tc.desc: test getAbilityInfo */ it('getAbilityInfo_100', 0, async function (done) { diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByAbility.test.ets b/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByAbility.test.ets index e1940cf0fa392a144bf358f0569e98eae673c338..b77df7d8ef5f586fe5c504e214166a283af03773 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByAbility.test.ets +++ b/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByAbility.test.ets @@ -32,7 +32,7 @@ const PROFILE_JSON_STRING = "{\"src\":[\"MainAbility/pages/index/index\",\"MainA export default function getProfileByAbility() { describe('getProfileByAbility', function () { /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0021 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0011 * @tc.name: getProfileByAbilityInvalidModulePro * @tc.desc: Check the invalid moduleName (by promise) * @tc.level 0 @@ -50,7 +50,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0031 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0015 * @tc.name: getProfileByAbilityEmptyModulePro * @tc.desc: Check the empty moduleName (by promise) * @tc.level 0 @@ -68,7 +68,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0028 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0017 * @tc.name: getProfileByAbilityInvalidModuleCall * @tc.desc: Check the invalid moduleName (by callback) * @tc.level 0 @@ -87,7 +87,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0037 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0034 * @tc.name: getProfileByAbilityEmptyModuleCall * @tc.desc: Check the empty moduleName (by callback) * @tc.level 0 @@ -106,7 +106,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0013 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0012 * @tc.name: getProfileByAbilityInvalidAbilityPro * @tc.desc: Check the invalid abilityName (by promise) * @tc.level 0 @@ -124,7 +124,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0032 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0029 * @tc.name: getProfileByAbilityEmptyAbilityPro * @tc.desc: Check the empty abilityName (by promise) * @tc.level 0 @@ -142,7 +142,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0023 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0022 * @tc.name: getProfileByAbilityInvalidAbilityCall * @tc.desc: Check the invalid abilityName (by callback) * @tc.level 0 @@ -161,7 +161,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0038 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0029 * @tc.name: getProfileByAbilityEmptyAbilityCall * @tc.desc: Check the empty abilityName (by callback) * @tc.level 0 @@ -180,7 +180,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0025 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0024 * @tc.name: getProfileByAbilityCallback * @tc.desc: Check the valid metadataName (by callback) * @tc.level 0 @@ -200,7 +200,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0027 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0026 * @tc.name: getProfileByAbilityInvalidMetaDataCall * @tc.desc: Check the invalid metadataName (by callback) * @tc.level 0 @@ -219,7 +219,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0039 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0036 * @tc.name: getProfileByAbilityEmptyMetaDataCall * @tc.desc: Check the empty metadataName (by callback) * @tc.level 0 @@ -241,7 +241,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0003 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0002 * @tc.name: getProfileByAbilityPromise * @tc.desc: Check the valid metadataName (by promise) * @tc.level 0 @@ -261,7 +261,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0016 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0004 * @tc.name: getProfileByAbilityInvalidMetaDataPro * @tc.desc: Check the invalid metadataName (by promise) * @tc.level 0 @@ -279,7 +279,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0033 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0030 * @tc.name: getProfileByAbilityEmptyMetaDataPro * @tc.desc: Check the empty metadataName (by promise) * @tc.level 0 @@ -301,7 +301,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0010 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0009 * @tc.name: getProfileByAbilityNoMetaDataPro * @tc.desc: without metadataName (by promise) * @tc.level 0 @@ -323,7 +323,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0049 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0048 * @tc.name: getProfileByAbilityNoProfilePro * @tc.desc: no profile configured under the ability (by promise) * @tc.level 0 @@ -341,7 +341,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0043 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0045 * @tc.name: getProfileByAbilityNotPrefixPro * @tc.desc: resource has no prefix '$profile:' (by promise) * @tc.level 0 @@ -359,7 +359,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0042 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0044 * @tc.name: getProfileByAbilityNotPrefixCall * @tc.desc: resource has no prefix '$profile:' (by callback) * @tc.level 0 @@ -378,7 +378,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0019 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0007 * @tc.name: getProfileByAbilityNotSuffixPro * @tc.desc: profile is .txt suffix (by promise) * @tc.level 0 @@ -397,7 +397,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0041 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0040 * @tc.name: getProfileByAbilityNotSuffixCall * @tc.desc: profile is .txt suffix (by callback) * @tc.level 0 @@ -416,7 +416,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0020 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0008 * @tc.name: getProfileByAbilityNoJsonPro * @tc.desc: profile is invalid json format (by promise) * @tc.level 0 @@ -434,7 +434,7 @@ export default function getProfileByAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0047 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0046 * @tc.name: getProfileByAbilityNoJsonCall * @tc.desc: profile is invalid json format (by callback) * @tc.level 0 diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByExtensionAbility.test.ets b/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByExtensionAbility.test.ets index 249f42196f0d6327d588e7434a1154c6452422ef..0b543cb179005070d8d44cf8e8403818e76d98c5 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByExtensionAbility.test.ets +++ b/bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByExtensionAbility.test.ets @@ -32,7 +32,7 @@ const PROFILE_JSON_STRING = "{\"src\":[\"MainAbility/pages/index/index\",\"MainA export default function getProfileByExtensionAbility() { describe('getProfileByExtensionAbility', function () { /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0011 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0021 * @tc.name: getProfileByExtensionInvalidModulePro * @tc.desc: Check the invalid moduleName (by promise) * @tc.level 0 @@ -50,7 +50,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0015 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0031 * @tc.name: getProfileByExtensionEmptyModulePro * @tc.desc: Check the Empty moduleName (by promise) * @tc.level 0 @@ -68,7 +68,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0017 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0028 * @tc.name: getProfileByExtensionEmptyModuleCall * @tc.desc: Check the invalid moduleName (by callback) * @tc.level 0 @@ -87,7 +87,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0034 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0037 * @tc.name: getProfileByExtensionEmptyModuleCall * @tc.desc: Check the Empty moduleName (by callback) * @tc.level 0 @@ -106,7 +106,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0012 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0013 * @tc.name: getProfileByExtensionInvalidAbilityPro * @tc.desc: Check the invalid abilityName (by promise) * @tc.level 0 @@ -124,7 +124,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0029 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0032 * @tc.name: getProfileByExtensionEmptyAbilityPro * @tc.desc: Check the Empty abilityName (by promise) * @tc.level 0 @@ -142,7 +142,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0022 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0023 * @tc.name: getProfileByExtensionInvalidAbilityCall * @tc.desc: Check the invalid abilityName (by callback) * @tc.level 0 @@ -161,7 +161,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0035 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0038 * @tc.name: getProfileByExtensionEmptyAbilityCall * @tc.desc: Check the Empty abilityName (by callback) * @tc.level 0 @@ -180,7 +180,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0024 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0025 * @tc.name: getProfileByExtensionAbilityCallback * @tc.desc: Check the valid metadataName (by callback) * @tc.level 0 @@ -200,7 +200,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0026 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0027 * @tc.name: getProfileByExtensionInvalidMetaDataCall * @tc.desc: Check the invalid metadataName (by callback) * @tc.level 0 @@ -219,7 +219,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0036 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0039 * @tc.name: getProfileByExtensionEmptyMetaDataCall * @tc.desc: Check the empty metadataName (by callback) * @tc.level 0 @@ -241,7 +241,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0002 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0003 * @tc.name: getProfileByExtensionAbilityPromise * @tc.desc: Check the valid metadataName (by promise) * @tc.level 0 @@ -261,7 +261,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0004 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0016 * @tc.name: getProfileByExtensionInvalidMetaDataPro * @tc.desc: Check the invalid metadataName (by promise) * @tc.level 0 @@ -279,7 +279,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0030 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0033 * @tc.name: getProfileByExtensionEmptyMetaDataPro * @tc.desc: Check the empty metadataName (by promise) * @tc.level 0 @@ -301,7 +301,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0009 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0010 * @tc.name: getProfileByExtensionAbilityNoMetaDataPro * @tc.desc: without metadataName (by promise) * @tc.level 0 @@ -323,7 +323,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0048 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0049 * @tc.name: getProfileByExtensionAbilityNoProfilePro * @tc.desc: no profile configured under the ability (by promise) * @tc.level 0 @@ -341,7 +341,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0045 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0043 * @tc.name: getProfileByExtensionNotPrefixPro * @tc.desc: resource has no prefix '$profile:' (by promise) * @tc.level 0 @@ -359,7 +359,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0044 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0042 * @tc.name: getProfileByExtensionNotPrefixCall * @tc.desc: resource has no prefix '$profile:' (by callback) * @tc.level 0 @@ -378,7 +378,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0007 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0019 * @tc.name: getProfileByExtensionNotSuffixPro * @tc.desc: profile is .txt suffix (by promise) * @tc.level 0 @@ -397,7 +397,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0040 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0041 * @tc.name: getProfileByExtensionNotSuffixCall * @tc.desc: profile is .txt suffix (by callback) * @tc.level 0 @@ -416,7 +416,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0008 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0020 * @tc.name: getProfileByExtensionNoJsonPro * @tc.desc: profile is invalid json format (by promise) * @tc.level 0 @@ -434,7 +434,7 @@ export default function getProfileByExtensionAbility() { }) /* - * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0046 + * @tc.number: SUB_BMS_APPINFO_QUERYMETAFILE_0047 * @tc.name: getProfileByExtensionNoJsonCall * @tc.desc: profile is invalid json format (by callback) * @tc.level 0 diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagertest/src/main/js/test/ExampleJsunit.test.js b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagertest/src/main/js/test/ExampleJsunit.test.js index 32c019acddecd80fe49ec2ad4a926529f9cc7758..113ef2edcffb97b6fcafbb6fbe82765572c68165 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagertest/src/main/js/test/ExampleJsunit.test.js +++ b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanagertest/src/main/js/test/ExampleJsunit.test.js @@ -49,10 +49,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getBundleInfo_0100 - * @tc.name BUNDLEMGR::getBundleInfo + * @tc.name testGetBundleInfoReqPermissionPromise * @tc.desc Test getBundleInfo interfaces with one hap.(by promise) */ - it('getBundleInfo_0100', 0, async function (done) { + it('testGetBundleInfoReqPermissionPromise', 0, async function (done) { let datainfo = await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES | demo.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION); expect(datainfo.name).assertEqual(NAME1); @@ -103,11 +103,11 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number getBundleInfo_0200 - * @tc.name BUNDLEMGR::getBundleInfo + * @tc.number getBundleInfo_0600 + * @tc.name testGetBundeInfoReqPermissionCallback * @tc.desc Test getBundleInfo interfaces with one hap.(by callback) */ - it('getBundleInfo_0200', 0, async function (done) { + it('testGetBundeInfoReqPermissionCallback', 0, async function (done) { await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES | demo.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION, OnReceiveEvent); @@ -118,7 +118,7 @@ describe('ActsBundleManagerTest', function () { }) function checkBundleInfo0200(datainfo) { - console.info("getBundleInfo_0200 dataInfo ====" + datainfo); + console.info("testGetBundeInfoReqPermissionCallback dataInfo ====" + datainfo); expect(datainfo.name).assertEqual(NAME1); expect(datainfo.vendor).assertEqual("example"); expect(datainfo.versionCode).assertEqual(VERSIONCODE1); @@ -166,13 +166,13 @@ describe('ActsBundleManagerTest', function () { } /** - * @tc.number getBundleInfo_0300 - * @tc.name BUNDLE::getBundleInfo + * @tc.number getBundleInfo_0200 + * @tc.name testGetBundleInfoMultiHapPromise * @tc.desc Test getBundleInfo interfaces with two haps.(by promise) */ - it('getBundleInfo_0300', 0, async function (done) { + it('testGetBundleInfoMultiHapPromise', 0, async function (done) { let datainfo = await demo.getBundleInfo(NAME2, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES); - console.info("getBundleInfo_0300 dataInfo ====" + datainfo); + console.info("testGetBundleInfoMultiHapPromise dataInfo ====" + datainfo); expect(datainfo.name).assertEqual(NAME2); expect(datainfo.vendor).assertEqual("example"); expect(datainfo.versionCode).assertEqual(1); @@ -190,14 +190,14 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number getBundleInfo_0400 - * @tc.name BUNDLE::getBundleInfo + * @tc.number getBundleInfo_0700 + * @tc.name testGetBundleInfoMultiHapCallback * @tc.desc Test getBundleInfo interfaces with two haps.(by callback) */ - it('getBundleInfo_0400', 0, async function (done) { + it('testGetBundleInfoMultiHapCallback', 0, async function (done) { await demo.getBundleInfo(NAME2, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, OnReceiveEvent); function OnReceiveEvent(err, datainfo) { - console.info("getBundleInfo_0400 dataInfo ====" + datainfo); + console.info("testGetBundleInfoMultiHapCallback dataInfo ====" + datainfo); expect(datainfo.name).assertEqual(NAME2); expect(datainfo.vendor).assertEqual("example"); expect(datainfo.versionCode).assertEqual(1); @@ -216,13 +216,13 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number getBundleInfo_0500 - * @tc.name BUNDLE::getBundleInfo + * @tc.number getBundleInfo_0300 + * @tc.name testGetBundleInfoPromise * @tc.desc Test getBundleInfo interfaces with one hap. (by promise) */ - it('getBundleInfo_0500', 0, async function (done) { + it('testGetBundleInfoPromise', 0, async function (done) { let datainfo = await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES); - console.info("getBundleInfo_0500 dataInfo ====" + datainfo); + console.info("testGetBundleInfoPromise dataInfo ====" + datainfo); expect(datainfo.name).assertEqual(NAME1); expect(datainfo.vendor).assertEqual("example"); expect(datainfo.versionCode).assertEqual(VERSIONCODE1); @@ -259,15 +259,15 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number getBundleInfo_0600 - * @tc.name BUNDLE::getBundleInfo + * @tc.number getBundleInfo_0800 + * @tc.name testGetBundleInfoCallback * @tc.desc Test getBundleInfo interfaces with one hap. (by callback) */ - it('getBundleInfo_0600', 0, async function (done) { + it('testGetBundleInfoCallback', 0, async function (done) { await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES | demo.BundleFlag.GET_ABILITY_INFO_WITH_DISABLE, OnReceiveEvent); function OnReceiveEvent(err, datainfo) { - console.info("getBundleInfo_0600 dataInfo ====" + datainfo); + console.info("testGetBundleInfoCallback dataInfo ====" + datainfo); expect(datainfo.name).assertEqual(NAME1); expect(datainfo.vendor).assertEqual("example"); expect(datainfo.versionCode).assertEqual(VERSIONCODE1); @@ -305,54 +305,54 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number getBundleInfo_0700 - * @tc.name BUNDLE::getBundleInfo + * @tc.number getBundleInfo_0400 + * @tc.name testGetBundleInfoNotExistPromise * @tc.desc Test getBundleInfo interfaces with error hap. (by promise) */ - it('getBundleInfo_0700', 0, async function (done) { + it('testGetBundleInfoNotExistPromise', 0, async function (done) { await demo.getBundleInfo('error', demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES).then(datainfo => { - console.info("getBundleInfo_0700 success:" + JSON.stringify(datainfo)); + console.info("testGetBundleInfoNotExistPromise success:" + JSON.stringify(datainfo)); expect(datainfo).assertFail(); done(); }).catch(err => { - console.info("getBundleInfo_0700 err:" + JSON.stringify(err)); + console.info("testGetBundleInfoNotExistPromise err:" + JSON.stringify(err)); expect(err).assertEqual(1); done(); }); }) /** - * @tc.number getBundleInfo_0800 - * @tc.name BUNDLE::getBundleInfo + * @tc.number getBundleInfo_0900 + * @tc.name testGetBundleInfoNotExistCallback * @tc.desc Test getBundleInfo interfaces with error hap. (by callback) */ - it('getBundleInfo_0800', 0, async function (done) { + it('testGetBundleInfoNotExistCallback', 0, async function (done) { await demo.getBundleInfo('error', demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, OnReceiveEvent); function OnReceiveEvent(err, datainfo) { if (err) { - console.info("getBundleInfo_0800 err" + JSON.stringify(err)); + console.info("testGetBundleInfoNotExistCallback err" + JSON.stringify(err)); expect(err).assertEqual(1); done(); return; } - console.info("getBundleInfo_0800 success" + JSON.stringify(datainfo)); + console.info("testGetBundleInfoNotExistCallback success" + JSON.stringify(datainfo)); expect(datainfo).assertFail(); done(); } }) /** - * @tc.number getBundleInfo_0900 - * @tc.name BUNDLE::getBundleInfo + * @tc.number getBundleInfo_0500 + * @tc.name testGetBundleInfoInvalidParamPromise * @tc.desc Test getBundleInfo interfaces with none hap. (by promise) */ - it('getBundleInfo_0900', 0, async function (done) { + it('testGetBundleInfoInvalidParamPromise', 0, async function (done) { await demo.getBundleInfo(' ', demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES).then(datainfo => { - console.info("getBundleInfo_0900 success" + JSON.stringify(datainfo)); + console.info("testGetBundleInfoInvalidParamPromise success" + JSON.stringify(datainfo)); expect(datainfo).assertFail(); done(); }).catch(err => { - console.info("getBundleInfo_0900 fail" + JSON.stringify(err)); + console.info("testGetBundleInfoInvalidParamPromise fail" + JSON.stringify(err)); expect(err).assertEqual(1); done(); }); @@ -360,19 +360,19 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getBundleInfo_1000 - * @tc.name BUNDLE::getBundleInfo + * @tc.name testGetBundleInfoInvalidParamCallback * @tc.desc Test getBundleInfo interfaces with none hap. (by callback) */ - it('getBundleInfo_1000', 0, async function (done) { + it('testGetBundleInfoInvalidParamCallback', 0, async function (done) { await demo.getBundleInfo(' ', demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, OnReceiveEvent); function OnReceiveEvent(err, datainfo) { if (err) { - console.info("getBundleInfo_1000 err" + JSON.stringify(err)); + console.info("testGetBundleInfoInvalidParamCallback err" + JSON.stringify(err)); expect(err).assertEqual(1); done(); return; } - console.info("getBundleInfo_1000 success" + JSON.stringify(datainfo)); + console.info("testGetBundleInfoInvalidParamCallback success" + JSON.stringify(datainfo)); expect(datainfo).assertFail(); done(); } @@ -380,12 +380,12 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getBundleInfo_1100 - * @tc.name BUNDLE::getBundleInfo + * @tc.name testGetBundleInfoDifferentParamPromise * @tc.desc Test getBundleInfo interfaces with one hap and different param. (by promise) */ - it('getBundleInfo_1100', 0, async function (done) { + it('testGetBundleInfoDifferentParamPromise', 0, async function (done) { let datainfo = await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_DEFAULT) - console.info("getBundleInfo_1100 dataInfo ====" + datainfo); + console.info("testGetBundleInfoDifferentParamPromise dataInfo ====" + datainfo); expect(datainfo.name).assertEqual(NAME1); expect(datainfo.vendor).assertEqual("example"); expect(datainfo.versionCode).assertEqual(VERSIONCODE1); @@ -406,13 +406,13 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getBundleInfo_1200 - * @tc.name BUNDLE::getBundleInfo + * @tc.name testGetBundleInfoDifferentParamCallback * @tc.desc Test getBundleInfo interfaces with one hap and different param. (by callback) */ - it('getBundleInfo_1200', 0, async function (done) { + it('testGetBundleInfoDifferentParamCallback', 0, async function (done) { await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_DEFAULT, OnReceiveEvent) function OnReceiveEvent(err, datainfo) { - console.info("getBundleInfo_1200 dataInfo ====" + datainfo); + console.info("testGetBundleInfoDifferentParamCallback dataInfo ====" + datainfo); expect(datainfo.name).assertEqual(NAME1); expect(datainfo.vendor).assertEqual("example"); expect(datainfo.versionCode).assertEqual(VERSIONCODE1); @@ -437,23 +437,23 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number getBundleInfo_1400 - * @tc.name BUNDLE::getBundleInfo + * @tc.number getBundleInfo_1300 + * @tc.name testGetBundleInfoSystemAppCallback * @tc.desc Test getBundleInfo interfaces with systemApp.(by callback) */ - it('getBundleInfo_1400', 0, async function (done) { + it('testGetBundleInfoSystemAppCallback', 0, async function (done) { let bundleOptions = { userId: userId }; demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, bundleOptions, (err, datainfo) => { if (err) { - console.info("getBundleInfo_1400 fail:" + JSON.stringify(err)); + console.info("testGetBundleInfoSystemAppCallback fail:" + JSON.stringify(err)); expect(err).assertFail(); done(); return; } - console.info("getBundleInfo_1400 success:" + JSON.stringify(datainfo)); + console.info("testGetBundleInfoSystemAppCallback success:" + JSON.stringify(datainfo)); expect(datainfo.name).assertEqual(NAME1); expect(datainfo.vendor).assertEqual("example"); expect(datainfo.versionCode).assertEqual(1); @@ -469,17 +469,17 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number getBundleInfo_1500 - * @tc.name BUNDLEMGR::getBundleInfo + * @tc.number getBundleInfo_1400 + * @tc.name testGetBundleInfoCurrentUserIdPromise * @tc.desc Test getBundleInfo interface with current userId (by promise). */ - it('getBundleInfo_1500', 0, async function (done) { + it('testGetBundleInfoCurrentUserIdPromise', 0, async function (done) { let bundleOptions = { userId: userId }; let dataInfo = await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, bundleOptions); - console.info("getBundleInfo_1500 start --------"); - console.info("getBundleInfo_1500 dataInfo ====" + dataInfo); + console.info("testGetBundleInfoCurrentUserIdPromise start --------"); + console.info("testGetBundleInfoCurrentUserIdPromise dataInfo ====" + dataInfo); expect(dataInfo.name).assertEqual(NAME1); expect(dataInfo.vendor).assertEqual("example"); expect(dataInfo.versionCode).assertEqual(VERSIONCODE1); @@ -513,22 +513,22 @@ describe('ActsBundleManagerTest', function () { expect(dataInfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } expect(dataInfo.appInfo.enabled).assertEqual(true); - console.info("getBundleInfo_1500 end --------"); + console.info("testGetBundleInfoCurrentUserIdPromise end --------"); done(); }) /** - * @tc.number getBundleInfo_1600 - * @tc.name BUNDLE::getBundleInfo + * @tc.number getBundleInfo_1500 + * @tc.name testGetBundleInfoCurrentUserIdCallback * @tc.desc Test getBundleInfo interface with current userId (by callback). */ - it('getBundleInfo_1600', 0, async function (done) { + it('testGetBundleInfoCurrentUserIdCallback', 0, async function (done) { let bundleOptions = { userId: userId }; demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, bundleOptions, (err, dataInfo) => { - console.info("getBundleInfo_1600 start --------"); - console.info("getBundleInfo_1600 dataInfo ====" + dataInfo); + console.info("testGetBundleInfoCurrentUserIdCallback start --------"); + console.info("testGetBundleInfoCurrentUserIdCallback dataInfo ====" + dataInfo); expect(dataInfo.name).assertEqual(NAME1); expect(dataInfo.vendor).assertEqual("example"); expect(dataInfo.versionCode).assertEqual(VERSIONCODE1); @@ -561,46 +561,46 @@ describe('ActsBundleManagerTest', function () { expect(dataInfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); expect(dataInfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } - console.info("getBundleInfo_1600 end --------"); + console.info("testGetBundleInfoCurrentUserIdCallback end --------"); done(); }); }) /** - * @tc.number getBundleInfo_1700 - * @tc.name BUNDLEMGR::getBundleInfo + * @tc.number getBundleInfo_2100 + * @tc.name testGetBundleInfoOtherUserIdPromise * @tc.desc Test getBundleInfo interface with other userId (by promise). */ - it('getBundleInfo_1700', 0, async function (done) { + it('testGetBundleInfoOtherUserIdPromise', 0, async function (done) { await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, { userId: 1 }).then(data => { - console.info("getBundleInfo_1700 success" + JSON.stringify(data)); + console.info("testGetBundleInfoOtherUserIdPromise success" + JSON.stringify(data)); expect(data).assertFail(); done(); }).catch(err => { - console.info("getBundleInfo_1700 err" + JSON.stringify(err)); + console.info("testGetBundleInfoOtherUserIdPromise err" + JSON.stringify(err)); expect(err).assertEqual(1); done(); }); }) /** - * @tc.number getBundleInfo_1800 - * @tc.name BUNDLE::getBundleInfo + * @tc.number getBundleInfo_2200 + * @tc.name testGetBundleInfoOtherUserIdCallback * @tc.desc Test getBundleInfo interface with other userId (by callback). */ - it('getBundleInfo_1800', 0, async function (done) { + it('testGetBundleInfoOtherUserIdCallback', 0, async function (done) { await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, { userId: 1 }, (err, dataInfo) => { if (err) { - console.info("getBundleInfo_1800 err" + JSON.stringify(err)); + console.info("testGetBundleInfoOtherUserIdCallback err" + JSON.stringify(err)); expect(err).assertEqual(1); done(); return; } - console.info("getBundleInfo_1800 success" + JSON.stringify(dataInfo)); + console.info("testGetBundleInfoOtherUserIdCallback success" + JSON.stringify(dataInfo)); expect(dataInfo).assertFail(); done(); }); @@ -608,10 +608,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getApplicationInfos_0100 - * @tc.name BUNDLE::getApplicationInfos + * @tc.name testGetAllApplicationInfoPromise * @tc.desc Test getApplicationInfos interfaces with one hap. */ - it('getApplicationInfos_0100', 0, async function (done) { + it('testGetAllApplicationInfoPromise', 0, async function (done) { let datainfo = await demo.getAllApplicationInfo(demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId); checkgetApplicationInfos(datainfo); done(); @@ -645,10 +645,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getApplicationInfos_0600 - * @tc.name BUNDLE::getApplicationInfos + * @tc.name testGetAllApplicationInfoCallback * @tc.desc Test getApplicationInfos interfaces with one hap. */ - it('getApplicationInfos_0600', 0, async function (done) { + it('testGetAllApplicationInfoCallback', 0, async function (done) { await demo.getAllApplicationInfo(demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId, (error, datainfo) => { expect(datainfo.length).assertLarger(0); @@ -668,10 +668,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getBundleInfos_0100 - * @tc.name BUNDLE::getBundleInfos + * @tc.name testGetAllBundleInfoPromise * @tc.desc Test getBundleInfos interfaces with one hap. */ - it('getBundleInfos_0100', 0, async function (done) { + it('testGetAllBundleInfoPromise', 0, async function (done) { let data = await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT); expect(typeof data).assertEqual(OBJECT); expect(data.length).assertLarger(0); @@ -692,10 +692,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getApplicationInfo_0100 - * @tc.name BUNDLE::getApplicationInfo + * @tc.name testGetApplicationInfoMetaDataPromise * @tc.desc Test getApplicationInfo interfaces with one hap. (by promise) */ - it('getApplicationInfo_0100', 0, async function (done) { + it('testGetApplicationInfoMetaDataPromise', 0, async function (done) { await demo.getApplicationInfo(NAME1, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION | demo.BundleFlag.GET_APPLICATION_INFO_WITH_METADATA, userId).then(datainfo => { @@ -731,22 +731,22 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number getApplicationInfo_0200 - * @tc.name BUNDLE::getApplicationInfo + * @tc.number getApplicationInfo_0600 + * @tc.name testGetApplicationInfoMetaDataCallback * @tc.desc Test getApplicationInfo interfaces with one hap. (by callback) */ - it('getApplicationInfo_0200', 0, async function (done) { + it('testGetApplicationInfoMetaDataCallback', 0, async function (done) { await demo.getApplicationInfo(NAME1, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION | demo.BundleFlag.GET_APPLICATION_INFO_WITH_METADATA, userId, (error, datainfo) => { if (error) { - console.info("getApplicationInfo_0200 fail:" + JSON.stringify(error)); + console.info("testGetApplicationInfoMetaDataCallback fail:" + JSON.stringify(error)); expect(error).assertFail(); done(); return; } expect(typeof datainfo).assertEqual(OBJECT); - console.info("getApplicationInfo_0200 success:" + JSON.stringify(datainfo)); + console.info("testGetApplicationInfoMetaDataCallback success:" + JSON.stringify(datainfo)); expect(datainfo.moduleSourceDirs.length).assertLarger(0); expect(datainfo.moduleInfos.length).assertLarger(0); expect(datainfo.name).assertEqual(NAME1); @@ -773,14 +773,14 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number getApplicationInfo_0300 - * @tc.name BUNDLE::getApplicationInfo + * @tc.number getApplicationInfo_0200 + * @tc.name testGetApplicationInfoTwoHapPromise * @tc.desc Test getApplicationInfo interfaces with two haps. (by promise) */ - it('getApplicationInfo_0300', 0, async function (done) { + it('testGetApplicationInfoTwoHapPromise', 0, async function (done) { let datainfo = await demo.getApplicationInfo(NAME2, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId); - console.info("getApplicationInfo_0300 result" + JSON.stringify(datainfo)); + console.info("testGetApplicationInfoTwoHapPromise result" + JSON.stringify(datainfo)); expect(typeof datainfo).assertEqual(OBJECT); expect(datainfo.name.length).assertLarger(0); expect(datainfo.description.length).assertLarger(0); @@ -810,14 +810,14 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number getApplicationInfo_0400 - * @tc.name BUNDLE::getApplicationInfo + * @tc.number getApplicationInfo_0700 + * @tc.name testGetApplicationInfoTwoHapCallback * @tc.desc Test getApplicationInfo interfaces with two haps. (by callback) */ - it('getApplicationInfo_0400', 0, async function (done) { + it('testGetApplicationInfoTwoHapCallback', 0, async function (done) { await demo.getApplicationInfo(NAME2, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId, (error, datainfo) => { - console.info("getApplicationInfo_0400 result" + JSON.stringify(datainfo)); + console.info("testGetApplicationInfoTwoHapCallback result" + JSON.stringify(datainfo)); expect(typeof datainfo).assertEqual(OBJECT); expect(datainfo.name.length).assertLarger(0); expect(datainfo.description.length).assertLarger(0); @@ -848,14 +848,14 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number getApplicationInfo_0500 - * @tc.name BUNDLE::getApplicationInfo + * @tc.number getApplicationInfo_0300 + * @tc.name testGetApplicationInfoThereHapPromise * @tc.desc Test getApplicationInfo interfaces with three haps. (by promise) */ - it('getApplicationInfo_0500', 0, async function (done) { + it('testGetApplicationInfoThereHapPromise', 0, async function (done) { let datainfo = await demo.getApplicationInfo(NAME3, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId); - console.info("getApplicationInfo_0500 result" + JSON.stringify(datainfo)); + console.info("testGetApplicationInfoThereHapPromise result" + JSON.stringify(datainfo)); expect(datainfo.name).assertEqual(NAME3); expect(datainfo.label).assertEqual("$string:app_name"); expect(datainfo.icon).assertEqual("$media:icon"); @@ -872,14 +872,14 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number getApplicationInfo_0600 - * @tc.name BUNDLE::getApplicationInfo + * @tc.number getApplicationInfo_2000 + * @tc.name testGetApplicationInfoThereHapCallback * @tc.desc Test getApplicationInfo interfaces with three haps. (by callback) */ - it('getApplicationInfo_0600', 0, async function (done) { + it('testGetApplicationInfoThereHapCallback', 0, async function (done) { await demo.getApplicationInfo(NAME3, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId, (error, datainfo) => { - console.info("getApplicationInfo_0600 result" + JSON.stringify(datainfo)); + console.info("testGetApplicationInfoThereHapCallback result" + JSON.stringify(datainfo)); expect(datainfo.name).assertEqual(NAME3); expect(datainfo.label).assertEqual("$string:app_name"); expect(datainfo.icon).assertEqual("$media:icon"); @@ -897,56 +897,56 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number getApplicationInfo_0700 - * @tc.name BUNDLE::getApplicationInfo + * @tc.number getApplicationInfo_0400 + * @tc.name testGetApplicationInfoNotExistCallback * @tc.desc Test getApplicationInfo interfaces with error hap. (by promise) */ - it('getApplicationInfo_0700', 0, async function (done) { + it('testGetApplicationInfoNotExistCallback', 0, async function (done) { await demo.getApplicationInfo(ERROR, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId).then(datainfo => { - console.info("getApplicationInfo_0700 success" + JSON.stringify(datainfo)); + console.info("testGetApplicationInfoNotExistCallback success" + JSON.stringify(datainfo)); expect(datainfo).assertFail(); done(); }).catch(err => { - console.info("getApplicationInfo_0700 err" + JSON.stringify(err)); + console.info("testGetApplicationInfoNotExistCallback err" + JSON.stringify(err)); expect(err).assertEqual(1); done(); }); }) /** - * @tc.number getApplicationInfo_0800 - * @tc.name BUNDLE::getApplicationInfo + * @tc.number getApplicationInfo_0900 + * @tc.name testGetApplicationInfoNotExistPromise * @tc.desc Test getApplicationInfo interfaces with error hap. (by callback) */ - it('getApplicationInfo_0800', 0, async function (done) { + it('testGetApplicationInfoNotExistPromise', 0, async function (done) { await demo.getApplicationInfo(ERROR, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId, (error, datainfo) => { if (error) { - console.info("getApplicationInfo_0800 fail" + JSON.stringify(error)); + console.info("testGetApplicationInfoNotExistPromise fail" + JSON.stringify(error)); expect(error).assertEqual(1); done(); return; } - console.info("getApplicationInfo_0800 success" + JSON.stringify(datainfo)); + console.info("testGetApplicationInfoNotExistPromise success" + JSON.stringify(datainfo)); expect(datainfo).assertFail(); done(); }) }) /** - * @tc.number getApplicationInfo_0900 - * @tc.name BUNDLE::getApplicationInfo + * @tc.number getApplicationInfo_0500 + * @tc.name testGetApplicationInfoInvalidParamPromise * @tc.desc Test getApplicationInfo interfaces with none hap. (by promise) */ - it('getApplicationInfo_0900', 0, async function (done) { + it('testGetApplicationInfoInvalidParamPromise', 0, async function (done) { await demo.getApplicationInfo('', demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId).then(datainfo => { - console.info("getApplicationInfo_0900 success" + JSON.stringify(datainfo)); + console.info("testGetApplicationInfoInvalidParamPromise success" + JSON.stringify(datainfo)); expect(datainfo).assertFail(); done(); }).catch(error => { - console.info("getApplicationInfo_0900 err" + JSON.stringify(error)); + console.info("testGetApplicationInfoInvalidParamPromise err" + JSON.stringify(error)); expect(error).assertEqual(1); done(); }); @@ -954,19 +954,19 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getApplicationInfo_1000 - * @tc.name BUNDLE::getApplicationInfo + * @tc.name testGetApplicationInfoInvalidParamCallback * @tc.desc Test getApplicationInfo interfaces with none hap. (by callback) */ - it('getApplicationInfo_1000', 0, async function (done) { + it('testGetApplicationInfoInvalidParamCallback', 0, async function (done) { await demo.getApplicationInfo('', demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId, (error, datainfo) => { if (error) { - console.info("getApplicationInfo_1000 fail" + JSON.stringify(error)); + console.info("testGetApplicationInfoInvalidParamCallback fail" + JSON.stringify(error)); expect(error).assertEqual(1); done(); return; } - console.info("getApplicationInfo_1000 success" + JSON.stringify(datainfo)); + console.info("testGetApplicationInfoInvalidParamCallback success" + JSON.stringify(datainfo)); expect(datainfo).assertFail(); done(); }); @@ -974,10 +974,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getApplicationInfo_1100 - * @tc.name BUNDLE::getApplicationInfo + * @tc.name testGetApplicationInfoDifferentParamPromise * @tc.desc Test getApplicationInfo interfaces with one hap and different param. (by promise) */ - it('getApplicationInfo_1100', 0, async function (done) { + it('testGetApplicationInfoDifferentParamPromise', 0, async function (done) { await demo.getApplicationInfo(NAME1, demo.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(datainfo => { console.info("getApplicationInfo_1100 success" + JSON.stringify(datainfo)); expect(typeof datainfo).assertEqual(OBJECT); @@ -992,7 +992,7 @@ describe('ActsBundleManagerTest', function () { expect(datainfo.supportedModes).assertEqual(0); done(); }).catch(err => { - console.info("getApplicationInfo_1100 fail" + JSON.stringify(err)); + console.info("testGetApplicationInfoDifferentParamPromise fail" + JSON.stringify(err)); expect(err).assertFail(); done(); }) @@ -1000,18 +1000,18 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getApplicationInfo_1200 - * @tc.name BUNDLE::getApplicationInfo + * @tc.name testGetApplicationInfoDifferentParamCallback * @tc.desc Test getApplicationInfo interfaces with one hap and different param. (by callback) */ - it('getApplicationInfo_1200', 0, async function (done) { + it('testGetApplicationInfoDifferentParamCallback', 0, async function (done) { await demo.getApplicationInfo(NAME1, demo.BundleFlag.GET_BUNDLE_DEFAULT, userId, (error, datainfo) => { if (error) { - console.info("getApplicationInfo_1200 fail" + JSON.stringify(error)); + console.info("testGetApplicationInfoDifferentParamCallback fail" + JSON.stringify(error)); expect(error).assertFail(); done(); return; } - console.info("getApplicationInfo_1200 success" + JSON.stringify(datainfo)); + console.info("testGetApplicationInfoDifferentParamCallback success" + JSON.stringify(datainfo)); expect(typeof datainfo).assertEqual(OBJECT); expect(datainfo.name).assertEqual(NAME1); expect(datainfo.label).assertEqual("$string:app_name"); @@ -1028,13 +1028,13 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getApplicationInfo_1300 - * @tc.name BUNDLE::getApplicationInfo + * @tc.name testGetApplicationInfoPromise * @tc.desc Test getApplicationInfo interfaces with one hap. (by promise) */ - it('getApplicationInfo_1300', 0, async function (done) { + it('testGetApplicationInfoPromise', 0, async function (done) { await demo.getApplicationInfo(NAME1, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId).then(datainfo => { - console.info("getApplicationInfo_1300 success:" + JSON.stringify(datainfo)); + console.info("testGetApplicationInfoPromise success:" + JSON.stringify(datainfo)); expect(typeof datainfo).assertEqual(OBJECT); expect(datainfo.name).assertEqual(NAME1); expect(datainfo.label).assertEqual("$string:app_name"); @@ -1052,7 +1052,7 @@ describe('ActsBundleManagerTest', function () { } done(); }).catch(error => { - console.info("getApplicationInfo_1300 fail:" + JSON.stringify(error)); + console.info("testGetApplicationInfoPromise fail:" + JSON.stringify(error)); expect(error).assertFail(); done(); }) @@ -1060,19 +1060,19 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getApplicationInfo_1400 - * @tc.name BUNDLE::getApplicationInfo + * @tc.name testGetApplicationInfoCallback * @tc.desc Test getApplicationInfo interfaces with one hap. (by callback) */ - it('getApplicationInfo_1400', 0, async function (done) { + it('testGetApplicationInfoCallback', 0, async function (done) { await demo.getApplicationInfo(NAME1, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId, (error, datainfo) => { if (error) { - console.info("getApplicationInfo_1400 fail:" + JSON.stringify(error)); + console.info("testGetApplicationInfoCallback fail:" + JSON.stringify(error)); expect(error).assertFail(); done(); return; } - console.info("getApplicationInfo_1400 success:" + JSON.stringify(datainfo)); + console.info("testGetApplicationInfoCallback success:" + JSON.stringify(datainfo)); expect(typeof datainfo).assertEqual(OBJECT); expect(datainfo.name).assertEqual(NAME1); expect(datainfo.label).assertEqual("$string:app_name"); @@ -1094,10 +1094,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getBundleInfos_0600 - * @tc.name BUNDLE::getBundleInfos + * @tc.name testGetAllBundleInfoCallback * @tc.desc Test getBundleInfos interfaces with one hap. */ - it('getBundleInfos_0600', 0, async function (done) { + it('testGetAllBundleInfoCallback', 0, async function (done) { await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT, (error, data) => { expect(typeof data).assertEqual(OBJECT); for (let i = 0; i < data.length; i++) { @@ -1118,10 +1118,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getApplicationInfos_0200 - * @tc.name BUNDLE::getApplicationInfos + * @tc.name testGetAllApplicationInfoTwoHapPromise * @tc.desc Test getApplicationInfos interfaces with two haps. */ - it('getApplicationInfos_0200', 0, async function (done) { + it('testGetAllApplicationInfoTwoHapPromise', 0, async function (done) { let datainfo = await demo.getAllApplicationInfo(demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId); console.info("==========ActsBmsGetInfosSecondScene is ==========" + JSON.stringify(datainfo)); checkgetApplicationInfos(datainfo); @@ -1130,10 +1130,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getApplicationInfos_0400 - * @tc.name BUNDLE::getApplicationInfos + * @tc.name testGetAllApplicationInfoDifferentParamPromise * @tc.desc Test getApplicationInfos interfaces with two haps and different param. */ - it('getApplicationInfos_0400', 0, async function (done) { + it('testGetAllApplicationInfoDifferentParamPromise', 0, async function (done) { let datainfo = await demo.getAllApplicationInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT, userId); expect(datainfo.length).assertLarger(0); checkgetApplicationInfos(datainfo); @@ -1142,10 +1142,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getApplicationInfos_0700 - * @tc.name BUNDLE::getApplicationInfos + * @tc.name testGetAllApplicationInfoTwoHapCallback * @tc.desc Test getApplicationInfos interfaces with two haps. */ - it('getApplicationInfos_0700', 0, async function (done) { + it('testGetAllApplicationInfoTwoHapCallback', 0, async function (done) { await demo.getAllApplicationInfo(demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId, (error, datainfo) => { for (let i = 0; i < datainfo.length; i++) { @@ -1170,10 +1170,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getApplicationInfos_0800 - * @tc.name BUNDLE::getApplicationInfos + * @tc.name testGetAllApplicationInfoThereHapCallback * @tc.desc Test getApplicationInfos interfaces with three haps. */ - it('getApplicationInfos_0800', 0, async function (done) { + it('testGetAllApplicationInfoThereHapCallback', 0, async function (done) { await demo.getAllApplicationInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT, userId, (error, datainfo) => { for (let i = 0; i < datainfo.length; i++) { expect(datainfo[i].name.length).assertLarger(0); @@ -1197,10 +1197,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getApplicationInfos_0900 - * @tc.name BUNDLE::getApplicationInfos + * @tc.name testGetAllApplicationInfoDifferentParamCallback * @tc.desc Test getApplicationInfos interfaces with two haps and different param. */ - it('getApplicationInfos_0900', 0, async function (done) { + it('testGetAllApplicationInfoDifferentParamCallback', 0, async function (done) { await demo.getAllApplicationInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT, userId, (error, datainfo) => { for (let i = 0; i < datainfo.length; i++) { expect(datainfo[i].name.length).assertLarger(0); @@ -1224,10 +1224,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getBundleInfos_0200 - * @tc.name BUNDLE::getBundleInfos + * @tc.name testGetAllBundleInfoTwoHapPromise * @tc.desc Test getBundleInfos interfaces with two haps. */ - it('getBundleInfos_0200', 0, async function (done) { + it('testGetAllBundleInfoTwoHapPromise', 0, async function (done) { let data = await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT); expect(typeof data).assertEqual(OBJECT); for (let i = 0; i < data.length; i++) { @@ -1247,10 +1247,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getBundleInfos_0400 - * @tc.name BUNDLE::getBundleInfos + * @tc.name testGetAllBundleInfoTwoHapDifferentParamPromise * @tc.desc Test getBundleInfos interfaces with two haps and different param. */ - it('getBundleInfos_0400', 0, async function (done) { + it('testGetAllBundleInfoTwoHapDifferentParamPromise', 0, async function (done) { let data = await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES); expect(typeof data).assertEqual(OBJECT); for (let i = 0; i < data.length; i++) { @@ -1271,10 +1271,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getBundleInfos_0700 - * @tc.name BUNDLE::getBundleInfos + * @tc.name testGetAllBundleInfoTwoHapCallback * @tc.desc Test getBundleInfos interfaces with two haps. */ - it('getBundleInfos_0700', 0, async function (done) { + it('testGetAllBundleInfoTwoHapCallback', 0, async function (done) { await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT, (error, data) => { expect(typeof data).assertEqual(OBJECT); for (let i = 0; i < data.length; i++) { @@ -1295,10 +1295,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getBundleInfos_0900 - * @tc.name BUNDLE::getBundleInfos + * @tc.name testGetAllBundleInfoTwoHapDifferentParamCallback * @tc.desc Test getBundleInfos interfaces with two haps and different param. */ - it('getBundleInfos_0900', 0, async function (done) { + it('testGetAllBundleInfoTwoHapDifferentParamCallback', 0, async function (done) { await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, (error, data) => { expect(typeof data).assertEqual(OBJECT); for (let i = 0; i < data.length; i++) { @@ -1319,10 +1319,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getBundleInfos_0300 - * @tc.name BUNDLE::getBundleInfos + * @tc.name testGetAllBundleInfoThereHapPromise * @tc.desc Test getBundleInfos interfaces with three haps. */ - it('getBundleInfos_0300', 0, async function (done) { + it('testGetAllBundleInfoThereHapPromise', 0, async function (done) { let data = await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT); for (let i = 0; i < data.length; i++) { expect(data[i].name.length).assertLarger(0); @@ -1341,10 +1341,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getBundleInfos_0500 - * @tc.name BUNDLE::getBundleInfos + * @tc.name testGetAllBundleInfoThereHapDifferentParamPromise * @tc.desc Test getBundleInfos interfaces with three haps and different param. */ - it('getBundleInfos_0500', 0, async function (done) { + it('testGetAllBundleInfoThereHapDifferentParamPromise', 0, async function (done) { let data = await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES); for (let i = 0; i < data.length; i++) { expect(data[i].name.length).assertLarger(0); @@ -1363,10 +1363,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number getBundleInfos_0800 - * @tc.name BUNDLE::getBundleInfos + * @tc.name testGetAllBundleInfoThereHapCallback * @tc.desc Test getBundleInfos interfaces with three haps. */ - it('getBundleInfos_0800', 0, async function (done) { + it('testGetAllBundleInfoThereHapCallback', 0, async function (done) { await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT, (error, data) => { for (let i = 0; i < data.length; i++) { expect(data[i].name.length).assertLarger(0); @@ -1387,10 +1387,10 @@ describe('ActsBundleManagerTest', function () { /** * @tc.number queryAbilityByWant_0100 - * @tc.name BUNDLE::queryAbilityByWant + * @tc.name testQueryAbilityByWantPromise * @tc.desc Test queryAbilityByWant interfaces with none hap. (by promise) */ - it('queryAbilityByWant_0100', 0, async function (done) { + it('testQueryAbilityByWantPromise', 0, async function (done) { await demo.queryAbilityByWant( { "bundleName": "com.example.myapplication1", @@ -1402,7 +1402,7 @@ describe('ActsBundleManagerTest', function () { expect(data.length).assertLarger(0); for (let i = 0, len = data.length; i < len; i++) { let datainfo = data[i]; - console.info("queryAbilityByWant_0100 success:" + JSON.stringify(datainfo)); + console.info("testQueryAbilityByWantPromise success:" + JSON.stringify(datainfo)); expect(datainfo.name).assertEqual("com.example.myapplication1.MainAbility"); expect(datainfo.label).assertEqual("$string:app_name"); expect(datainfo.description).assertEqual(DESCRIPTION); @@ -1432,18 +1432,18 @@ describe('ActsBundleManagerTest', function () { } done(); }).catch(err => { - console.info("queryAbilityByWant_0100 err" + JSON.stringify(err)); + console.info("testQueryAbilityByWantPromise err" + JSON.stringify(err)); expect(err).assertFail(); done(); }) }) /** - * @tc.number queryAbilityByWant_0200 - * @tc.name BUNDLE::queryAbilityByWant + * @tc.number queryAbilityByWant_0500 + * @tc.name testQueryAbilityByWantCallback * @tc.desc Test queryAbilityByWant interfaces with none hap. (by callback) */ - it('queryAbilityByWant_0200', 0, async function (done) { + it('testQueryAbilityByWantCallback', 0, async function (done) { demo.queryAbilityByWant( { "bundleName": "com.example.myapplication1", @@ -1453,7 +1453,7 @@ describe('ActsBundleManagerTest', function () { demo.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, userId, (err, data) => { if (err) { - console.info("queryAbilityByWant_0200 err" + JSON.stringify(err)); + console.info("testQueryAbilityByWantCallback err" + JSON.stringify(err)); expect(err).assertFail(); done(); return; @@ -1461,7 +1461,7 @@ describe('ActsBundleManagerTest', function () { expect(data.length).assertLarger(0); for (let i = 0, len = data.length; i < len; i++) { let datainfo = data[i]; - console.info("queryAbilityByWant_0200 success:" + JSON.stringify(datainfo)); + console.info("testQueryAbilityByWantCallback success:" + JSON.stringify(datainfo)); expect(datainfo.name).assertEqual("com.example.myapplication1.MainAbility"); expect(datainfo.label).assertEqual("$string:app_name"); expect(datainfo.description).assertEqual(DESCRIPTION); @@ -1494,11 +1494,11 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number queryAbilityByWant_0300 - * @tc.name BUNDLE::queryAbilityByWant + * @tc.number queryAbilityByWant_0200 + * @tc.name testQueryAbilityByWantTwoHapPromise * @tc.desc Test queryAbilityByWant interfaces with two haps. (by promise) */ - it('queryAbilityByWant_0300', 0, async function (done) { + it('testQueryAbilityByWantTwoHapPromise', 0, async function (done) { let data = await demo.queryAbilityByWant( { "bundleName": "com.example.myapplication2", @@ -1507,7 +1507,7 @@ describe('ActsBundleManagerTest', function () { expect(data.length).assertLarger(0); for (let i = 0, len = data.length; i < len; i++) { let datainfo = data[i]; - console.info("queryAbilityByWant_0300 success:" + JSON.stringify(datainfo)); + console.info("testQueryAbilityByWantTwoHapPromise success:" + JSON.stringify(datainfo)); expect(datainfo.name.length).assertLarger(0); expect(datainfo.label).assertEqual("$string:app_name"); expect(datainfo.description).assertEqual(DESCRIPTION); @@ -1535,11 +1535,11 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number queryAbilityByWant_0400 - * @tc.name BUNDLE::queryAbilityByWant + * @tc.number queryAbilityByWant_0600 + * @tc.name testQueryAbilityByWantTwoHapCallback * @tc.desc Test queryAbilityByWant interfaces with two haps. (by callback) */ - it('queryAbilityByWant_0400', 0, async function (done) { + it('testQueryAbilityByWantTwoHapCallback', 0, async function (done) { await demo.queryAbilityByWant( { "bundleName": "com.example.myapplication2", @@ -1548,7 +1548,7 @@ describe('ActsBundleManagerTest', function () { expect(data.length).assertLarger(0); for (let i = 0, len = data.length; i < len; i++) { let datainfo = data[i]; - console.info("queryAbilityByWant_0400 success:" + JSON.stringify(datainfo)); + console.info("testQueryAbilityByWantTwoHapCallback success:" + JSON.stringify(datainfo)); expect(datainfo.name.length).assertLarger(0); expect(datainfo.label).assertEqual("$string:app_name"); expect(datainfo.description).assertEqual(DESCRIPTION); @@ -1577,18 +1577,18 @@ describe('ActsBundleManagerTest', function () { }) /** - * @tc.number queryAbilityByWant_0500 - * @tc.name BUNDLE::queryAbilityByWant + * @tc.number queryAbilityByWant_0300 + * @tc.name testQueryAbilityByWantThereHapPromise * @tc.desc Test queryAbilityByWant interfaces with three haps. (by promise) */ - it('queryAbilityByWant_0500', 0, async function (done) { + it('testQueryAbilityByWantThereHapPromise', 0, async function (done) { await demo.queryAbilityByWant({ entities: ['entity.system.home', 'entitiesentities'] }, 4, userId).then(data => { checkAbilityInfo0500(data) done(); }).catch(err => { - console.info("queryAbilityByWant_0500 err" + JSON.stringify(err)); + console.info("testQueryAbilityByWantThereHapPromise err" + JSON.stringify(err)); expect(err).assertFail(); done(); }) @@ -1598,7 +1598,7 @@ describe('ActsBundleManagerTest', function () { let queryResultCount = 0; for (let i = 0, len = data.length; i < len; i++) { let datainfo = data[i]; - console.info("queryAbilityByWant_0500 success:" + JSON.stringify(datainfo)); + console.info("testQueryAbilityByWantThereHapPromise success:" + JSON.stringify(datainfo)); if (datainfo.bundleName == NAME3) { expect(datainfo.name).assertEqual("com.example.myapplication.MainAbility"); expect(datainfo.label).assertEqual("$string:app_name"); @@ -1643,17 +1643,17 @@ describe('ActsBundleManagerTest', function () { } /** - * @tc.number queryAbilityByWant_0600 - * @tc.name BUNDLE::queryAbilityByWant + * @tc.number queryAbilityByWant_0700 + * @tc.name testQueryAbilityByWantThereHapCallback * @tc.desc Test queryAbilityByWant interfaces with three haps. (by callback) */ - it('queryAbilityByWant_0600', 0, async function (done) { + it('testQueryAbilityByWantThereHapCallback', 0, async function (done) { await demo.queryAbilityByWant( { entities: ['entity.system.home', 'entitiesentities'] }, 4, userId, (err, data) => { if (err) { - console.info("queryAbilityByWant_0600 err" + JSON.stringify(err)); + console.info("testQueryAbilityByWantThereHapCallback err" + JSON.stringify(err)); expect(err).assertFail(); done(); return; @@ -1667,7 +1667,7 @@ describe('ActsBundleManagerTest', function () { let queryResultCount = 0; for (let i = 0, len = data.length; i < len; i++) { let datainfo = data[i]; - console.info("queryAbilityByWant_0600 success:" + JSON.stringify(datainfo)); + console.info("testQueryAbilityByWantThereHapCallback success:" + JSON.stringify(datainfo)); if (datainfo.bundleName == NAME3) { expect(datainfo.name).assertEqual("com.example.myapplication.MainAbility"); expect(datainfo.label).assertEqual("$string:app_name"); @@ -1708,85 +1708,85 @@ describe('ActsBundleManagerTest', function () { } /** - * @tc.number queryAbilityByWant_0700 - * @tc.name BUNDLE::queryAbilityByWant + * @tc.number queryAbilityByWant_0800 + * @tc.name testQueryAbilityByWantNotExistHapPromise * @tc.desc Test queryAbilityByWant interfaces with one hap. (by promise) */ - it('queryAbilityByWant_0700', 0, async function (done) { + it('testQueryAbilityByWantNotExistHapPromise', 0, async function (done) { await demo.queryAbilityByWant( { "bundleName": "wrong name", "abilityName": "com.example.myapplication1.MainAbility" }, demo.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(datainfo => { - console.info("queryAbilityByWant_0700 dataInfo : ===========" + datainfo); + console.info("testQueryAbilityByWantNotExistHapPromise dataInfo : ===========" + datainfo); expect(datainfo).assertFail(); done(); }).catch(err => { - console.info("queryAbilityByWant_0700 err : ===========" + err); + console.info("testQueryAbilityByWantNotExistHapPromise err : ===========" + err); expect(err).assertEqual(1); done(); }) }) /** - * @tc.number queryAbilityByWant_0800 - * @tc.name BUNDLE::queryAbilityByWant + * @tc.number queryAbilityByWant_0900 + * @tc.name testQueryAbilityByWantNotExistHapCallback * @tc.desc Test queryAbilityByWant interfaces with one hap. (by callback) */ - it('queryAbilityByWant_0800', 0, async function (done) { + it('testQueryAbilityByWantNotExistHapCallback', 0, async function (done) { await demo.queryAbilityByWant( { "bundleName": "wrong name", "abilityName": "com.example.myapplication1.MainAbility" }, demo.BundleFlag.GET_BUNDLE_DEFAULT, userId, (err, datainfo) => { if (err) { - console.info("queryAbilityByWant_0800 err : ===========" + err); + console.info("testQueryAbilityByWantNotExistHapCallback err : ===========" + err); expect(err).assertEqual(1); done(); return; } - console.info("queryAbilityByWant_0800 dataInfo : ===========" + datainfo); + console.info("testQueryAbilityByWantNotExistHapCallback dataInfo : ===========" + datainfo); expect(datainfo).assertFail(); done(); }) }) /** - * @tc.number queryAbilityByWant_0900 - * @tc.name BUNDLE::queryAbilityByWant - * @tc.desc Test queryAbilityByWant interfaces with system hap. (by callback) + * @tc.number queryAbilityByWant_0400 + * @tc.name testQueryAbilityByWantSystemHapPromise + * @tc.desc Test queryAbilityByWant interfaces with system hap. (by promise) */ - it('queryAbilityByWant_0900', 0, async function (done) { + it('testQueryAbilityByWantSystemHapPromise', 0, async function (done) { await demo.queryAbilityByWant( { bundleName: "wrong name", abilityName: "wrong name", }, 0, userId).then(datainfo => { - console.info("queryAbilityByWant_0900 dataInfo : ===========" + datainfo); + console.info("testQueryAbilityByWantSystemHapPromise dataInfo : ===========" + datainfo); expect(datainfo.length).assertLarger(0); done(); }).catch(err => { - console.info("queryAbilityByWant_0900 err : ===========" + err); + console.info("testQueryAbilityByWantSystemHapPromise err : ===========" + err); expect(err).assertEqual(1); done(); }) }) /** - * @tc.number queryAbilityByWant_1000 - * @tc.name BUNDLE::queryAbilityByWant + * @tc.number queryAbilityByWant_1100 + * @tc.name testQueryAbilityByWantSystemHapCallback * @tc.desc Test queryAbilityByWant interfaces with system hap. (by callback) */ - it('queryAbilityByWant_1000', 0, async function (done) { - demo.queryAbilityByWant( + it('testQueryAbilityByWantSystemHapCallback', 0, async function (done) { + demo.queryAbilityByWant( { bundleName: "wrong name", abilityName: "wrong name", }, 0, userId, OnReceiveEvent); function OnReceiveEvent(err, datainfo) { - console.info("queryAbilityByWant_1000 err : ===========" + err); - console.info("queryAbilityByWant_1000 dataInfo : ===========" + datainfo); + console.info("testQueryAbilityByWantSystemHapCallback err : ===========" + err); + console.info("testQueryAbilityByWantSystemHapCallback dataInfo : ===========" + datainfo); expect(err).assertEqual(1); expect(datainfo.length).assertLarger(0); done();