提交 45e576b0 编写于 作者: I inter515

删除setAbilityEnabled和setApplicationEnabled

Signed-off-by: Ninter515 <ry.renyi@huawei.com>
上级 41accc39
......@@ -32,10 +32,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
it('getApplicationInfoTest_100', 0, async function (done) {
await bundle.getApplicationInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG, DEFAULT_USER_ID).then(data => {
expect().assertFail();
done();
}).catch(err => {
expect(err).assertEqual(INVALID_CODE);
done();
});
bundle.getApplicationInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG, DEFAULT_USER_ID, (err, data) => {
expect(err).assertEqual(INVALID_CODE);
......@@ -52,10 +50,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
it('getAllApplicationInfoTest_100', 0, async function (done) {
await bundle.getAllApplicationInfo(DEFAULT_FLAG, DEFAULT_USER_ID).then(data => {
expect().assertFail();
done();
}).catch(err => {
expect(err).assertEqual(INVALID_CODE);
done();
});
bundle.getAllApplicationInfo(DEFAULT_FLAG, DEFAULT_USER_ID, (err, data) => {
expect(err).assertEqual(INVALID_CODE);
......@@ -72,10 +68,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
it('getBundleInfoTest_100', 0, async function (done) {
await bundle.getBundleInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_USER_ID).then(data => {
expect().assertFail();
done();
}).catch(err => {
expect(err).assertEqual(INVALID_CODE);
done();
});
bundle.getBundleInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_USER_ID, (err, data) => {
expect(err).assertEqual(INVALID_CODE);
......@@ -92,10 +86,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
it('getAllBundleInfoTest_100', 0, async function (done) {
await bundle.getAllBundleInfo(DEFAULT_FLAG).then(data => {
expect().assertFail();
done();
}).catch(err => {
expect(err).assertEqual(INVALID_CODE);
done();
});
bundle.getAllBundleInfo(DEFAULT_FLAG, (err, data) => {
expect(err).assertEqual(INVALID_CODE);
......@@ -115,10 +107,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
abilityName: LAUNCHER_MAIN_ABILITY
}, DEFAULT_FLAG, DEFAULT_USER_ID).then(data => {
expect().assertFail();
done();
}).catch(err => {
expect(err).assertEqual(INVALID_CODE);
done();
});
bundle.queryAbilityByWant({
bundleName: LAUNCHER_BUNDLE_NAME,
......@@ -139,10 +129,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
it('getLaunchWantForBundleTest_100', 0, async function (done) {
await bundle.getLaunchWantForBundle(LAUNCHER_BUNDLE_NAME).then(data => {
expect().assertFail();
done();
}).catch(err => {
expect(err).assertEqual(INVALID_CODE);
done();
});
bundle.getLaunchWantForBundle(LAUNCHER_BUNDLE_NAME, (err, data) => {
expect(err).assertEqual(INVALID_CODE);
......@@ -151,40 +139,6 @@ describe('ActsBmsJsUnPermissionTest', function () {
});
});
/*
* @tc.number: setApplicationEnabledTest_100
* @tc.name: test setApplicationEnabled
* @tc.desc: test setApplicationEnabled
*/
it('setApplicationEnabledTest_100', 0, async function (done) {
await bundle.setApplicationEnabled(LAUNCHER_BUNDLE_NAME, false).then(data => {
expect().assertFail();
done();
}).catch(err => {
expect(err).assertEqual(INVALID_CODE);
done();
});
});
/*
* @tc.number: setAbilityEnabledTest_100
* @tc.name: test setAbilityEnabled
* @tc.desc: test setAbilityEnabled
*/
it('setAbilityEnabledTest_100', 0, async function (done) {
let abilityInfo = {
bundleName: LAUNCHER_BUNDLE_NAME,
name: LAUNCHER_MAIN_ABILITY
};
await bundle.setAbilityEnabled(abilityInfo, false).then(data => {
expect().assertFail();
done();
}).catch(err => {
expect(err).assertEqual(INVALID_CODE);
done();
});
});
/*
* @tc.number: getAbilityLabelTest_100
* @tc.name: getAbilityLabel : Gets the specified ability label
......@@ -195,11 +149,9 @@ describe('ActsBmsJsUnPermissionTest', function () {
await bundle.getAbilityLabel(LAUNCHER_BUNDLE_NAME, LAUNCHER_MAIN_ABILITY)
.then((data) => {
expect().assertFail();
done();
})
.catch((error) => {
expect(error).assertEqual(INVALID_CODE);
done();
});
bundle.getAbilityLabel(LAUNCHER_BUNDLE_NAME, LAUNCHER_MAIN_ABILITY, (err, data) => {
expect(err).assertEqual(INVALID_CODE);
......@@ -216,10 +168,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
it('getAbilityInfo_100', 0, async function (done) {
await bundle.getAbilityInfo(LAUNCHER_BUNDLE_NAME, LAUNCHER_MAIN_ABILITY).then(data => {
expect().assertFail();
done();
}).catch(err => {
expect(err).assertEqual(INVALID_CODE);
done();
});
bundle.getAbilityInfo(LAUNCHER_BUNDLE_NAME, LAUNCHER_MAIN_ABILITY, (err, data) => {
expect(err).assertEqual(INVALID_CODE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册