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

!1801 bms xts fix

Merge pull request !1801 from SoftSquirrel/master
......@@ -244,7 +244,11 @@ describe('ActsBmsKitTest', function () {
expect(data[i].lastLaunchTime).assertLarger(0);
console.debug('=============isRemoved==============' + JSON.stringify(data[i].isRemoved));
expect(data[i].isRemoved).assertEqual(false);
expect(data[i].installationFreeSupported).assertEqual(false);
if (data[i].bundleName == 'com.ohos.launcher') {
expect(data[i].installationFreeSupported).assertTrue();
} else {
expect(data[i].installationFreeSupported).assertFalse();
}
}
}
function checkIsExist(data, bundleName) {
......
......@@ -96,24 +96,40 @@ describe('ActsBundleManagerUninstall', function () {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_CONFLICT);
expect(data.statusMessage).assertEqual('STATUS_INSTALL_FAILURE_CONFLICT');
var datainfo1 = await demo.getBundleInfo(NAME1, 1);
var datainfo2 = await demo.getBundleInfo(NAME2, 1);
expect(datainfo1.name).assertEqual('');
expect(datainfo2.name).assertEqual('');
var datainfo1 = demo.getBundleInfo(NAME1, 1);
datainfo1.then(data => {
expect().assertFail();
}).catch(err => {
expect(err).assertEqual(1);
});
var datainfo2 = demo.getBundleInfo(NAME2, 1);
datainfo2.then(data => {
expect().assertFail();
}).catch(err => {
expect(err).assertEqual(1);
});
installData.uninstall(NAME1, {
userId: 100,
installFlag: 1,
isKeepData: false
}, async(err, data) => {
var datainfo3 = await demo.getBundleInfo(NAME1, 1);
expect(datainfo3.name).assertEqual('');
var datainfo3 = demo.getBundleInfo(NAME1, 1);
datainfo3.then(data => {
expect().assertFail();
}).catch(err => {
expect(err).assertEqual(1);
});
installData.uninstall(NAME2, {
userId: 100,
installFlag: 1,
isKeepData: false
}, async(err, data) => {
var datainfo4 = await demo.getBundleInfo(NAME2, 1);
expect(datainfo4.name).assertEqual('');
var datainfo4 = demo.getBundleInfo(NAME2, 1);
datainfo4.then(data => {
expect().assertFail();
}).catch(err => {
expect(err).assertEqual(1);
});
done();
})
})
......@@ -135,33 +151,57 @@ describe('ActsBundleManagerUninstall', function () {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_INVALID);
expect(data.statusMessage).assertEqual('STATUS_INSTALL_FAILURE_INVALID');
var datainfo1 = await demo.getBundleInfo(NAME3, 1);
expect(datainfo1.name).assertEqual('');
var datainfo2 = await demo.getBundleInfo(NAME4, 1);
expect(datainfo2.name).assertEqual('');
var datainfo3 = await demo.getBundleInfo(NAME5, 1);
expect(datainfo3.name).assertEqual('');
var datainfo1 = demo.getBundleInfo(NAME3, 1);
datainfo1.then(data => {
expect().assertFail();
}).catch(err => {
expect(err).assertEqual(1);
});
var datainfo2 = demo.getBundleInfo(NAME4, 1);
datainfo2.then(data => {
expect().assertFail();
}).catch(err => {
expect(err).assertEqual(1);
});
var datainfo3 = demo.getBundleInfo(NAME5, 1);
datainfo3.then(data => {
expect().assertFail();
}).catch(err => {
expect(err).assertEqual(1);
});
installData.uninstall(NAME3, {
userId: 100,
installFlag: 1,
isKeepData: false
}, async(err, data) => {
var datainfo4 = await demo.getBundleInfo(NAME3, 1);
expect(datainfo4.name).assertEqual('');
var datainfo4 = demo.getBundleInfo(NAME3, 1);
datainfo4.then(data => {
expect().assertFail();
}).catch(err => {
expect(err).assertEqual(1);
});
installData.uninstall(NAME4, {
userId: 100,
installFlag: 1,
isKeepData: false
}, async(err, data) => {
var datainfo5 = await demo.getBundleInfo(NAME4, 1);
expect(datainfo5.name).assertEqual('');
var datainfo5 = demo.getBundleInfo(NAME4, 1);
datainfo5.then(data => {
expect().assertFail();
}).catch(err => {
expect(err).assertEqual(1);
});
installData.uninstall(NAME5, {
userId: 100,
installFlag: 1,
isKeepData: false
}, async(err, data) => {
var datainfo6 = await demo.getBundleInfo(NAME5, 1);
expect(datainfo6.name).assertEqual('');
var datainfo6 = demo.getBundleInfo(NAME5, 1);
datainfo6.then(data => {
expect().assertFail();
}).catch(err => {
expect(err).assertEqual(1);
});
done();
});
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册