未验证 提交 240c7bd6 编写于 作者: O openharmony_ci 提交者: Gitee

!2451 getAbilityIcon相关

Merge pull request !2451 from 李嘉滢/master
...@@ -19,6 +19,8 @@ const BUNDLE_NAME1 = 'com.example.third1'; ...@@ -19,6 +19,8 @@ const BUNDLE_NAME1 = 'com.example.third1';
const BUNDLE_NAME2 = 'com.example.third2'; const BUNDLE_NAME2 = 'com.example.third2';
const BUNDLE_NAME4 = 'com.example.third4'; const BUNDLE_NAME4 = 'com.example.third4';
const BUNDLE_NAME5 = 'com.example.third5'; 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 SYSTEM_BUNDLE = 'com.example.system1';
const VENDOR_BUNDLE = 'com.example.vendor1'; const VENDOR_BUNDLE = 'com.example.vendor1';
const DESIGHN_WIDTH = 770; const DESIGHN_WIDTH = 770;
...@@ -1268,4 +1270,34 @@ describe('ActsBmsFormsInfoTest', function () { ...@@ -1268,4 +1270,34 @@ describe('ActsBmsFormsInfoTest', function () {
expect(dataInfo.window.autoDesignWidth).assertEqual(false); 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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册