diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsFormsInfoTest.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsFormsInfoTest.test.js index 2ee6629ba65187c10fe54ffb2d74c2719229d84d..be3e859210d6895263656882ee874576a06f3383 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsFormsInfoTest.test.js +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsFormsInfoTest.test.js @@ -19,6 +19,8 @@ const BUNDLE_NAME1 = 'com.example.third1'; const BUNDLE_NAME2 = 'com.example.third2'; const BUNDLE_NAME4 = 'com.example.third4'; const BUNDLE_NAME5 = 'com.example.third5'; +const BUNDLE_NAME6 = "com.ohos.callui" +const ABILITIY_NAME = "com.ohos.callui.MainAbility" const SYSTEM_BUNDLE = 'com.example.system1'; const VENDOR_BUNDLE = 'com.example.vendor1'; const DESIGHN_WIDTH = 770; @@ -1268,4 +1270,34 @@ describe('ActsBmsFormsInfoTest', function () { expect(dataInfo.window.autoDesignWidth).assertEqual(false); } + /* + * @tc.number: bms_getAbilityIcon_0100 + * @tc.name: test getAbilityIcon` + * @tc.desc: get the abilityIcon + */ + it('bms_getAbilityIcon_0100', 0, async function (done) { + bundle.getAbilityIcon(BUNDLE_NAME6, ABILITIY_NAME).then(pixelmap => { + console.log('bms_getAbilityIcon_0100 success: ' + pixelmap); + expect(pixelmap !== null).assertTrue() + done() + }) + .catch(err => { + console.info("getAbilityIcon fail:" + JSON.stringify(err)) + expect(err).assertFail() + done() + }) + }) + + /* + * @tc.number: bms_getAbilityIcon_0200 + * @tc.name: test getAbilityIcon + * @tc.desc: get the abilityIcon + */ + it('bms_getAbilityIcon_0200', 0, async function (done) { + bundle.getAbilityIcon(BUNDLE_NAME6, ABILITIY_NAME, (err, pixelmap) => { + expect(err).assertFail() + expect(pixelmap !== null).assertTrue() + done() + }) + }) }) \ No newline at end of file