提交 de49830c 编写于 作者: qq_41863798's avatar qq_41863798

getAbilityIcon

Signed-off-by: qq_41863798's avatarlijiaying <1640106564@qq.com>
上级 12b94d32
......@@ -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;
......@@ -1649,4 +1651,33 @@ 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) {
let pixelmap = await bundle.getAbilityIcon(BUNDLE_NAME6, ABILITIY_NAME)
console.log('bms_getAbilityIcon_0200 success: ' + pixelmap);
expect(pixelmap !== null).assertTrue()
done()
})
})
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册