提交 18f6bd55 编写于 作者: I inter515

删除setApplicationEnabled和setAbilityEnabled接口

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