提交 fc3b5f23 编写于 作者: W wangtiantian

IssueNo: #I5JPY7:hasInstalled complete

Description:hasInstalled complete
Sig:SIG_ApplicaitonFramework
Feature or Bugfix:Bugfix
Binary Source:No
Signed-off-by: Nwangtiantian <wangtiantian19@huawei.com>
上级 e10756f4
......@@ -102,10 +102,12 @@ export default function actsBmsJsUnPermissionTest() {
* @tc.desc: test hasInstalled without permission
*/
it('SUB_BMS_HAP_STATUS_0011', 0, async function (done) {
let flag = 0;
pkg.hasInstalled({
bundleName: SELF_BUNDLENAME,
success: function success(data) {
console.info("get hasInstalled success" + JSON.stringify(data));
flag += 1;
expect(data.result).assertTrue();
done();
},
......@@ -116,7 +118,7 @@ export default function actsBmsJsUnPermissionTest() {
},
complete: function complete() {
console.info("get hasInstalled complete");
expect().assertFail();
expect(flag).assertEqual(1);
done();
}
})
......@@ -128,10 +130,12 @@ export default function actsBmsJsUnPermissionTest() {
* @tc.desc: test hasInstalled without permission
*/
it('SUB_BMS_HAP_STATUS_0012', 0, async function (done) {
let flag = 0;
pkg.hasInstalled({
bundleName: BUNDLE_NAME_OTHER,
success: function success(data) {
console.info("get hasInstalled success" + JSON.stringify(data));
flag += 1;
expect(data.result).assertFalse();
done();
},
......@@ -142,7 +146,7 @@ export default function actsBmsJsUnPermissionTest() {
},
complete: function complete() {
console.info("get hasInstalled complete");
expect().assertFail();
expect(flag).assertEqual(1);
done();
}
})
......
......@@ -29,10 +29,12 @@ describe('ActsBmsHasInstalldTest', function () {
* @tc.desc Test hasInstalled interface.
*/
it('hasInstalled_0100', 0, async function (done) {
let flag = 0;
pkg.hasInstalled({
bundleName: 'com.ohos.launcher',
success: function success(data) {
console.info('hasInstalled success function in');
flag += 1;
expect(data.result).assertTrue();
done();
},
......@@ -43,7 +45,7 @@ describe('ActsBmsHasInstalldTest', function () {
},
complete: function complete() {
console.info('hasInstalled complete function in');
expect().assertFail();
expect(flag).assertEqual(1);
done();
}
});
......@@ -55,10 +57,12 @@ describe('ActsBmsHasInstalldTest', function () {
* @tc.desc Test hasInstalled interface.
*/
it('hasInstalled_0200', 0, async function (done) {
let flag = 0;
pkg.hasInstalled({
bundleName: 'wrongName',
success: function success(data) {
console.info('hasInstalled success function in');
flag += 1;
expect(data.result).assertFalse();
done();
},
......@@ -69,7 +73,7 @@ describe('ActsBmsHasInstalldTest', function () {
},
complete: function complete() {
console.info('hasInstalled complete function in');
expect().assertFail();
expect(flag).assertEqual(1);
done();
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册