From f88d7535dd87a5f882932b49766e938131c8b636 Mon Sep 17 00:00:00 2001 From: r00559040 Date: Mon, 14 Mar 2022 17:20:06 +0800 Subject: [PATCH] fixed 6c2fa38 from https://gitee.com/inter515/xts_acts_release/pulls/2426 delete getAllFormsInfo Signed-off-by: r00559040 --- .../main/js/test/ActsBmsFormsInfoTest.test.js | 381 ------------------ 1 file changed, 381 deletions(-) diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsFormsInfoTest.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsFormsInfoTest.test.js index 7937de1ab..4b9bf7629 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsFormsInfoTest.test.js +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsFormsInfoTest.test.js @@ -27,44 +27,6 @@ const BUNDLE_NAME6 = "com.ohos.callui" const ABILITIY_NAME = "com.ohos.callui.MainAbility" describe('ActsBmsFormsInfoTest', function () { - /** - * @tc.number: bms_getAllFormsInfo_0100 - * @tc.name: getAllFormsInfo : get forms information for all apps - * @tc.desc: check forms information include system and vendor apps (by promise) - */ - it('bms_getAllFormsInfo_0100', 0, async function (done) { - console.info('=====================bms_getAllFormsInfo_0100=================='); - let installer = await bundle.getBundleInstaller(); - installer.install(['/data/test/bmsThirdBundleTest1.hap'], { - userId: 100, - installFlag: 1, - isKeepData: false - }, onReceiveinstallEvent); - - async function onReceiveinstallEvent(err, data) { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - let formsInfo = await bundle.getAllFormsInfo(); - console.debug('======all form======' + JSON.stringify(formsInfo)); - expect(formsInfo.length).assertEqual(4); - checkFormIsExist('Form_JS1', formsInfo, '1'); - checkFormIsExist('Form_JS1S', formsInfo, '1S', true); - checkFormIsExist('Form_JS1V', formsInfo, '1V', false, true); - checkFormIsExist('Form_JS1V2', formsInfo, '1V2'); - installer.uninstall(BUNDLE_NAME1, { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - } - }) - function checkSystemHapForm(dataInfo) { console.debug('===system formInfo is ' + JSON.stringify(dataInfo)) expect(dataInfo.name).assertEqual('Form_JS1S'); @@ -117,349 +79,6 @@ describe('ActsBmsFormsInfoTest', function () { expect(dataInfo.window.autoDesignWidth).assertEqual(true); } - /** - * @tc.number: bms_getAllFormsInfo_0200 - * @tc.name: getAllFormsInfo : get forms information for all apps - * @tc.desc: check forms information include system and vendor apps (by callback) - */ - it('bms_getAllFormsInfo_0200', 0, async function (done) { - console.info('=====================bms_getAllFormsInfo_0200=================='); - let installer = await bundle.getBundleInstaller(); - installer.install(['/data/test/bmsThirdBundleTest1.hap'], { - userId: 100, - installFlag: 1, - isKeepData: false - }, onReceiveinstallEvent); - - function onReceiveinstallEvent(err, data) { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - bundle.getAllFormsInfo((err, formsInfo) => { - expect(err.code).assertEqual(0); - expect(formsInfo.length).assertLarger(0); - checkFormIsExist('Form_JS1', formsInfo, '1'); - checkFormIsExist('Form_JS1S', formsInfo, '1S', true); - checkFormIsExist('Form_JS1V', formsInfo, '1V', false, true); - checkFormIsExist('Form_JS1V2', formsInfo, '1V2'); - installer.uninstall(BUNDLE_NAME1, { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }); - } - }) - - /** - * @tc.number: bms_getAllFormsInfo_0300 - * @tc.name: getAllFormsInfo : get forms information for all apps - * @tc.desc: check whether the form information of the update app is updated (by promise) - */ - it('bms_getAllFormsInfo_0300', 0, async function (done) { - console.info('=====================bms_getAllFormsInfo_0300=================='); - let installer = await bundle.getBundleInstaller(); - installer.install(['/data/test/bmsThirdBundleTest1.hap'], { - userId: 100, - installFlag: 1, - isKeepData: false - }, onReceiveinstallEvent); - - function onReceiveinstallEvent(err, data) { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - installer.install(['/data/test/bmsThirdBundleTestA1.hap'], { - userId: 100, - installFlag: 1, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - var formsInfo = await bundle.getAllFormsInfo(); - expect(formsInfo.length).assertLarger(0); - checkFormNoExist(formsInfo, 'Form_JS1'); - checkFormIsExist('Form_JSA1', formsInfo, 'A1') - installer.uninstall(BUNDLE_NAME1, { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }); - } - }) - - /** - * @tc.number: bms_getAllFormsInfo_0400 - * @tc.name: getAllFormsInfo : get forms information for all apps - * @tc.desc: check whether the form information of the update app is updated (by callback) - */ - it('bms_getAllFormsInfo_0400', 0, async function (done) { - console.info('=====================bms_getAllFormsInfo_0400=================='); - let installer = await bundle.getBundleInstaller(); - installer.install(['/data/test/bmsThirdBundleTest1.hap'], { - userId: 100, - installFlag: 1, - isKeepData: false - }, onReceiveinstallEvent); - - function onReceiveinstallEvent(err, data) { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - installer.install(['/data/test/bmsThirdBundleTestA1.hap'], { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - bundle.getAllFormsInfo((err, formsInfo) => { - expect(err.code).assertEqual(0); - expect(formsInfo.length).assertLarger(0); - checkFormNoExist(formsInfo, 'Form_JS1'); - checkFormIsExist('Form_JSA1', formsInfo, 'A1'); - installer.uninstall(BUNDLE_NAME1, { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }); - }); - } - }) - - /** - * @tc.number: bms_getAllFormsInfo_0500 - * @tc.name: getAllFormsInfo : get forms information for all apps - * @tc.desc: check whether the form information of the uninstall app is removed (by promise) - */ - it('bms_getAllFormsInfo_0500', 0, async function (done) { - console.info('=====================bms_getAllFormsInfo_0500=================='); - let installer = await bundle.getBundleInstaller(); - installer.install(['/data/test/bmsThirdBundleTest1.hap'], { - userId: 100, - installFlag: 1, - isKeepData: false - }, onReceiveinstallEvent); - - function onReceiveinstallEvent(err, data) { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - installer.uninstall(BUNDLE_NAME1, { - userId: 100, - installFlag: 1, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - var formsInfo = await bundle.getAllFormsInfo(); - checkFormNoExist(formsInfo, 'Form_JS1'); - done(); - }); - } - }) - - /** - * @tc.number: bms_getAllFormsInfo_0600 - * @tc.name: getAllFormsInfo : get forms information for all apps - * @tc.desc: check whether the form information of the uninstall app is removed (by callback) - */ - it('bms_getAllFormsInfo_0600', 0, async function (done) { - console.info('=====================bms_getAllFormsInfo_0600=================='); - let installer = await bundle.getBundleInstaller(); - installer.install(['/data/test/bmsThirdBundleTest1.hap'], { - userId: 100, - installFlag: 1, - isKeepData: false - }, onReceiveinstallEvent); - - function onReceiveinstallEvent(err, data) { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - installer.uninstall(BUNDLE_NAME1, { - userId: 100, - installFlag: 1, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - bundle.getAllFormsInfo((err, formsInfo) => { - expect(err.code).assertEqual(0); - checkFormNoExist(formsInfo, 'Form_JS1'); - done(); - }); - }); - } - }) - - /** - * @tc.number: bms_getAllFormsInfo_0700 - * @tc.name: getAllFormsInfo : get forms information for all apps - * @tc.desc: check form information of all apps which include one app have two forms (by promise) - */ - it('bms_getAllFormsInfo_0700', 0, async function (done) { - console.info('=====================bms_getAllFormsInfo_0700=================='); - let installer = await bundle.getBundleInstaller(); - installer.install(['/data/test/bmsThirdBundleTest4.hap'], { - userId: 100, - installFlag: 1, - isKeepData: false - }, onReceiveinstallEvent); - - async function onReceiveinstallEvent(err, data) { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - var formsInfo = await bundle.getAllFormsInfo(); - expect(formsInfo.length).assertLarger(0); - checkFormIsExist('Form_JS4A', formsInfo, '4A'); - checkFormIsExist('Form_JS4B', formsInfo, '4B'); - installer.uninstall(BUNDLE_NAME4, { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - } - }) - - /** - * @tc.number: bms_getAllFormsInfo_0800 - * @tc.name: getAllFormsInfo : get forms information for all apps - * @tc.desc: check form information of all apps which include one app have two forms (by callback) - */ - it('bms_getAllFormsInfo_0800', 0, async function (done) { - console.info('=====================bms_getAllFormsInfo_0800=================='); - let installer = await bundle.getBundleInstaller(); - installer.install(['/data/test/bmsThirdBundleTest4.hap'], { - userId: 100, - installFlag: 1, - isKeepData: false - }, onReceiveinstallEvent); - - async function onReceiveinstallEvent(err, data) { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - bundle.getAllFormsInfo((err, formsInfo) => { - expect(err.code).assertEqual(0); - expect(formsInfo.length).assertLarger(0); - checkFormIsExist('Form_JS4A', formsInfo, '4A'); - checkFormIsExist('Form_JS4B', formsInfo, '4B'); - installer.uninstall(BUNDLE_NAME4, { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }); - } - }) - - /** - * @tc.number: bms_getAllFormsInfo_0900 - * @tc.name: getAllFormsInfo : get forms information for all apps - * @tc.desc: check form information of all apps which include one app have two abilities, - * and each ability has forms (by promise) - */ - it('bms_getAllFormsInfo_0900', 0, async function (done) { - console.info('=====================bms_getAllFormsInfo_0900=================='); - let installer = await bundle.getBundleInstaller(); - installer.install(['/data/test/bmsThirdBundleTest5.hap'], { - userId: 100, - installFlag: 1, - isKeepData: false - }, onReceiveinstallEvent); - - async function onReceiveinstallEvent(err, data) { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - var formsInfo = await bundle.getAllFormsInfo(); - expect(formsInfo.length).assertLarger(0); - checkFormIsExist('Form_JS5A', formsInfo, '5A'); - checkFormIsExist('Form_JS5B', formsInfo, '5B'); - installer.uninstall(BUNDLE_NAME5, { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - } - }) - - /** - * @tc.number: bms_getAllFormsInfo_1000 - * @tc.name: getAllFormsInfo : get forms information for all apps - * @tc.desc: check form information of all apps which include one app have two abilities, - * and each ability has forms (by callback) - */ - it('bms_getAllFormsInfo_1000', 0, async function (done) { - console.info('=====================bms_getAllFormsInfo_1000=================='); - let installer = await bundle.getBundleInstaller(); - installer.install(['/data/test/bmsThirdBundleTest5.hap'], { - userId: 100, - installFlag: 1, - isKeepData: false - }, onReceiveinstallEvent); - - async function onReceiveinstallEvent(err, data) { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - bundle.getAllFormsInfo((err, formsInfo) => { - expect(err.code).assertEqual(0); - expect(formsInfo.length).assertLarger(0); - checkFormIsExist('Form_JS5A', formsInfo, '5A'); - checkFormIsExist('Form_JS5B', formsInfo, '5B'); - installer.uninstall(BUNDLE_NAME5, { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }); - } - }) - /** * @tc.number: bms_getFormsInfo_0100 * @tc.name: getFormsInfo : get forms information for one app -- GitLab