diff --git a/aafwk/aafwk_standard/formmanager/BUILD.gn b/aafwk/aafwk_standard/formmanager/BUILD.gn index a8125ed771bc9134ff4f2f3637c3b7fa4806e522..2cd2cfbd7a63cc5d4b3c5510ab79d02737e66018 100644 --- a/aafwk/aafwk_standard/formmanager/BUILD.gn +++ b/aafwk/aafwk_standard/formmanager/BUILD.gn @@ -16,16 +16,6 @@ import("//test/xts/tools/build/suite.gni") group("formmanager") { testonly = true if (is_standard_system) { - deps = [ - # "formsystemtesthost/actsformfuzztest:ActsFormFuzzTest", - # "formsystemtesthost/actsformsoneandonetest:ActsFormsOneAndOneTest", - # "formsystemtesthost/actsformsoneandtwotest:ActsFormsOneAndTwoTest", - # "formsystemtesthost/actsformszeroandonetest:ActsFormsZeroAndOneTest", - # "formsystemtesthost/actsformszerotest:ActsFormsZeroTest", - # "formsystemtestservice/formsystemtestservicea:ActsFormSystemTestServiceA", - # "formsystemtestservice/formsystemtestserviceb:ActsFormSystemTestServiceB", - # "formsystemtestservice/formsystemtestservicec:ActsFormSystemTestServiceC", - # "formsystemtestservice/formsystemtestserviced:ActsFormSystemTestServiceD", - ] + deps = [ "formsystemtest_ets/formfuzztest:FormFuzzTest" ] } } diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/BUILD.gn similarity index 84% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/BUILD.gn rename to aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/BUILD.gn index 16ff726ad2e5b31764a0a3efbbd241d807b63292..dcb2604d3c9658a35e9153578b2c05d8c1d6342a 100644 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/BUILD.gn +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. +# Copyright (C) 2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -13,17 +13,18 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("ActsFormFuzzTest") { +ohos_js_hap_suite("FormFuzzTest") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", ":hjs_demo_resources", ] + ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActsFormFuzzTest" + hap_name = "FormFuzzTest" } ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/js/default" + source_dir = "./entry/src/main/ets/MainAbility" } ohos_resources("hjs_demo_resources") { sources = [ "./entry/src/main/resources" ] diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/Test.json similarity index 60% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/Test.json rename to aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/Test.json index ca4b7e971fcbaa4682e8030829ef7ed23504b168..b39f012d0d10e4a3b855a088f57a8b33119a9ac0 100644 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/Test.json +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/Test.json @@ -1,18 +1,18 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "JSUnitTest", - "test-timeout": "420000", - "package": "com.example.formfuzztest", - "shell-timeout": "600000" - }, - "kits": [ - { - "test-file-name": [ - "ActsFormFuzzTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} +{ + "description": "Configuration for hjunit demo Tests", + "driver": { + "type": "JSUnitTest", + "test-timeout": "600000", + "package": "com.ohos.st.formfuzztest", + "shell-timeout": "60000" + }, + "kits": [ + { + "test-file-name": [ + "FormFuzzTest.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + } + ] +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..936424cf10310da044ca0df21a366403f3731c72 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/config.json @@ -0,0 +1,144 @@ +{ + "app": { + "bundleName": "com.ohos.st.formfuzztest", + "vendor": "ohos", + "version": { + "code": 1000000, + "name": "1.0.0" + }, + "apiVersion": { + "compatible": 9, + "releaseType": "Release", + "target": 9 + } + }, + "deviceConfig": {}, + "module": { + "package": "com.ohos.st.formfuzztest", + "name": ".FormFuzzSTApp", + "mainAbility": ".MainAbility", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": false + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "visible": true, + "name": ".MainAbility", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "$string:description_mainability", + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + } + ], + "defPermissions": [ + { + "availableScope": [], + "grantMode": "system_grant", + "name": "FMS_FormDelete_commonEvent" + }, + { + "availableScope": [], + "grantMode": "system_grant", + "name": "FMS_FormOnAcquired_commonEvent" + }, + { + "availableScope": [], + "grantMode": "system_grant", + "name": "FMS_FormOnError_commonEvent" + }, + { + "availableScope": [], + "grantMode": "system_grant", + "name": "FMS_FormCast_commonEvent" + }, + { + "availableScope": [], + "grantMode": "system_grant", + "name": "FMS_FormSupply_commonEvent" + } + ], + "reqPermissions": [ + { + "name": "FMS_FormOnAcquired_commonEvent", + "reason": "need use onAcquired commonEvent" + }, + { + "name": "FMS_FormDelete_commonEvent", + "reason": "need use delete commonEvent" + }, + { + "name": "FMS_FormOnError_commonEvent", + "reason": "need use OnError commonEvent" + }, + { + "name": "FMS_FormCast_commonEvent", + "reason": "need use castFrom commonEvent" + }, + { + "name": "FMS_FormSupply_commonEvent", + "reason": "need use FormSupply commonEvent" + }, + { + "name": "ohos.permission.INSTALL_BUNDLE", + "reason": "need use ohos.permission.INSTALL_BUNDLE" + }, + { + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", + "reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + }, + { + "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE", + "reason": "need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" + }, + { + "name": "ohos.permission.REMOVE_CACHE_FILES", + "reason": "need use ohos.permission.REMOVE_CACHE_FILES" + }, + { + "name": "ohos.permission.LISTEN_BUNDLE_CHANGE", + "reason": "need use ohos.permission.LISTEN_BUNDLE_CHANGE" + }, + { + "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES", + "reason": "need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" + }, + { + "name": "ohos.permission.REQUIRE_FORM" + } + ], + "js": [ + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".MainAbility", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ] + } +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/app.ets similarity index 80% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/app.js rename to aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/app.ets index e423f4bce4698ec1d7dc86c3eea3990a5e7b1085..97f187805ddd3e803b7fc3550e49c8962fd136f1 100644 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/app.js +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/app.ets @@ -1,23 +1,23 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default { + onCreate() { + console.info('Application onCreate'); + }, + onDestroy() { + console.info('Application onDestroy'); + }, +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/pages/index.ets b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/pages/index.ets new file mode 100644 index 0000000000000000000000000000000000000000..9bdbb9de51e6b9b8287e4ac93376353e45fef020 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/pages/index.ets @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import featureAbility from "@ohos.ability.featureAbility"; +import file from '@system.file'; +import { Core, ExpectExtend, ReportExtend } from 'deccjsunit/index.ets'; +import testsuite from "../test/List.test.ets"; + +@Entry +@Component +struct Index { + private componentName: string = `FormSystemFuzzTest`; + + aboutToAppear() { + console.info(`${this.componentName} start run testcase!!!!`); + + featureAbility.getWant() + .then((want: any) => { + console.info(`${this.componentName} Operation successful. Data: ${JSON.stringify(want)}`); + const core = Core.getInstance(); + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }); + core.addService('expect', expectExtend); + const reportExtend = new ReportExtend(file); + core.addService('report', reportExtend); + core.init(); + core.subscribeEvent('task', reportExtend); + const configService = core.getDefaultService('config'); + configService.setConfig(want.parameters); + testsuite(); + core.execute(); + }) + .catch((error: any) => { + console.error(`${this.componentName} Operation failed. Cause: ${JSON.stringify(error)}`); + }) + } + + build() { + Flex({ + direction: FlexDirection.Column, + alignItems: ItemAlign.Center, + justifyContent: FlexAlign.Center + }) { + Text(`${this.componentName}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + } + .width('100%') + .height('100%') + } +} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/CastTempFormFuzz.test.ets b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/CastTempFormFuzz.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f7830aac88877ac7d87776e16c0d05c6f7d4ce80 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/CastTempFormFuzz.test.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import formHost from '@ohos.application.formHost'; +import { describe, expect, it } from 'deccjsunit/index.ets'; +import { DATA_TYPE_LIST, getFuzzData } from './getParam.ets'; + +export const castTempFormFuzzTest = (describeName, filterParameter) => { + const ERR_ADD_INVALID_PARAM_CODE = 7; + const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`; + + describe(`${describeName}`, () => { + const callbackName = `FMS_fuzzTest_casttempform`; + const promiseName = `FMS_fuzzTest_casttempform`; + const length = DATA_TYPE_LIST.length; + + for (let i = 0; i < length; ++i) { + const tcNumber = `0${(i + 1) * 100}`; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_casttempform_0100 ~ FMS_fuzzTest_casttempform_0800 + * @tc.desc Check whether the castTempForm interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = getFuzzData(dataType); + console.log(`${callbackName} ${tcNumber} formId typeof: ${typeof formId}`); + try { + formHost.castTempForm(formId, (error, data) => { + console.log(`${callbackName} ${tcNumber} castTempForm data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + let tcNumber: any = (i + 1 + length) * 100; + tcNumber = tcNumber < 1000 ? `0${tcNumber}` : tcNumber; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_casttempform_0900 ~ FMS_fuzzTest_casttempform_1600 + * @tc.desc Check whether the castTempForm interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = getFuzzData(dataType); + console.log(`${promiseName} ${tcNumber} ${describeName} formId typeof: ${typeof formId}`); + try { + const data = await formHost.castTempForm(formId); + console.log(`${promiseName} ${tcNumber} castTempForm data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + } + }); + } + }); +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/DeleteFormFuzz.test.ets b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/DeleteFormFuzz.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b8b69cd7634cbc929c397002b97de0ae0cb9ddac --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/DeleteFormFuzz.test.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import formHost from '@ohos.application.formHost'; +import { describe, expect, it } from 'deccjsunit/index.ets'; +import { DATA_TYPE_LIST, getFuzzData } from './getParam.ets'; + +export const deleteFormFuzzTest = (describeName, filterParameter) => { + const ERR_ADD_INVALID_PARAM_CODE = 7; + const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`; + + describe(`${describeName}`, () => { + const callbackName = `FMS_fuzzTest_deleteform`; + const promiseName = `FMS_fuzzTest_deleteform`; + const length = DATA_TYPE_LIST.length; + + for (let i = 0; i < length; ++i) { + const tcNumber = `0${(i + 1) * 100}`; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_deleteform_0100 ~ FMS_fuzzTest_deleteform_0800 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = getFuzzData(dataType); + console.log(`${callbackName} ${tcNumber} formId typeof: ${typeof formId}`); + try { + formHost.deleteForm(formId, (error, data) => { + console.log(`${callbackName} ${tcNumber} deleteForm data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + let tcNumber: any = (i + 1 + length) * 100; + tcNumber = tcNumber < 1000 ? `0${tcNumber}` : tcNumber; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_deleteform_0900 ~ FMS_fuzzTest_deleteform_1600 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = getFuzzData(dataType); + console.log(`${promiseName} ${tcNumber} ${describeName} formId typeof: ${typeof formId}`); + try { + const data = await formHost.deleteForm(formId); + console.log(`${promiseName} ${tcNumber} deleteForm data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + } + }); + } + }); +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/DisableFormsUpdateFuzz.test.ets b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/DisableFormsUpdateFuzz.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..fca311941194f99e4bfe1deebdd14c023176f591 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/DisableFormsUpdateFuzz.test.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import formHost from '@ohos.application.formHost'; +import { describe, expect, it } from 'deccjsunit/index.ets'; +import { DATA_TYPE_LIST, getFuzzData } from './getParam.ets'; + +export const disableFormsUpdateFuzzTest = (describeName, filterParameter) => { + const ERR_ADD_INVALID_PARAM_CODE = 7; + const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`; + + describe(`${describeName}`, () => { + const callbackName = `FMS_fuzzTest_disable`; + const promiseName = `FMS_fuzzTest_disable`; + const length = DATA_TYPE_LIST.length; + + for (let i = 0; i < length; ++i) { + const tcNumber = `0${(i + 1) * 100}`; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_disable_0100 ~ FMS_fuzzTest_disable_0800 + * @tc.desc Check whether the disableFormsUpdate interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formIds = getFuzzData(dataType); + console.log(`${callbackName} ${tcNumber} formIds typeof: ${typeof formIds}`); + try { + formHost.disableFormsUpdate(formIds, (error, data) => { + console.log(`${callbackName} ${tcNumber} disableFormsUpdate data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + let tcNumber: any = (i + 1 + length) * 100; + tcNumber = tcNumber < 1000 ? `0${tcNumber}` : tcNumber; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_disable_0900 ~ FMS_fuzzTest_disable_1600 + * @tc.desc Check whether the disableFormsUpdate interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formIds = getFuzzData(dataType); + console.log(`${promiseName} ${tcNumber} ${describeName} formIds typeof: ${typeof formIds}`); + try { + const data = await formHost.disableFormsUpdate(formIds); + console.log(`${promiseName} ${tcNumber} disableFormsUpdate data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + } + }); + } + }); +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/EnableFormsUpdateFuzz.test.ets b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/EnableFormsUpdateFuzz.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..6128e96d1281573042eef7f64cbbb1fe9e748677 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/EnableFormsUpdateFuzz.test.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import formHost from '@ohos.application.formHost'; +import { describe, expect, it } from 'deccjsunit/index.ets'; +import { DATA_TYPE_LIST, getFuzzData } from './getParam.ets'; + +export const enableFormsUpdateFuzzTest = (describeName, filterParameter) => { + const ERR_ADD_INVALID_PARAM_CODE = 7; + const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`; + + describe(`${describeName}`, () => { + const callbackName = `FMS_fuzzTest_enable`; + const promiseName = `FMS_fuzzTest_enable`; + const length = DATA_TYPE_LIST.length; + + for (let i = 0; i < length; ++i) { + const tcNumber = `0${(i + 1) * 100}`; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_enable_0100 ~ FMS_fuzzTest_enable_0800 + * @tc.desc Check whether the enableFormsUpdate interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formIds = getFuzzData(dataType); + console.log(`${callbackName} ${tcNumber} formIds typeof: ${typeof formIds}`); + try { + formHost.enableFormsUpdate(formIds, (error, data) => { + console.log(`${callbackName} ${tcNumber} enableFormsUpdate data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + let tcNumber: any = (i + 1 + length) * 100; + tcNumber = tcNumber < 1000 ? `0${tcNumber}` : tcNumber; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_enable_0900 ~ FMS_fuzzTest_enable_1600 + * @tc.desc Check whether the enableFormsUpdate interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formIds = getFuzzData(dataType); + console.log(`${promiseName} ${tcNumber} ${describeName} formIds typeof: ${typeof formIds}`); + try { + const data = await formHost.enableFormsUpdate(formIds); + console.log(`${promiseName} ${tcNumber} enableFormsUpdate data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + } + }); + } + }); +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/GetFormsInfoFuzz.test.ets b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/GetFormsInfoFuzz.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..4e55c4399d500ae7c2cb53fbe306cd0418cd3f18 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/GetFormsInfoFuzz.test.ets @@ -0,0 +1,233 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import formHost from '@ohos.application.formHost'; +import { describe, expect, it } from 'deccjsunit/index.ets'; +import { DATA_TYPE_LIST, getFuzzData } from './getParam.ets'; + +export const getFormsInfoFuzzTest = (describeName, filterParameter) => { + const ERR_GET_BUNDLE_FAILED_CODE = 5; + const ERR_GET_BUNDLE_FAILED = `failed to obtain the bundle information`; + const ERR_ADD_INVALID_PARAM_CODE = 7; + const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`; + + describe(`${describeName}`, () => { + const callbackName = `FMS_fuzzTest_getinfobundle`; + const promiseName = `FMS_fuzzTest_getinfobundle`; + const length = DATA_TYPE_LIST.length; + + for (let i = 0; i < length; ++i) { + const tcNumber = `0${(i + 1) * 100}`; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_getinfobundle_0100 ~ FMS_fuzzTest_getinfobundle_0800 + * @tc.desc Check whether the getFormsInfo interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const bundleName = getFuzzData(dataType); + console.log(`${callbackName} ${tcNumber} bundleName typeof: ${typeof bundleName}`); + try { + formHost.getFormsInfo(bundleName, (error, data) => { + console.log(`${callbackName} ${tcNumber} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + if (`STRING` === dataType) { + expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE); + expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED); + } else { + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + } + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + let tcNumber: any = (i + 1 + length) * 100; + tcNumber = tcNumber < 1000 ? `0${tcNumber}` : tcNumber; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_getinfobundle_0900 ~ FMS_fuzzTest_getinfobundle_1600 + * @tc.desc Check whether the getFormsInfo interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const bundleName = getFuzzData(dataType); + console.log(`${promiseName} ${tcNumber} ${describeName} bundleName typeof: ${typeof bundleName}`); + try { + const data = await formHost.getFormsInfo(bundleName); + console.log(`${promiseName} ${tcNumber} getFormsInfo data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + if (`STRING` === dataType) { + expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE); + expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED); + } else { + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + } + done(); + } + }); + } + }); + + describe(`${describeName}`, () => { + const callbackName = `FMS_fuzzTest_getinfomodule`; + const promiseName = `FMS_fuzzTest_getinfomodule`; + const length = DATA_TYPE_LIST.length; + + for (let i = 0; i < length; ++i) { + const tcNumber = `0${(i + 1) * 100}`; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_getinfomodule_0100 ~ FMS_fuzzTest_getinfomodule_0800 + * @tc.desc Check whether the getFormsInfo interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const bundleName = getFuzzData(dataType); + const moduleName = `com.test.module_name_${tcNumber}`; + console.log(`${callbackName} ${tcNumber} bundleName typeof: ${typeof bundleName}`); + console.log(`${callbackName} ${tcNumber} moduleName typeof: ${typeof moduleName}`); + try { + formHost.getFormsInfo(bundleName, moduleName, (error, data) => { + console.log(`${callbackName} ${tcNumber} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + if (`STRING` === dataType) { + expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE); + expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED); + } else { + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + } + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + let tcNumber: any = (i + 1 + length) * 100; + tcNumber = tcNumber < 1000 ? `0${tcNumber}` : tcNumber; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_getinfomodule_0900 ~ FMS_fuzzTest_getinfomodule_1600 + * @tc.desc Check whether the getFormsInfo interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const bundleName = getFuzzData(dataType); + const moduleName = `com.test.module_name_${tcNumber}`; + console.log(`${promiseName} ${tcNumber} ${describeName} bundleName typeof: ${typeof bundleName}`); + console.log(`${promiseName} ${tcNumber} ${describeName} moduleName typeof: ${typeof moduleName}`); + try { + const data = await formHost.getFormsInfo(bundleName, moduleName); + console.log(`${promiseName} ${tcNumber} getFormsInfo data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + if (`STRING` === dataType) { + expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE); + expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED); + } else { + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + } + done(); + } + }); + } + + for (let i = 0; i < length; ++i) { + const tcNumber: any = (i + 1 + length * 2) * 100; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_getinfomodule_1700 ~ FMS_fuzzTest_getinfomodule_2400 + * @tc.desc Check whether the getFormsInfo interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const bundleName = `com.test.bundle_name_${tcNumber}`; + const moduleName = getFuzzData(dataType); + console.log(`${callbackName} ${tcNumber} bundleName typeof: ${typeof bundleName}`); + console.log(`${callbackName} ${tcNumber} moduleName typeof: ${typeof moduleName}`); + try { + formHost.getFormsInfo(bundleName, moduleName, (error, data) => { + console.log(`${callbackName} ${tcNumber} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + if (`STRING` === dataType) { + expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE); + expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED); + } else { + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + } + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + const tcNumber: any = (i + 1 + length * 3) * 100; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_getinfomodule_2500 ~ FMS_fuzzTest_getinfomodule_3200 + * @tc.desc Check whether the getFormsInfo interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const bundleName = `com.test.bundle_name_${tcNumber}`; + const moduleName = getFuzzData(dataType); + console.log(`${promiseName} ${tcNumber} ${describeName} bundleName typeof: ${typeof bundleName}`); + console.log(`${promiseName} ${tcNumber} ${describeName} moduleName typeof: ${typeof moduleName}`); + try { + const data = await formHost.getFormsInfo(bundleName, moduleName); + console.log(`${promiseName} ${tcNumber} getFormsInfo data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + if (`STRING` === dataType) { + expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE); + expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED); + } else { + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + } + done(); + } + }); + } + }) +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/List.test.ets b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/List.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..ebefecdb953a9824881c38a0e9df66f8ceaa5ef8 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/List.test.ets @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { castTempFormFuzzTest } from './CastTempFormFuzz.test.ets'; +import { deleteFormFuzzTest } from './DeleteFormFuzz.test.ets'; +import { disableFormsUpdateFuzzTest } from './DisableFormsUpdateFuzz.test.ets'; +import { enableFormsUpdateFuzzTest } from './EnableFormsUpdateFuzz.test.ets'; +import { getFormsInfoFuzzTest } from './GetFormsInfoFuzz.test.ets'; +import { notifyInvisibleFormsFuzzTest } from './NotifyInvisibleFormsFuzz.test.ets'; +import { notifyVisibleFormsFuzzTest } from './NotifyVisibleFormsFuzz.test.ets'; +import { releaseFormFuzzTest } from './ReleaseFormFuzz.test.ets'; +import { requestFormFuzzTest } from './RequestFormFuzz.test.ets'; +import { setFormNextRefreshTimeFuzzTest } from './SetFormNextRefreshTimeFuzz.test.ets'; +import { updateFormFuzzTest } from './UpdateFormFuzz.test.ets'; + +export default function testsuite() { + // FMS_fuzzTest_deleteform + deleteFormFuzzTest(`DeleteFormFuzzTest`, 0); + + // FMS_fuzzTest_releaseform + releaseFormFuzzTest(`ReleaseFormFuzzTest`, 0); + + // FMS_fuzzTest_casttempform + castTempFormFuzzTest(`CastTempFormFuzzTest`, 0); + + // FMS_fuzzTest_invisible + notifyVisibleFormsFuzzTest(`NotifyVisibleFormsFuzzTest`, 0); + + // FMS_fuzzTest_visible + notifyInvisibleFormsFuzzTest(`NotifyInvisibleFormsFuzzTest`, 0); + + // FMS_fuzzTest_requestform + requestFormFuzzTest(`RequestFormFuzzTest`, 0); + + // FMS_fuzzTest_updateform + updateFormFuzzTest(`UpdateFormFuzzTest`, 0); + + // FMS_fuzzTest_setnexttime + setFormNextRefreshTimeFuzzTest(`SetFormNextRefreshTimeFuzzTest`, 0); + + // FMS_fuzzTest_enable + enableFormsUpdateFuzzTest(`EnableFormsUpdateFuzzTest`, 0); + + // FMS_fuzzTest_disable + disableFormsUpdateFuzzTest(`DisableFormsUpdateFuzzTest`, 0); + + // FMS_fuzzTest_getinfobundle + // FMS_fuzzTest_getinfomodule + getFormsInfoFuzzTest(`GetFormsInfoFuzzTest`, 0); +} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/NotifyInvisibleFormsFuzz.test.ets b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/NotifyInvisibleFormsFuzz.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..05306c6bda4112c0f7a06a16c6c286adedeb2cd0 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/NotifyInvisibleFormsFuzz.test.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import formHost from '@ohos.application.formHost'; +import { describe, expect, it } from 'deccjsunit/index.ets'; +import { DATA_TYPE_LIST, getFuzzData } from './getParam.ets'; + +export const notifyInvisibleFormsFuzzTest = (describeName, filterParameter) => { + const ERR_ADD_INVALID_PARAM_CODE = 7; + const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`; + + describe(`${describeName}`, () => { + const callbackName = `FMS_fuzzTest_invisible`; + const promiseName = `FMS_fuzzTest_invisible`; + const length = DATA_TYPE_LIST.length; + + for (let i = 0; i < length; ++i) { + const tcNumber = `0${(i + 1) * 100}`; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_invisible_0100 ~ FMS_fuzzTest_invisible_0800 + * @tc.desc Check whether the notifyInvisibleForms interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formIds = getFuzzData(dataType); + console.log(`${callbackName} ${tcNumber} formIds typeof: ${typeof formIds}`); + try { + formHost.notifyInvisibleForms(formIds, (error, data) => { + console.log(`${callbackName} ${tcNumber} notifyInvisibleForms data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + let tcNumber: any = (i + 1 + length) * 100; + tcNumber = tcNumber < 1000 ? `0${tcNumber}` : tcNumber; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_invisible_0900 ~ FMS_fuzzTest_invisible_1600 + * @tc.desc Check whether the notifyInvisibleForms interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formIds = getFuzzData(dataType); + console.log(`${promiseName} ${tcNumber} ${describeName} formIds typeof: ${typeof formIds}`); + try { + const data = await formHost.notifyInvisibleForms(formIds); + console.log(`${promiseName} ${tcNumber} notifyInvisibleForms data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + } + }); + } + }); +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/NotifyVisibleFormsFuzz.test.ets b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/NotifyVisibleFormsFuzz.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..67d866f30faf4921eb9b19ef68a00c0b1955d8c9 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/NotifyVisibleFormsFuzz.test.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import formHost from '@ohos.application.formHost'; +import { describe, expect, it } from 'deccjsunit/index.ets'; +import { DATA_TYPE_LIST, getFuzzData } from './getParam.ets'; + +export const notifyVisibleFormsFuzzTest = (describeName, filterParameter) => { + const ERR_ADD_INVALID_PARAM_CODE = 7; + const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`; + + describe(`${describeName}`, () => { + const callbackName = `FMS_fuzzTest_visible`; + const promiseName = `FMS_fuzzTest_visible`; + const length = DATA_TYPE_LIST.length; + + for (let i = 0; i < length; ++i) { + const tcNumber = `0${(i + 1) * 100}`; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_visible_0100 ~ FMS_fuzzTest_visible_0800 + * @tc.desc Check whether the notifyVisibleForms interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formIds = getFuzzData(dataType); + console.log(`${callbackName} ${tcNumber} formIds typeof: ${typeof formIds}`); + try { + formHost.notifyVisibleForms(formIds, (error, data) => { + console.log(`${callbackName} ${tcNumber} notifyVisibleForms data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + let tcNumber: any = (i + 1 + length) * 100; + tcNumber = tcNumber < 1000 ? `0${tcNumber}` : tcNumber; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_visible_0900 ~ FMS_fuzzTest_visible_1600 + * @tc.desc Check whether the notifyVisibleForms interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formIds = getFuzzData(dataType); + console.log(`${promiseName} ${tcNumber} ${describeName} formIds typeof: ${typeof formIds}`); + try { + const data = await formHost.notifyVisibleForms(formIds); + console.log(`${promiseName} ${tcNumber} notifyVisibleForms data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + } + }); + } + }); +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/ReleaseFormFuzz.test.ets b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/ReleaseFormFuzz.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..090daa17659e926eda40cf701c74ce006daf28d8 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/ReleaseFormFuzz.test.ets @@ -0,0 +1,218 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import formHost from '@ohos.application.formHost'; +import { describe, expect, it } from 'deccjsunit/index.ets'; +import { DATA_TYPE_LIST, getFuzzData } from './getParam.ets'; + +export const releaseFormFuzzTest = (describeName, filterParameter) => { + const ERR_COMMON_CODE = 1; + const ERR_COMMON = `internal error`; + const ERR_ADD_INVALID_PARAM_CODE = 7; + const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`; + const ERR_NOT_EXIST_ID_CODE = 9; + const ERR_NOT_EXIST_ID = `the ID of the form to be operated does not exist`; + + describe(`${describeName}`, () => { + const callbackName = `FMS_fuzzTest_releaseform`; + const promiseName = `FMS_fuzzTest_releaseform`; + const length = DATA_TYPE_LIST.length; + + for (let i = 0; i < length; ++i) { + const tcNumber = `0${(i + 1) * 100}`; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_releaseform_0100 ~ FMS_fuzzTest_releaseform_0800 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = getFuzzData(dataType); + console.log(`${callbackName} ${tcNumber} formId typeof: ${typeof formId}`); + try { + formHost.releaseForm(formId, (error, data) => { + console.log(`${callbackName} ${tcNumber} releaseForm data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + let tcNumber: any = (i + 1 + length) * 100; + tcNumber = tcNumber < 1000 ? `0${tcNumber}` : tcNumber; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_releaseform_0900 ~ FMS_fuzzTest_releaseform_1600 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = getFuzzData(dataType); + console.log(`${promiseName} ${tcNumber} ${describeName} formId typeof: ${typeof formId}`); + try { + const data = await formHost.releaseForm(formId); + console.log(`${promiseName} ${tcNumber} releaseForm data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + if (`STRING` === dataType) { + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + } else { + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + } + done(); + } + }); + } + + for (let i = 0; i < length; ++i) { + const tcNumber: any = (i + 1 + length * 2) * 100; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_releaseform_1700 ~ FMS_fuzzTest_releaseform_2400 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = getFuzzData(dataType); + const isReleaseCache = true; + console.log(`${callbackName} ${tcNumber} formId typeof: ${typeof formId}`); + console.log(`${callbackName} ${tcNumber} isReleaseCache typeof: ${typeof isReleaseCache}`); + try { + formHost.releaseForm(formId, isReleaseCache, (error, data) => { + console.log(`${callbackName} ${tcNumber} releaseForm data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + const tcNumber: any = (i + 1 + length * 3) * 100; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_releaseform_2500 ~ FMS_fuzzTest_releaseform_3200 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = getFuzzData(dataType); + const isReleaseCache = true; + console.log(`${promiseName} ${tcNumber} ${describeName} formId typeof: ${typeof formId}`); + console.log(`${promiseName} ${tcNumber} ${describeName} isReleaseCache typeof: ${typeof isReleaseCache}`); + try { + const data = await formHost.releaseForm(formId, isReleaseCache); + console.log(`${promiseName} ${tcNumber} releaseForm data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + if (`STRING` === dataType) { + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + } else { + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + } + done(); + } + }); + } + + for (let i = 0; i < length; ++i) { + const tcNumber: any = (i + 1 + length * 4) * 100; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_releaseform_3300 ~ FMS_fuzzTest_releaseform_4000 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = `${tcNumber}`; + const isReleaseCache = getFuzzData(dataType); + console.log(`${callbackName} ${tcNumber} formId typeof: ${typeof formId}`); + console.log(`${callbackName} ${tcNumber} isReleaseCache typeof: ${typeof isReleaseCache}`); + try { + formHost.releaseForm(formId, isReleaseCache, (error, data) => { + console.log(`${callbackName} ${tcNumber} releaseForm data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + if (`BOOLEAN` === dataType) { + expect(error.code).assertEqual(ERR_NOT_EXIST_ID_CODE); + expect(error.message).assertEqual(ERR_NOT_EXIST_ID); + } else { + expect(error.code).assertEqual(ERR_COMMON_CODE); + expect(error.message).assertEqual(ERR_COMMON); + } + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + const tcNumber: any = (i + 1 + length * 5) * 100; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_releaseform_4100 ~ FMS_fuzzTest_releaseform_4800 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = `${tcNumber}`; + const isReleaseCache = getFuzzData(dataType); + console.log(`${promiseName} ${tcNumber} ${describeName} formId typeof: ${typeof formId}`); + console.log(`${promiseName} ${tcNumber} ${describeName} isReleaseCache typeof: ${typeof isReleaseCache}`); + try { + const data = await formHost.releaseForm(formId, isReleaseCache); + console.log(`${promiseName} ${tcNumber} releaseForm data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + if (`BOOLEAN` === dataType) { + expect(error.code).assertEqual(ERR_NOT_EXIST_ID_CODE); + expect(error.message).assertEqual(ERR_NOT_EXIST_ID); + } else { + expect(error.code).assertEqual(ERR_COMMON_CODE); + expect(error.message).assertEqual(ERR_COMMON); + } + done(); + } + }); + } + }); +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/RequestFormFuzz.test.ets b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/RequestFormFuzz.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e16563005172fc2d15157d8c95f20e7e3b854d57 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/RequestFormFuzz.test.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import formHost from '@ohos.application.formHost'; +import { describe, expect, it } from 'deccjsunit/index.ets'; +import { DATA_TYPE_LIST, getFuzzData } from './getParam.ets'; + +export const requestFormFuzzTest = (describeName, filterParameter) => { + const ERR_ADD_INVALID_PARAM_CODE = 7; + const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`; + + describe(`${describeName}`, () => { + const callbackName = `FMS_fuzzTest_requestform`; + const promiseName = `FMS_fuzzTest_requestform`; + const length = DATA_TYPE_LIST.length; + + for (let i = 0; i < length; ++i) { + const tcNumber = `0${(i + 1) * 100}`; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_requestform_0100 ~ FMS_fuzzTest_requestform_0800 + * @tc.desc Check whether the requestForm interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = getFuzzData(dataType); + console.log(`${callbackName} ${tcNumber} formId typeof: ${typeof formId}`); + try { + formHost.requestForm(formId, (error, data) => { + console.log(`${callbackName} ${tcNumber} requestForm data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + let tcNumber: any = (i + 1 + length) * 100; + tcNumber = tcNumber < 1000 ? `0${tcNumber}` : tcNumber; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_requestform_0900 ~ FMS_fuzzTest_requestform_1600 + * @tc.desc Check whether the requestForm interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = getFuzzData(dataType); + console.log(`${promiseName} ${tcNumber} ${describeName} formId typeof: ${typeof formId}`); + try { + const data = await formHost.requestForm(formId); + console.log(`${promiseName} ${tcNumber} requestForm data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + } + }); + } + }); +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/SetFormNextRefreshTimeFuzz.test.ets b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/SetFormNextRefreshTimeFuzz.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..19bb8800436532f2f8cf12ccb140197d67e2e76a --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/SetFormNextRefreshTimeFuzz.test.ets @@ -0,0 +1,168 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import formProvider from '@ohos.application.formProvider'; +import { describe, expect, it } from 'deccjsunit/index.ets'; +import { DATA_TYPE_LIST, getFuzzData } from './getParam.ets'; + +export const setFormNextRefreshTimeFuzzTest = (describeName, filterParameter) => { + const ERR_COMMON_CODE = 1; + const ERR_COMMON = `internal error`; + const ERR_ADD_INVALID_PARAM_CODE = 7; + const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`; + const ERR_NOT_EXIST_ID_CODE = 9; + const ERR_NOT_EXIST_ID = `the ID of the form to be operated does not exist`; + + describe(`${describeName}`, () => { + const callbackName = `FMS_fuzzTest_setnexttime`; + const promiseName = `FMS_fuzzTest_setnexttime`; + const length = DATA_TYPE_LIST.length; + + for (let i = 0; i < length; ++i) { + const tcNumber = `0${(i + 1) * 100}`; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_setnexttime_0100 ~ FMS_fuzzTest_setnexttime_0800 + * @tc.desc Check whether the setFormNextRefreshTime interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = getFuzzData(dataType); + const nextTime = 5; + console.log(`${callbackName} ${tcNumber} formId typeof: ${typeof formId}`); + console.log(`${callbackName} ${tcNumber} nextTime typeof: ${typeof nextTime}`); + try { + formProvider.setFormNextRefreshTime(formId, nextTime, (error, data) => { + console.log(`${callbackName} ${tcNumber} setFormNextRefreshTime data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + let tcNumber: any = (i + 1 + length) * 100; + tcNumber = tcNumber < 1000 ? `0${tcNumber}` : tcNumber; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_setnexttime_0900 ~ FMS_fuzzTest_setnexttime_1600 + * @tc.desc Check whether the setFormNextRefreshTime interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = getFuzzData(dataType); + const nextTime = 5; + console.log(`${promiseName} ${tcNumber} formId typeof: ${typeof formId}`); + console.log(`${promiseName} ${tcNumber} nextTime typeof: ${typeof nextTime}`); + try { + const data = await formProvider.setFormNextRefreshTime(formId, nextTime); + console.log(`${promiseName} ${tcNumber} setFormNextRefreshTime data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + } + }); + } + + for (let i = 0; i < length; ++i) { + const tcNumber: any = (i + 1 + length * 2) * 100; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_setnexttime_1700 ~ FMS_fuzzTest_setnexttime_2400 + * @tc.desc Check whether the setFormNextRefreshTime interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = `${tcNumber}`; + const nextTime = getFuzzData(dataType); + console.log(`${callbackName} ${tcNumber} formId typeof: ${typeof formId}`); + console.log(`${callbackName} ${tcNumber} nextTime typeof: ${typeof nextTime}`); + try { + formProvider.setFormNextRefreshTime(formId, nextTime, (error, data) => { + console.log(`${callbackName} ${tcNumber} setFormNextRefreshTime data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + if (`NUMBER` === dataType) { + if (ERR_NOT_EXIST_ID_CODE === error.code) { + expect(error.message).assertEqual(ERR_NOT_EXIST_ID); + } else if (ERR_ADD_INVALID_PARAM_CODE === error.code) { + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + } else { + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + } else { + expect(error.code).assertEqual(ERR_COMMON_CODE); + expect(error.message).assertEqual(ERR_COMMON); + } + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + const tcNumber: any = (i + 1 + length * 3) * 100; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_setnexttime_2500 ~ FMS_fuzzTest_setnexttime_3200 + * @tc.desc Check whether the setFormNextRefreshTime interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = `${tcNumber}`; + const nextTime = getFuzzData(dataType); + console.log(`${promiseName} ${tcNumber} formId typeof: ${typeof formId}`); + console.log(`${promiseName} ${tcNumber} nextTime typeof: ${typeof nextTime}`); + try { + const data = await formProvider.setFormNextRefreshTime(formId, nextTime); + console.log(`${promiseName} ${tcNumber} setFormNextRefreshTime data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + if (`NUMBER` === dataType) { + if (ERR_NOT_EXIST_ID_CODE === error.code) { + expect(error.message).assertEqual(ERR_NOT_EXIST_ID); + } else if (ERR_ADD_INVALID_PARAM_CODE === error.code) { + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + } else { + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + } else { + expect(error.code).assertEqual(ERR_COMMON_CODE); + expect(error.message).assertEqual(ERR_COMMON); + } + done(); + } + }); + } + }); +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/UpdateFormFuzz.test.ets b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/UpdateFormFuzz.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..50d26dca9e1161ba033569302d3e28aa626ef8cc --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/UpdateFormFuzz.test.ets @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import formProvider from '@ohos.application.formProvider'; +import { describe, expect, it } from 'deccjsunit/index.ets'; +import { DATA_TYPE_LIST, getFuzzData } from './getParam.ets'; + +export const updateFormFuzzTest = (describeName, filterParameter) => { + const ERR_ADD_INVALID_PARAM_CODE = 7; + const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`; + + describe(`${describeName}`, () => { + const callbackName = `FMS_fuzzTest_updateform`; + const promiseName = `FMS_fuzzTest_updateform`; + const length = DATA_TYPE_LIST.length; + + for (let i = 0; i < length; ++i) { + const tcNumber = `0${(i + 1) * 100}`; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_updateform_0100 ~ FMS_fuzzTest_updateform_0800 + * @tc.desc Check whether the updateForm interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = getFuzzData(dataType); + const formBindingData = {}; + console.log(`${callbackName} ${tcNumber} formId typeof: ${typeof formId}`); + console.log(`${callbackName} ${tcNumber} formBindingData typeof: ${typeof formBindingData}`); + try { + formProvider.updateForm(formId, formBindingData, (error, data) => { + console.log(`${callbackName} ${tcNumber} updateForm data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + let tcNumber: any = (i + 1 + length) * 100; + tcNumber = tcNumber < 1000 ? `0${tcNumber}` : tcNumber; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_updateform_0900 ~ FMS_fuzzTest_updateform_1600 + * @tc.desc Check whether the updateForm interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = getFuzzData(dataType); + const formBindingData = {}; + console.log(`${promiseName} ${tcNumber} formId typeof: ${typeof formId}`); + console.log(`${promiseName} ${tcNumber} formBindingData typeof: ${typeof formBindingData}`); + try { + const data = await formProvider.updateForm(formId, formBindingData); + console.log(`${promiseName} ${tcNumber} updateForm data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + } + }); + } + + for (let i = 0; i < length; ++i) { + const tcNumber: any = (i + 1 + length * 2) * 100; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_updateform_1700 ~ FMS_fuzzTest_updateform_2400 + * @tc.desc Check whether the updateForm interface can pass the fuzzy test (by AsyncCallback) + */ + it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = `${tcNumber}`; + const formBindingData = getFuzzData(dataType); + console.log(`${callbackName} ${tcNumber} formId typeof: ${typeof formId}`); + console.log(`${callbackName} ${tcNumber} formBindingData typeof: ${typeof formBindingData}`); + try { + formProvider.updateForm(formId, formBindingData, (error, data) => { + console.log(`${callbackName} ${tcNumber} updateForm data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + expect(data).assertUndefined(); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + }); + } catch (error) { + console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`${callbackName} ${tcNumber} should not reach here`); + expect().assertFail(); + } + }); + } + + for (let i = 0; i < length; ++i) { + const tcNumber: any = (i + 1 + length * 3) * 100; + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTest_updateform_2500 ~ FMS_fuzzTest_updateform_3200 + * @tc.desc Check whether the updateForm interface can pass the fuzzy test (by Promise) + */ + it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + const dataType = DATA_TYPE_LIST[i]; + const formId = `${tcNumber}`; + const formBindingData = getFuzzData(dataType); + console.log(`${promiseName} ${tcNumber} formId typeof: ${typeof formId}`); + console.log(`${promiseName} ${tcNumber} formBindingData typeof: ${typeof formBindingData}`); + try { + const data = await formProvider.updateForm(formId, formBindingData); + console.log(`${promiseName} ${tcNumber} updateForm data: ${JSON.stringify(data)}`); + console.log(`${promiseName} ${tcNumber} should not reach here`); + expect().assertFail(); + } catch (error) { + console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); + expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); + done(); + } + }); + } + }); +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/getParam.ets b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/getParam.ets new file mode 100644 index 0000000000000000000000000000000000000000..548b50013194036f9c6d2a1fa6556edb263fa98a --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/getParam.ets @@ -0,0 +1,171 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export const REPEAT_COUNT = 2; + +export const DATA_TYPE_LIST = ['ARRAY', 'NUMBER', 'BOOLEAN', 'FUNCTION', 'STRING', 'OBJECT', 'NULL', 'UNDEFINED']; + +var RANDOM_BEGIN_POSITION = 0; +var RANDOM_BEGIN_POSITION_A = 2; +var STRING_RANDOM_LENGTH = 2064; +var BOOLEAN_RANDOM_LENGTH = 2; +var ARRAY_RANDOM_LENGTH = 10; +var ARRAY_RANDOM_TYPE_LENGTH = 3; +var OBJECT_RANDOM_LENGTH = 2; +var FUNCTION_RANDOM_LENGTH = 2; + +//string ascii +var STRING_RANDOM_LENGTH_A = 48; +var STRING_RANDOM_LENGTH_B = 58; +var STRING_RANDOM_LENGTH_C = 65; +var STRING_RANDOM_LENGTH_D = 91; +var STRING_RANDOM_LENGTH_E = 97; +var STRING_RANDOM_LENGTH_F = 122; + +// Return integer random, the range is: [iStart, iEnd) +function getIntegerRandom(iStart, iEnd) { + var decimal = iStart + (iEnd - iStart) * Math.random(); + return Math.floor(decimal); +} + +// return string random, the string length is: [0, 2064) +const stringTest = function () { + // string + var res = ''; + + // string length + var iNumber = getIntegerRandom(RANDOM_BEGIN_POSITION, STRING_RANDOM_LENGTH); + for (var iAsciiToChar = RANDOM_BEGIN_POSITION; iAsciiToChar < iNumber; iAsciiToChar++) { + var iNumberString = getIntegerRandom(RANDOM_BEGIN_POSITION, RANDOM_BEGIN_POSITION_A); + + switch (iNumberString) { + case 0: + // get ascii [0-9] + iNumber = getIntegerRandom(STRING_RANDOM_LENGTH_A, STRING_RANDOM_LENGTH_B); + break; + case 1: + // get ascii [A-Z] + iNumber = getIntegerRandom(STRING_RANDOM_LENGTH_C, STRING_RANDOM_LENGTH_D); + break; + case 2: + default: + // get ascii [a-z] + iNumber = getIntegerRandom(STRING_RANDOM_LENGTH_E, STRING_RANDOM_LENGTH_F); + break; + } + // from ascii to char + var asciiToChar = String.fromCharCode(iNumber); + res += asciiToChar; + } + console.log('The stringTest of this fuzzTest random:' + res); + return res; +}; + +// return number random, the number length is: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER] +const numberTest = function () { + const res = getIntegerRandom(Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER + 1); + console.log('The numberTest of this fuzzTest random:' + res); + return res; +}; + +// return boolean random, the boolean value is: 0->(false), 1->(true) +const booleanTest = function () { + console.log('The booleanTest of this fuzzTest random'); + return Boolean(getIntegerRandom(RANDOM_BEGIN_POSITION, BOOLEAN_RANDOM_LENGTH)); +}; + +// null +const nullTest = function () { + console.log('The nullTest of this fuzzTest random'); + return null; +}; + +// undefined +const undefinedTest = function () { + console.log('The undefinedTest of this fuzzTest random'); + return undefined; +}; + +// return array random, the array value is: string,number,bool +const arrayTest = function () { + var arrValue = []; + + // array length + var iNumber = getIntegerRandom(RANDOM_BEGIN_POSITION, ARRAY_RANDOM_LENGTH); + for (var iArrNumber = 0; iArrNumber < iNumber; iArrNumber++) { + // string,number,bool + iNumber = getIntegerRandom(RANDOM_BEGIN_POSITION, ARRAY_RANDOM_TYPE_LENGTH); + switch (iNumber) { + case 0: + arrValue[iArrNumber] = stringTest(); + break; + case 1: + arrValue[iArrNumber] = numberTest(); + break; + case 2: + arrValue[iArrNumber] = booleanTest(); + break; + default: + arrValue[iArrNumber] = ''; + } + } + console.log('The arrayTest of this fuzzTest random:' + arrValue); + return arrValue; +}; + +// return objectTest random, the objectTest value is: null, not null +const objectTest = function () { + var objectA = {}; + var objectb = { id: 'objectTest' }; + var objectB = Object.create(objectb); + + console.log('The objectTest of this fuzzTest random'); + return getIntegerRandom(RANDOM_BEGIN_POSITION, OBJECT_RANDOM_LENGTH) ? objectA : objectB; +}; + +// return functionTest random, the functionTest value is: null, not null +const functionTest = function () { + var functionA = {}; + var functionB = { id: 'functionTest' }; + + console.log('The functionTest of this fuzzTest random'); + return getIntegerRandom(RANDOM_BEGIN_POSITION, FUNCTION_RANDOM_LENGTH) ? functionA : functionB; +}; + +// return fuzz data +const getFuzzData = (datatype: string) => { + switch (datatype) { + case 'ARRAY': + return arrayTest(); + case 'BOOLEAN': + return booleanTest(); + case 'FUNCTION': + return functionTest(); + case 'NULL': + return nullTest(); + case 'NUMBER': + return numberTest(); + case 'OBJECT': + return objectTest(); + case 'STRING': + return stringTest(); + case 'UNDEFINED': + return undefinedTest(); + default: + return stringTest(); + } +}; + +export { getFuzzData, stringTest, numberTest, booleanTest, nullTest, undefinedTest, objectTest, arrayTest, functionTest }; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..9346b4a60f0b4d6eb2a937666d779c688dc26600 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "formsttest" + }, + { + "name": "description_mainability", + "value": "ETS_Empty Ability" + } + ] +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/resources/base/media/icon.png similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/resources/base/media/icon.png rename to aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/entry/src/main/resources/base/media/icon.png diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/signature/openharmony_sx.p7b similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/signature/openharmony_sx.p7b rename to aafwk/aafwk_standard/formmanager/formsystemtest_ets/formfuzztest/signature/openharmony_sx.p7b diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/config.json deleted file mode 100644 index 1f1921d2849b890095b2875523b77d3e726813ca..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/config.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "app": { - "bundleName": "com.example.formfuzztest", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 5, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.formfuzztest", - "name": ".MyApplication", - "mainAbility": "com.example.formfuzztest.MainAbility", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "visible": true, - "name": "com.example.formfuzztest.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - } - ], - "defPermissions": [ - { - "name": "com.permission.CAMERA", - "grantMode": "system_grant", - "availableScope": ["signature"], - "label": "$string:testFormA", - "description": "CAMERA permission in detail" - }, - { - "name": "ohos.permission.REQUIRE_FORM", - "grantMode": "system_grant", - "label": "$string:testForm", - "description": "REQUIRE_FORM permission in detail" - } - ], - "reqPermissions": [ - { - "name": "ohos.permission.REQUIRE_FORM", - "reason": "require form", - "usedScene": { - "ability": [ - ".MainAbility" - ], - "when": "always" - } - }, - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name":"ohos.permission.REQUIRE_FORM", - "reason":"need use ohos.permission.REQUIRE_FORM" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/app.js deleted file mode 100644 index 4b241cccbaa71f0c5cbd9e7dc437a0feb224c7d5..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/common/images/Wallpaper.png b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/common/images/Wallpaper.png deleted file mode 100644 index 60d4841a80eb20c63de74306cb7f8350d6a85c48..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/common/images/Wallpaper.png and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/common/images/bg-tv.jpg b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/common/images/bg-tv.jpg deleted file mode 100644 index 86fc07358eea5c1474bc833fca07c6d4d8698a89..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/common/images/bg-tv.jpg and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/pages/index/index.css deleted file mode 100644 index 0a66102a6f5e70198f774f5fbf658e36c25cc235..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,44 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 40px; - color: #000000; - opacity: 0.9; -} - -@media screen and (device-type: tablet) and (orientation: landscape) { - .title { - font-size: 100px; - } -} - -@media screen and (device-type: wearable) { - .title { - font-size: 28px; - color: #FFFFFF; - } -} - -@media screen and (device-type: tv) { - .container { - background-image: url("/common/images/Wallpaper.png"); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - } - - .title { - font-size: 100px; - color: #FFFFFF; - } -} - -@media screen and (device-type: phone) and (orientation: landscape) { - .title { - font-size: 60px; - } -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/pages/index/index.hml deleted file mode 100644 index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/pages/index/index.js deleted file mode 100644 index e3b6a650c7607506316405b7242b92bb6ff3715e..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import app from '@system.app' -import file from '@system.file' -import router from '@system.router' -import device from '@system.device' -import {Core, ExpectExtend, ReportExtend} from 'deccjsunit/index' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = "FMS Fuzz Test"; - }, - onShow() { - console.info('onShow finish') - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - const reportExtend = new ReportExtend(file) - core.addService('expect', expectExtend) - core.addService('report', reportExtend) - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - - require('../../../test/List.test') - core.execute() - console.info('onShow end') - }, - onReady() { - }, -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzArray.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzArray.test.js deleted file mode 100644 index 05193a77cdb3a5fdf042a7fbe9ec1608b6899e0b..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzArray.test.js +++ /dev/null @@ -1,1470 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import formManager from '@ohos.ability.formManager' -import {describe, it, expect} from 'deccjsunit/index' -import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, - objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js' - -const TIMEOUT = 8000; -describe('ActsFormFuzzArrayTest', function () { - console.log("ActsFormFuzzArrayTest===start"); - for (var i = 0; i < REPEAT_COUNT; i++) { - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_0200_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_0200_callback deleteForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0200_callback deleteForm formId typeof:" + typeof(formId)); - - - try{ - formManager.deleteForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestArray_0200_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_0200_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_0200_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_0200_callback Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0200_callback deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_0200_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_0200_promise deleteForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0200_promise deleteForm formId typeof:" + typeof(formId)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.deleteForm(formId)); - console.log("FMS_fuzzTestArray_0200_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_0200_promise Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0200_promise deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_0300_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_01_callback releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_01_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestArray_0300_param_01_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_0300_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_0300_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_01_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_0300_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_01_promise releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_01_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestArray_0300_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_01_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_0300_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_02_callback releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestArray_0300_param_02_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestArray_0300_param_02_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_0300_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_0300_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_02_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_0300_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_02_promise releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestArray_0300_param_02_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestArray_0300_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_02_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_0300_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_03_callback releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestArray_0300_param_03_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestArray_0300_param_03_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_0300_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_0300_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_03_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_0300_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_03_promise releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestArray_0300_param_03_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestArray_0300_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_03_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_0300_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_04_callback releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestArray_0300_param_04_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestArray_0300_param_04_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_0300_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_0300_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_04_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_0300_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_04_promise releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestArray_0300_param_04_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestArray_0300_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_04_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_0300_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_05_callback releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestArray_0300_param_05_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestArray_0300_param_05_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_0300_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_0300_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_05_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_0300_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_05_promise releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestArray_0300_param_05_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestArray_0300_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_05_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_0300_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_06_callback releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestArray_0300_param_06_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestArray_0300_param_06_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_0300_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_0300_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_06_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_0300_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_06_promise releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestArray_0300_param_06_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestArray_0300_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_06_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_0300_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_07_callback releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestArray_0300_param_07_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestArray_0300_param_07_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_0300_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_0300_param_07_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_07_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_07_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_0300_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_07_promise releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestArray_0300_param_07_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestArray_0300_param_07_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_07_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_07_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_0300_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_08_callback releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestArray_0300_param_08_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestArray_0300_param_08_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_0300_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_0300_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_08_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_0300_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_08_promise releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestArray_0300_param_08_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestArray_0300_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_08_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_08_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_0300_param_09_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_09_callback releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_09_callback releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - try{ - formManager.releaseForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestArray_0300_param_09_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_0300_param_09_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_0300_param_09_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - - ); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_09_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_09_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_09_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_0300_param_09_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_0300_param_09_promise releaseForm begin"); - - var formId = arrayTest(); - console.log("FMS_fuzzTestArray_0300_param_09_promise releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId)); - console.log("FMS_fuzzTestArray_0300_param_09_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_0300_param_09_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_0300_param_09_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_0300_param_09_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_1200_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_1200_callback getAllFormsInfo begin"); - - var testParam = arrayTest(); - console.log("FMS_fuzzTestArray_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); - - try{ - formManager.getAllFormsInfo( - testParam, - (err,data) => { - console.log("FMS_fuzzTestArray_1200_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_1200_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_1200_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_1200_callback Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1200_callback getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_1200_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_1200_promise getAllFormsInfo begin"); - - var testParam = arrayTest(); - console.log("FMS_fuzzTestArray_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); - console.log("FMS_fuzzTestArray_1200_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_1200_promise Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1200_promise getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_1300_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_1300_callback getFormsInfoByApp begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1300_callback getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); - - try{ - formManager.getFormsInfo( - bundleName, - (err,data) => { - console.log("FMS_fuzzTestArray_1300_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_1300_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_1300_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_1300_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1300_callback getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1300_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_1300_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_1300_promise getFormsInfoByApp begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); - console.log("FMS_fuzzTestArray_1300_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_1300_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1300_promise getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1300_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_1400_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_01_callback getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_01_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_01_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestArray_1400_param_01_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_1400_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_1400_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_01_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_1400_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_01_promise getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_01_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_01_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestArray_1400_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_01_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_1400_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_02_callback getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_02_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestArray_1400_param_02_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestArray_1400_param_02_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_1400_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_1400_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_02_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_1400_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_02_promise getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_02_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestArray_1400_param_02_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestArray_1400_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_02_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_1400_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_03_callback getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_03_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestArray_1400_param_03_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestArray_1400_param_03_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_1400_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_1400_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_03_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_1400_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_03_promise getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_03_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestArray_1400_param_03_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestArray_1400_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_03_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_1400_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_04_callback getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_04_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestArray_1400_param_04_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestArray_1400_param_04_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_1400_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_1400_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_04_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_1400_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_04_promise getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_04_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestArray_1400_param_04_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestArray_1400_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_04_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_1400_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_05_callback getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_05_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestArray_1400_param_05_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestArray_1400_param_05_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_1400_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_1400_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_05_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_1400_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_05_promise getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_05_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestArray_1400_param_05_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestArray_1400_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_05_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_1400_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_06_callback getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_06_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestArray_1400_param_06_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestArray_1400_param_06_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_1400_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_1400_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_06_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_1400_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_06_promise getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_06_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestArray_1400_param_06_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestArray_1400_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_06_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_1400_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_07_callback getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_07_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestArray_1400_param_07_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestArray_1400_param_07_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_1400_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_1400_param_07_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_07_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_07_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_1400_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_07_promise getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_07_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestArray_1400_param_07_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestArray_1400_param_07_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_07_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_07_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestArray_1400_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_08_callback getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_08_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestArray_1400_param_08_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestArray_1400_param_08_callback async::callback return!!!") - console.log("FMS_fuzzTestArray_1400_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestArray_1400_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_08_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestArray_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestArray_1400_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestArray_1400_param_08_promise getFormsInfoByModule begin"); - - var bundleName = arrayTest(); - console.log("FMS_fuzzTestArray_1400_param_08_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestArray_1400_param_08_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestArray_1400_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestArray_1400_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestArray_1400_param_08_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestArray_1400_param_08_promise==================end'); - }, TIMEOUT) - }) - - } -}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzBool.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzBool.test.js deleted file mode 100644 index d8f9a562ba929275c491a0c08c558889570ae514..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzBool.test.js +++ /dev/null @@ -1,1468 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import formManager from '@ohos.ability.formManager' -import {describe, it, expect} from 'deccjsunit/index' -import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, - objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js' - -const TIMEOUT = 8000; -describe('ActsFormFuzzBoolTest', function () { - console.log("ActsFormFuzzBoolTest===start"); - for (var i = 0; i < REPEAT_COUNT; i++) { - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_0200_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_0200_callback deleteForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0200_callback deleteForm formId typeof:" + typeof(formId)); - - try{ - formManager.deleteForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestBool_0200_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_0200_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_0200_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_0200_callback Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0200_callback deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_0200_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_0200_promise deleteForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0200_promise deleteForm formId typeof:" + typeof(formId)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.deleteForm(formId)); - console.log("FMS_fuzzTestBool_0200_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_0200_promise Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0200_promise deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_0300_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_01_callback releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestBool_0300_param_01_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestBool_0300_param_01_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_0300_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_0300_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_01_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_0300_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_01_promise releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestBool_0300_param_01_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestBool_0300_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_01_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_0300_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_02_callback releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_02_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestBool_0300_param_02_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_0300_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_0300_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_02_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_0300_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_02_promise releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_02_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestBool_0300_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_02_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_0300_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_03_callback releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestBool_0300_param_03_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestBool_0300_param_03_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_0300_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_0300_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_03_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_0300_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_03_promise releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestBool_0300_param_03_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestBool_0300_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_03_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_0300_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_04_callback releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestBool_0300_param_04_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestBool_0300_param_04_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_0300_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_0300_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_04_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_0300_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_04_promise releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestBool_0300_param_04_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestBool_0300_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_04_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_0300_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_05_callback releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestBool_0300_param_05_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestBool_0300_param_05_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_0300_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_0300_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_05_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_0300_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_05_promise releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestBool_0300_param_05_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestBool_0300_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_05_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_0300_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_06_callback releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestBool_0300_param_06_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestBool_0300_param_06_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_0300_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_0300_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_06_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_0300_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_06_promise releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestBool_0300_param_06_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestBool_0300_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_06_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_0300_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_07_callback releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestBool_0300_param_07_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestBool_0300_param_07_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_0300_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_0300_param_07_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_07_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_07_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_0300_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_07_promise releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestBool_0300_param_07_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestBool_0300_param_07_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_07_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_07_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_0300_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_08_callback releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestBool_0300_param_08_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestBool_0300_param_08_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_0300_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_0300_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_08_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_0300_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_08_promise releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestBool_0300_param_08_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestBool_0300_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_08_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_08_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_0300_param_09_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_09_callback releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_09_callback releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - try{ - formManager.releaseForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestBool_0300_param_09_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_0300_param_09_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_0300_param_09_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - - ); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_09_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_09_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_09_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_0300_param_09_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_0300_param_09_promise releaseForm begin"); - - var formId = booleanTest(); - console.log("FMS_fuzzTestBool_0300_param_09_promise releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId)); - console.log("FMS_fuzzTestBool_0300_param_09_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_0300_param_09_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_0300_param_09_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_0300_param_09_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_1200_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_1200_callback getAllFormsInfo begin"); - - var testParam = booleanTest(); - console.log("FMS_fuzzTestBool_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); - - try{ - formManager.getAllFormsInfo( - testParam, - (err,data) => { - console.log("FMS_fuzzTestBool_1200_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_1200_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_1200_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_1200_callback Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1200_callback getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_1200_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_1200_promise getAllFormsInfo begin"); - - var testParam = booleanTest(); - console.log("FMS_fuzzTestBool_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); - console.log("FMS_fuzzTestBool_1200_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_1200_promise Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1200_promise getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_1300_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_1300_callback getFormsInfoByApp begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1300_callback getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); - - try{ - formManager.getFormsInfo( - bundleName, - (err,data) => { - console.log("FMS_fuzzTestBool_1300_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_1300_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_1300_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_1300_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1300_callback getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1300_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_1300_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_1300_promise getFormsInfoByApp begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); - console.log("FMS_fuzzTestBool_1300_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_1300_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1300_promise getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1300_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_1400_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_01_callback getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_01_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestBool_1400_param_01_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestBool_1400_param_01_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_1400_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_1400_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_01_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_1400_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_01_promise getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_01_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestBool_1400_param_01_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestBool_1400_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_01_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_1400_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_02_callback getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_02_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_02_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestBool_1400_param_02_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_1400_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_1400_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_02_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_1400_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_02_promise getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_02_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_02_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestBool_1400_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_02_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_1400_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_03_callback getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_03_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestBool_1400_param_03_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestBool_1400_param_03_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_1400_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_1400_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_03_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_1400_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_03_promise getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_03_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestBool_1400_param_03_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestBool_1400_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_03_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_1400_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_04_callback getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_04_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestBool_1400_param_04_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestBool_1400_param_04_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_1400_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_1400_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_04_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_1400_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_04_promise getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_04_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestBool_1400_param_04_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestBool_1400_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_04_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_1400_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_05_callback getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_05_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestBool_1400_param_05_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestBool_1400_param_05_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_1400_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_1400_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_05_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_1400_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_05_promise getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_05_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestBool_1400_param_05_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestBool_1400_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_05_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_1400_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_06_callback getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_06_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestBool_1400_param_06_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestBool_1400_param_06_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_1400_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_1400_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_06_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_1400_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_06_promise getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_06_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestBool_1400_param_06_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestBool_1400_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_06_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_1400_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_07_callback getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_07_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestBool_1400_param_07_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestBool_1400_param_07_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_1400_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_1400_param_07_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_07_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_07_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_1400_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_07_promise getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_07_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestBool_1400_param_07_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestBool_1400_param_07_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_07_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_07_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestBool_1400_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_08_callback getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_08_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestBool_1400_param_08_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestBool_1400_param_08_callback async::callback return!!!") - console.log("FMS_fuzzTestBool_1400_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestBool_1400_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_08_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestBool_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestBool_1400_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestBool_1400_param_08_promise getFormsInfoByModule begin"); - - var bundleName = booleanTest(); - console.log("FMS_fuzzTestBool_1400_param_08_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestBool_1400_param_08_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestBool_1400_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestBool_1400_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestBool_1400_param_08_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestBool_1400_param_08_promise==================end'); - }, TIMEOUT) - }) - - } -}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzFunction.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzFunction.test.js deleted file mode 100644 index f37bc1cdbd572a36062a8eefbaebdf349c6ae26a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzFunction.test.js +++ /dev/null @@ -1,1468 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import formManager from '@ohos.ability.formManager' -import {describe, it, expect} from 'deccjsunit/index' -import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, - objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js' - -const TIMEOUT = 8000; -describe('ActsFormFuzzFunctionTest', function () { - console.log("ActsFormFuzzFunctionTest===start"); - for (var i = 0; i < REPEAT_COUNT; i++) { - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_0200_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0200_callback deleteForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0200_callback deleteForm formId typeof:" + typeof(formId)); - - try{ - formManager.deleteForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestFunction_0200_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_0200_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_0200_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_0200_callback Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0200_callback deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_0200_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0200_promise deleteForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0200_promise deleteForm formId typeof:" + typeof(formId)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.deleteForm(formId)); - console.log("FMS_fuzzTestFunction_0200_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_0200_promise Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0200_promise deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_0300_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_01_callback releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestFunction_0300_param_01_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestFunction_0300_param_01_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_0300_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_0300_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_01_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_0300_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_01_promise releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestFunction_0300_param_01_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestFunction_0300_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_01_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_0300_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_02_callback releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestFunction_0300_param_02_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestFunction_0300_param_02_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_0300_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_0300_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_02_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_0300_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_02_promise releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestFunction_0300_param_02_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestFunction_0300_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_02_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_0300_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_03_callback releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_03_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestFunction_0300_param_03_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_0300_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_0300_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_03_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_0300_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_03_promise releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_03_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestFunction_0300_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_03_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_0300_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_04_callback releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestFunction_0300_param_04_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestFunction_0300_param_04_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_0300_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_0300_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_04_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_0300_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_04_promise releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestFunction_0300_param_04_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestFunction_0300_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_04_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_0300_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_05_callback releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestFunction_0300_param_05_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestFunction_0300_param_05_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_0300_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_0300_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_05_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_0300_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_05_promise releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestFunction_0300_param_05_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestFunction_0300_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_05_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_0300_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_06_callback releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestFunction_0300_param_06_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestFunction_0300_param_06_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_0300_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_0300_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_06_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_0300_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_06_promise releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestFunction_0300_param_06_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestFunction_0300_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_06_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_0300_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_07_callback releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestFunction_0300_param_07_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestFunction_0300_param_07_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_0300_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_0300_param_07_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_07_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_07_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_0300_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_07_promise releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestFunction_0300_param_07_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestFunction_0300_param_07_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_07_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_07_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_0300_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_08_callback releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestFunction_0300_param_08_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestFunction_0300_param_08_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_0300_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_0300_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_08_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_0300_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_08_promise releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestFunction_0300_param_08_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestFunction_0300_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_08_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_08_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_0300_param_09_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_09_callback releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_09_callback releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - try{ - formManager.releaseForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestFunction_0300_param_09_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_0300_param_09_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_0300_param_09_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_09_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_09_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_09_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_0300_param_09_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_0300_param_09_promise releaseForm begin"); - - var formId = functionTest(); - console.log("FMS_fuzzTestFunction_0300_param_09_promise releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId)); - console.log("FMS_fuzzTestFunction_0300_param_09_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_0300_param_09_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_0300_param_09_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_0300_param_09_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_1200_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1200_callback getAllFormsInfo begin"); - - var testParam = functionTest(); - console.log("FMS_fuzzTestFunction_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); - - try{ - formManager.getAllFormsInfo( - testParam, - (err,data) => { - console.log("FMS_fuzzTestFunction_1200_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_1200_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_1200_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_1200_callback Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1200_callback getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_1200_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1200_promise getAllFormsInfo begin"); - - var testParam = functionTest(); - console.log("FMS_fuzzTestFunction_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); - console.log("FMS_fuzzTestFunction_1200_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_1200_promise Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1200_promise getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_1300_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1300_callback getFormsInfoByApp begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1300_callback getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); - - try{ - formManager.getFormsInfo( - bundleName, - (err,data) => { - console.log("FMS_fuzzTestFunction_1300_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_1300_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_1300_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_1300_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1300_callback getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1300_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_1300_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1300_promise getFormsInfoByApp begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); - console.log("FMS_fuzzTestFunction_1300_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_1300_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1300_promise getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1300_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_1400_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_01_callback getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_01_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestFunction_1400_param_01_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestFunction_1400_param_01_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_1400_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_1400_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_01_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_1400_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_01_promise getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_01_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestFunction_1400_param_01_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestFunction_1400_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_01_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_1400_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_02_callback getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_02_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestFunction_1400_param_02_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestFunction_1400_param_02_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_1400_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_1400_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_02_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_1400_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_02_promise getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_02_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestFunction_1400_param_02_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestFunction_1400_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_02_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_1400_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_03_callback getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_03_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_03_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestFunction_1400_param_03_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_1400_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_1400_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_03_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_1400_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_03_promise getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_03_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_03_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestFunction_1400_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_03_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_1400_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_04_callback getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_04_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestFunction_1400_param_04_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestFunction_1400_param_04_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_1400_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_1400_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_04_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_1400_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_04_promise getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_04_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestFunction_1400_param_04_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestFunction_1400_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_04_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_1400_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_05_callback getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_05_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestFunction_1400_param_05_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestFunction_1400_param_05_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_1400_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_1400_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_05_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_1400_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_05_promise getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_05_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestFunction_1400_param_05_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestFunction_1400_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_05_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_1400_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_06_callback getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_06_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestFunction_1400_param_06_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestFunction_1400_param_06_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_1400_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_1400_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_06_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_1400_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_06_promise getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_06_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestFunction_1400_param_06_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestFunction_1400_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_06_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_1400_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_07_callback getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_07_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestFunction_1400_param_07_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestFunction_1400_param_07_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_1400_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_1400_param_07_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_07_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_07_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_1400_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_07_promise getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_07_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestFunction_1400_param_07_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestFunction_1400_param_07_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_07_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_07_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestFunction_1400_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_08_callback getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_08_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestFunction_1400_param_08_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestFunction_1400_param_08_callback async::callback return!!!") - console.log("FMS_fuzzTestFunction_1400_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestFunction_1400_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_08_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestFunction_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestFunction_1400_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestFunction_1400_param_08_promise getFormsInfoByModule begin"); - - var bundleName = functionTest(); - console.log("FMS_fuzzTestFunction_1400_param_08_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestFunction_1400_param_08_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestFunction_1400_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestFunction_1400_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestFunction_1400_param_08_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestFunction_1400_param_08_promise==================end'); - }, TIMEOUT) - }) - - } -}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzNull.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzNull.test.js deleted file mode 100644 index 5e110cdea710931033765f39ae65becb12c168f4..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzNull.test.js +++ /dev/null @@ -1,1468 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import formManager from '@ohos.ability.formManager' -import {describe, it, expect} from 'deccjsunit/index' -import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, - objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js' - -const TIMEOUT = 8000; -describe('ActsFormFuzzNullTest', function () { - console.log("ActsFormFuzzNullTest===start"); - for (var i = 0; i < REPEAT_COUNT; i++) { - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_0200_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_0200_callback deleteForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0200_callback deleteForm formId typeof:" + typeof(formId)); - - try{ - formManager.deleteForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestNull_0200_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_0200_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_0200_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_0200_callback Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0200_callback deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_0200_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_0200_promise deleteForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0200_promise deleteForm formId typeof:" + typeof(formId)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.deleteForm(formId)); - console.log("FMS_fuzzTestNull_0200_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_0200_promise Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0200_promise deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_0300_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_01_callback releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestNull_0300_param_01_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNull_0300_param_01_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_0300_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_0300_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_01_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_0300_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_01_promise releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestNull_0300_param_01_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNull_0300_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_01_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_0300_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_02_callback releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestNull_0300_param_02_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNull_0300_param_02_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_0300_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_0300_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_02_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_0300_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_02_promise releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestNull_0300_param_02_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNull_0300_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_02_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_0300_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_03_callback releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestNull_0300_param_03_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNull_0300_param_03_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_0300_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_0300_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_03_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_0300_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_03_promise releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestNull_0300_param_03_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNull_0300_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_03_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_0300_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_04_callback releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_04_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNull_0300_param_04_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_0300_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_0300_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_04_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_0300_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_04_promise releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_04_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNull_0300_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_04_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_0300_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_05_callback releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestNull_0300_param_05_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNull_0300_param_05_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_0300_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_0300_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_05_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_0300_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_05_promise releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestNull_0300_param_05_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNull_0300_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_05_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_0300_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_06_callback releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestNull_0300_param_06_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNull_0300_param_06_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_0300_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_0300_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_06_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_0300_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_06_promise releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestNull_0300_param_06_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNull_0300_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_06_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_0300_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_07_callback releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestNull_0300_param_07_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNull_0300_param_07_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_0300_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_0300_param_07_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_07_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_07_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_0300_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_07_promise releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestNull_0300_param_07_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNull_0300_param_07_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_07_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_07_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_0300_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_08_callback releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestNull_0300_param_08_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNull_0300_param_08_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_0300_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_0300_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_08_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_0300_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_08_promise releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestNull_0300_param_08_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNull_0300_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_08_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_08_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_0300_param_09_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_09_callback releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_09_callback releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - try{ - formManager.releaseForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestNull_0300_param_09_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_0300_param_09_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_0300_param_09_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - - ); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_09_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_09_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_09_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_0300_param_09_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_0300_param_09_promise releaseForm begin"); - - var formId = nullTest(); - console.log("FMS_fuzzTestNull_0300_param_09_promise releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId)); - console.log("FMS_fuzzTestNull_0300_param_09_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_0300_param_09_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_0300_param_09_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_0300_param_09_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_1200_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_1200_callback getAllFormsInfo begin"); - - var testParam = nullTest(); - console.log("FMS_fuzzTestNull_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); - - try{ - formManager.getAllFormsInfo( - testParam, - (err,data) => { - console.log("FMS_fuzzTestNull_1200_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_1200_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_1200_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_1200_callback Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1200_callback getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_1200_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_1200_promise getAllFormsInfo begin"); - - var testParam = nullTest(); - console.log("FMS_fuzzTestNull_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); - console.log("FMS_fuzzTestNull_1200_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_1200_promise Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1200_promise getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_1300_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_1300_callback getFormsInfoByApp begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1300_callback getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); - - try{ - formManager.getFormsInfo( - bundleName, - (err,data) => { - console.log("FMS_fuzzTestNull_1300_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_1300_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_1300_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_1300_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1300_callback getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1300_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_1300_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_1300_promise getFormsInfoByApp begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); - console.log("FMS_fuzzTestNull_1300_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_1300_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1300_promise getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1300_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_1400_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_01_callback getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_01_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestNull_1400_param_01_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNull_1400_param_01_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_1400_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_1400_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_01_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_1400_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_01_promise getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_01_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestNull_1400_param_01_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNull_1400_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_01_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_1400_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_02_callback getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_02_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestNull_1400_param_02_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNull_1400_param_02_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_1400_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_1400_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_02_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_1400_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_02_promise getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_02_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestNull_1400_param_02_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNull_1400_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_02_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_1400_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_03_callback getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_03_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestNull_1400_param_03_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNull_1400_param_03_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_1400_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_1400_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_03_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_1400_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_03_promise getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_03_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestNull_1400_param_03_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNull_1400_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_03_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_1400_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_04_callback getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_04_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_04_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNull_1400_param_04_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_1400_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_1400_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_04_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_1400_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_04_promise getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_04_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_04_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNull_1400_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_04_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_1400_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_05_callback getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_05_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestNull_1400_param_05_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNull_1400_param_05_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_1400_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_1400_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_05_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_1400_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_05_promise getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_05_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestNull_1400_param_05_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNull_1400_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_05_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_1400_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_06_callback getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_06_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestNull_1400_param_06_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNull_1400_param_06_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_1400_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_1400_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_06_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_1400_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_06_promise getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_06_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestNull_1400_param_06_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNull_1400_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_06_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_1400_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_07_callback getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_07_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestNull_1400_param_07_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNull_1400_param_07_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_1400_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_1400_param_07_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_07_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_07_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_1400_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_07_promise getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_07_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestNull_1400_param_07_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNull_1400_param_07_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_07_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_07_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNull_1400_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_08_callback getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_08_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestNull_1400_param_08_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNull_1400_param_08_callback async::callback return!!!") - console.log("FMS_fuzzTestNull_1400_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestNull_1400_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_08_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNull_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNull_1400_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestNull_1400_param_08_promise getFormsInfoByModule begin"); - - var bundleName = nullTest(); - console.log("FMS_fuzzTestNull_1400_param_08_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestNull_1400_param_08_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNull_1400_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNull_1400_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNull_1400_param_08_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNull_1400_param_08_promise==================end'); - }, TIMEOUT) - }) - - } -}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzNum.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzNum.test.js deleted file mode 100644 index 0eb9e47d6b92a81896c723b27000c8f08329a321..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzNum.test.js +++ /dev/null @@ -1,1468 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import formManager from '@ohos.ability.formManager' -import {describe, it, expect} from 'deccjsunit/index' -import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, - objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js' - -const TIMEOUT = 8000; -describe('ActsFormFuzzNumTest', function () { - console.log("ActsFormFuzzNumTest===start"); - for (var i = 0; i < REPEAT_COUNT; i++) { - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_0200_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_0200_callback deleteForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0200_callback deleteForm formId typeof:" + typeof(formId)); - - try{ - formManager.deleteForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestNum_0200_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_0200_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_0200_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_0200_callback Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0200_callback deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_0200_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_0200_promise deleteForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0200_promise deleteForm formId typeof:" + typeof(formId)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.deleteForm(formId)); - console.log("FMS_fuzzTestNum_0200_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_0200_promise Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0200_promise deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_0300_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_01_callback releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestNum_0300_param_01_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNum_0300_param_01_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_0300_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_0300_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_01_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_0300_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_01_promise releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestNum_0300_param_01_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNum_0300_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_01_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_0300_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_02_callback releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestNum_0300_param_02_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNum_0300_param_02_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_0300_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_0300_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_02_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_0300_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_02_promise releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestNum_0300_param_02_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNum_0300_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_02_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_0300_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_03_callback releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestNum_0300_param_03_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNum_0300_param_03_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_0300_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_0300_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_03_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_0300_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_03_promise releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestNum_0300_param_03_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNum_0300_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_03_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_0300_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_04_callback releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestNum_0300_param_04_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNum_0300_param_04_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_0300_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_0300_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_04_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_0300_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_04_promise releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestNum_0300_param_04_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNum_0300_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_04_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_0300_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_05_callback releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_05_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNum_0300_param_05_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_0300_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_0300_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_05_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_0300_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_05_promise releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_05_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNum_0300_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_05_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_0300_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_06_callback releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestNum_0300_param_06_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNum_0300_param_06_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_0300_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_0300_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_06_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_0300_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_06_promise releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestNum_0300_param_06_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNum_0300_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_06_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_0300_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_07_callback releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestNum_0300_param_07_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNum_0300_param_07_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_0300_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_0300_param_07_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_07_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_07_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_0300_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_07_promise releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestNum_0300_param_07_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNum_0300_param_07_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_07_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_07_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_0300_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_08_callback releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestNum_0300_param_08_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestNum_0300_param_08_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_0300_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_0300_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_08_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_0300_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_08_promise releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestNum_0300_param_08_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestNum_0300_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_08_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_08_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_0300_param_09_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_09_callback releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_09_callback releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - try{ - formManager.releaseForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestNum_0300_param_09_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_0300_param_09_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_0300_param_09_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - - ); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_09_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_09_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_09_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_0300_param_09_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_0300_param_09_promise releaseForm begin"); - - var formId = numberTest(); - console.log("FMS_fuzzTestNum_0300_param_09_promise releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId)); - console.log("FMS_fuzzTestNum_0300_param_09_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_0300_param_09_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_0300_param_09_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_0300_param_09_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_1200_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_1200_callback getAllFormsInfo begin"); - - var testParam = numberTest(); - console.log("FMS_fuzzTestNum_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); - - try{ - formManager.getAllFormsInfo( - testParam, - (err,data) => { - console.log("FMS_fuzzTestNum_1200_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_1200_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_1200_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_1200_callback Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1200_callback getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_1200_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_1200_promise getAllFormsInfo begin"); - - var testParam = numberTest(); - console.log("FMS_fuzzTestNum_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); - console.log("FMS_fuzzTestNum_1200_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_1200_promise Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1200_promise getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_1300_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_1300_callback getFormsInfoByApp begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1300_callback getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); - - try{ - formManager.getFormsInfo( - bundleName, - (err,data) => { - console.log("FMS_fuzzTestNum_1300_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_1300_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_1300_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_1300_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1300_callback getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1300_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_1300_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_1300_promise getFormsInfoByApp begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); - console.log("FMS_fuzzTestNum_1300_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_1300_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1300_promise getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1300_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_1400_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_01_callback getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_01_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestNum_1400_param_01_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNum_1400_param_01_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_1400_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_1400_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_01_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_1400_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_01_promise getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_01_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestNum_1400_param_01_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNum_1400_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_01_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_1400_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_02_callback getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_02_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestNum_1400_param_02_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNum_1400_param_02_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_1400_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_1400_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_02_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_1400_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_02_promise getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_02_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestNum_1400_param_02_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNum_1400_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_02_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_1400_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_03_callback getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_03_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestNum_1400_param_03_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNum_1400_param_03_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_1400_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_1400_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_03_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_1400_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_03_promise getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_03_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestNum_1400_param_03_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNum_1400_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_03_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_1400_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_04_callback getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_04_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestNum_1400_param_04_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNum_1400_param_04_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_1400_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_1400_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_04_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_1400_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_04_promise getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_04_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestNum_1400_param_04_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNum_1400_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_04_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_1400_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_05_callback getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_05_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_05_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNum_1400_param_05_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_1400_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_1400_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_05_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_1400_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_05_promise getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_05_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_05_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNum_1400_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_05_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_1400_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_06_callback getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_06_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestNum_1400_param_06_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNum_1400_param_06_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_1400_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_1400_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_06_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_1400_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_06_promise getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_06_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestNum_1400_param_06_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNum_1400_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_06_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_1400_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_07_callback getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_07_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestNum_1400_param_07_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNum_1400_param_07_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_1400_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_1400_param_07_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_07_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_07_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_1400_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_07_promise getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_07_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestNum_1400_param_07_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNum_1400_param_07_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_07_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_07_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestNum_1400_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_08_callback getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_08_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestNum_1400_param_08_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestNum_1400_param_08_callback async::callback return!!!") - console.log("FMS_fuzzTestNum_1400_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestNum_1400_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_08_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestNum_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestNum_1400_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestNum_1400_param_08_promise getFormsInfoByModule begin"); - - var bundleName = numberTest(); - console.log("FMS_fuzzTestNum_1400_param_08_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestNum_1400_param_08_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestNum_1400_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestNum_1400_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestNum_1400_param_08_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestNum_1400_param_08_promise==================end'); - }, TIMEOUT) - }) - - } -}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzObject.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzObject.test.js deleted file mode 100644 index 1b8ed78dceffe43dae37583408f9d7a9b4874f00..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzObject.test.js +++ /dev/null @@ -1,1468 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import formManager from '@ohos.ability.formManager' -import {describe, it, expect} from 'deccjsunit/index' -import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, - objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js' - -const TIMEOUT = 8000; -describe('ActsFormFuzzObjectTest', function () { - console.log("ActsFormFuzzObjectTest===start"); - for (var i = 0; i < REPEAT_COUNT; i++) { - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_0200_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_0200_callback deleteForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0200_callback deleteForm formId typeof:" + typeof(formId)); - - try{ - formManager.deleteForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestObject_0200_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_0200_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_0200_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_0200_callback Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0200_callback deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_0200_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_0200_promise deleteForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0200_promise deleteForm formId typeof:" + typeof(formId)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.deleteForm(formId)); - console.log("FMS_fuzzTestObject_0200_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_0200_promise Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0200_promise deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_0300_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_01_callback releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestObject_0300_param_01_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestObject_0300_param_01_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_0300_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_0300_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_01_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_0300_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_01_promise releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestObject_0300_param_01_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestObject_0300_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_01_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_0300_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_02_callback releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestObject_0300_param_02_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestObject_0300_param_02_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_0300_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_0300_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_02_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_0300_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_02_promise releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestObject_0300_param_02_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestObject_0300_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_02_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_0300_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_03_callback releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestObject_0300_param_03_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestObject_0300_param_03_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_0300_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_0300_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_03_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_0300_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_03_promise releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestObject_0300_param_03_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestObject_0300_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_03_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_0300_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_04_callback releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestObject_0300_param_04_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestObject_0300_param_04_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_0300_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_0300_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_04_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_0300_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_04_promise releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestObject_0300_param_04_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestObject_0300_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_04_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_0300_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_05_callback releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestObject_0300_param_05_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestObject_0300_param_05_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_0300_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_0300_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_05_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_0300_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_05_promise releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestObject_0300_param_05_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestObject_0300_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_05_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_0300_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_06_callback releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_06_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestObject_0300_param_06_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_0300_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_0300_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_06_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_0300_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_06_promise releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_06_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestObject_0300_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_06_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_0300_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_07_callback releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestObject_0300_param_07_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestObject_0300_param_07_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_0300_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_0300_param_07_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_07_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_07_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_0300_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_07_promise releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestObject_0300_param_07_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestObject_0300_param_07_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_07_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_07_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_0300_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_08_callback releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestObject_0300_param_08_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestObject_0300_param_08_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_0300_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_0300_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_08_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_0300_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_08_promise releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestObject_0300_param_08_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestObject_0300_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_08_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_08_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_0300_param_09_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_09_callback releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_09_callback releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - try{ - formManager.releaseForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestObject_0300_param_09_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_0300_param_09_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_0300_param_09_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - - ); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_09_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_09_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_09_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_0300_param_09_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_0300_param_09_promise releaseForm begin"); - - var formId = objectTest(); - console.log("FMS_fuzzTestObject_0300_param_09_promise releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId)); - console.log("FMS_fuzzTestObject_0300_param_09_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_0300_param_09_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_0300_param_09_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_0300_param_09_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_1200_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_1200_callback getAllFormsInfo begin"); - - var testParam = objectTest(); - console.log("FMS_fuzzTestObject_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); - - try{ - formManager.getAllFormsInfo( - testParam, - (err,data) => { - console.log("FMS_fuzzTestObject_1200_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_1200_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_1200_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_1200_callback Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1200_callback getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_1200_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_1200_promise getAllFormsInfo begin"); - - var testParam = objectTest(); - console.log("FMS_fuzzTestObject_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); - console.log("FMS_fuzzTestObject_1200_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_1200_promise Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1200_promise getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_1300_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_1300_callback getFormsInfoByApp begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1300_callback getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); - - try{ - formManager.getFormsInfo( - bundleName, - (err,data) => { - console.log("FMS_fuzzTestObject_1300_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_1300_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_1300_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_1300_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1300_callback getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1300_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_1300_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_1300_promise getFormsInfoByApp begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); - console.log("FMS_fuzzTestObject_1300_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_1300_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1300_promise getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1300_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_1400_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_01_callback getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_01_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestObject_1400_param_01_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestObject_1400_param_01_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_1400_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_1400_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_01_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_1400_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_01_promise getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_01_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestObject_1400_param_01_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestObject_1400_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_01_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_1400_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_02_callback getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_02_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestObject_1400_param_02_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestObject_1400_param_02_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_1400_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_1400_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_02_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_1400_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_02_promise getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_02_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestObject_1400_param_02_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestObject_1400_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_02_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_1400_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_03_callback getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_03_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestObject_1400_param_03_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestObject_1400_param_03_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_1400_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_1400_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_03_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_1400_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_03_promise getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_03_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestObject_1400_param_03_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestObject_1400_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_03_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_1400_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_04_callback getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_04_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestObject_1400_param_04_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestObject_1400_param_04_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_1400_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_1400_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_04_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_1400_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_04_promise getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_04_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestObject_1400_param_04_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestObject_1400_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_04_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_1400_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_05_callback getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_05_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestObject_1400_param_05_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestObject_1400_param_05_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_1400_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_1400_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_05_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_1400_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_05_promise getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_05_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestObject_1400_param_05_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestObject_1400_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_05_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_1400_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_06_callback getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_06_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_06_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestObject_1400_param_06_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_1400_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_1400_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_06_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_1400_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_06_promise getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_06_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_06_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestObject_1400_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_06_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_1400_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_07_callback getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_07_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestObject_1400_param_07_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestObject_1400_param_07_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_1400_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_1400_param_07_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_07_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_07_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_1400_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_07_promise getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_07_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestObject_1400_param_07_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestObject_1400_param_07_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_07_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_07_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestObject_1400_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_08_callback getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_08_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestObject_1400_param_08_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestObject_1400_param_08_callback async::callback return!!!") - console.log("FMS_fuzzTestObject_1400_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestObject_1400_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_08_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestObject_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestObject_1400_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestObject_1400_param_08_promise getFormsInfoByModule begin"); - - var bundleName = objectTest(); - console.log("FMS_fuzzTestObject_1400_param_08_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestObject_1400_param_08_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestObject_1400_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestObject_1400_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestObject_1400_param_08_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestObject_1400_param_08_promise==================end'); - }, TIMEOUT) - }) - - } -}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzString.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzString.test.js deleted file mode 100644 index 7067aa1d7361a2714e64fda93af10cb3d0c1df06..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzString.test.js +++ /dev/null @@ -1,1662 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import formManager from '@ohos.ability.formManager' -import {describe, it, expect} from 'deccjsunit/index' -import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, - objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js' - -const TIMEOUT = 8000; -describe('ActsFormFuzzStringTest', function () { - console.log("ActsFormFuzzStringTest===start"); - for (var i = 0; i < REPEAT_COUNT; i++) { - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_0200_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_0200_param_01_callback deleteForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0200_param_01_callback deleteForm formId typeof:" + typeof(formId)); - - try{ - formManager.deleteForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestString_0200_param_01_callback async::callback return!!!") - console.log("FMS_fuzzTestString_0200_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestString_0200_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_0200_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0200_param_01_callback deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0200_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_0200_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_0200_param_01_promise deleteForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0200_param_01_promise deleteForm formId typeof:" + typeof(formId)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.deleteForm(formId)); - console.log("FMS_fuzzTestString_0200_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_0200_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0200_param_01_promise deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0200_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_0200_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_0200_param_02_callback deleteForm begin"); - - var formId = numberTest() + ""; - console.log("FMS_fuzzTestString_0200_param_02_callback deleteForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - formManager.deleteForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestString_0200_param_02_callback async::callback return!!!") - console.log("FMS_fuzzTestString_0200_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestString_0200_param_02_callback async::error err:" + err); - expect(err).assertEqual(0); - done(); - } - ); - - console.log("FMS_fuzzTestString_0200_param_02_callback deleteForm end"); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0200_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_0200_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_0200_param_02_promise deleteForm begin"); - - var formId = numberTest() + ""; - console.log("FMS_fuzzTestString_0200_param_02_promise deleteForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - formManager.deleteForm(formId).then((err) => { - console.log("FMS_fuzzTestString_0200_param_02_promise async::success err:" + err); - expect(err).assertEqual(0); - console.log("FMS_fuzzTestString_0200_param_02_promise deleteForm end"); - done(); - }); - - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0200_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_0300_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_01_callback releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestString_0300_param_01_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestString_0300_param_01_callback async::callback return!!!") - console.log("FMS_fuzzTestString_0300_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestString_0300_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_01_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_0300_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_01_promise releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestString_0300_param_01_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestString_0300_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_01_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_0300_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_02_callback releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestString_0300_param_02_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestString_0300_param_02_callback async::callback return!!!") - console.log("FMS_fuzzTestString_0300_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestString_0300_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_02_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_0300_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_02_promise releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestString_0300_param_02_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestString_0300_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_02_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_0300_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_03_callback releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestString_0300_param_03_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestString_0300_param_03_callback async::callback return!!!") - console.log("FMS_fuzzTestString_0300_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestString_0300_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_03_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_0300_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_03_promise releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestString_0300_param_03_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestString_0300_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_03_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_0300_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_04_callback releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestString_0300_param_04_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestString_0300_param_04_callback async::callback return!!!") - console.log("FMS_fuzzTestString_0300_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestString_0300_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_04_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_0300_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_04_promise releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestString_0300_param_04_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestString_0300_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_04_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_0300_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_05_callback releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestString_0300_param_05_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestString_0300_param_05_callback async::callback return!!!") - console.log("FMS_fuzzTestString_0300_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestString_0300_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_05_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_0300_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_05_promise releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestString_0300_param_05_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestString_0300_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_05_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_0300_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_06_callback releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestString_0300_param_06_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestString_0300_param_06_callback async::callback return!!!") - console.log("FMS_fuzzTestString_0300_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestString_0300_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_06_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_0300_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_06_promise releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestString_0300_param_06_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestString_0300_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_06_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_0300_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_07_callback releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestString_0300_param_07_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestString_0300_param_07_callback async::callback return!!!") - console.log("FMS_fuzzTestString_0300_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestString_0300_param_07_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_07_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_07_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_0300_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_07_promise releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestString_0300_param_07_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestString_0300_param_07_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_07_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_07_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_0300_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_08_callback releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestString_0300_param_08_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestString_0300_param_08_callback async::callback return!!!") - console.log("FMS_fuzzTestString_0300_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestString_0300_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_08_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_0300_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_08_promise releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestString_0300_param_08_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestString_0300_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_08_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_08_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_0300_param_09_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_09_callback releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_09_callback releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - try{ - formManager.releaseForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestString_0300_param_09_callback async::callback return!!!") - console.log("FMS_fuzzTestString_0300_param_09_callback async::success data:" + data); - console.log("FMS_fuzzTestString_0300_param_09_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - - ); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_09_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_09_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_09_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_0300_param_09_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_09_promise releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTestString_0300_param_09_promise releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId)); - console.log("FMS_fuzzTestString_0300_param_09_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_0300_param_09_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_0300_param_09_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_09_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_0300_param_10_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_10_callback releaseForm begin"); - - var formId = numberTest() + ""; - console.log("FMS_fuzzTestString_0300_param_10_callback releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - formManager.releaseForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestString_0300_param_10_callback async::callback return!!!") - console.log("FMS_fuzzTestString_0300_param_10_callback async::success data:" + data); - console.log("FMS_fuzzTestString_0300_param_10_callback async::error err:" + err); - if (Number.parseInt(formId) < 0) { - expect(err).assertEqual(0); - } else expect(err).assertEqual(0); - done(); - } - ); - - console.log("FMS_fuzzTestString_0300_param_10_callback releaseForm end"); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_10_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_0300_param_10_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_10_promise releaseForm begin"); - - var formId = numberTest() + ""; - console.log("FMS_fuzzTestString_0300_param_10_promise releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - formManager.releaseForm(formId).then((err) => { - console.log("FMS_fuzzTestString_0300_param_10_promise async::sucess err:" + err); - if (Number.parseInt(formId) < 0) { - expect(err).assertEqual(0); - } else expect(err).assertEqual(0); - console.log("FMS_fuzzTestString_0300_param_10_promise deleteForm end"); - done(); - }); - - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_10_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_0300_param_11_callback_release_cache', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_11_callback releaseForm begin"); - - var formId = numberTest() + ""; - console.log("FMS_fuzzTestString_0300_param_11_callback releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - var isReleaseCache = true; - console.log("FMS_fuzzTestString_0300_param_011_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestString_0300_param_11_callback async::callback return!!!") - console.log("FMS_fuzzTestString_0300_param_11_callback async::success data:" + data); - console.log("FMS_fuzzTestString_0300_param_11_callback async::error err:" + err); - expect(err).assertEqual(0); - done(); - } - ); - - console.log("FMS_fuzzTestString_0300_param_11_callback releaseForm end"); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_11_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_0300_param_11_callback_no_release_cache', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_11_callback releaseForm begin"); - - var formId = numberTest() + ""; - console.log("FMS_fuzzTestString_0300_param_11_callback releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - var isReleaseCache = false; - console.log("FMS_fuzzTestString_0300_param_011_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestString_0300_param_11_callback async::callback return!!!") - console.log("FMS_fuzzTestString_0300_param_11_callback async::success data:" + data); - console.log("FMS_fuzzTestString_0300_param_11_callback async::error err:" + err); - if (Number.parseInt(formId) < 0) { - expect(err).assertEqual(0); - } else { - expect(err).assertEqual(0); - } - done(); - } - ); - - console.log("FMS_fuzzTestString_0300_param_11_callback releaseForm end"); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_11_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_0300_param_11_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_0300_param_11_promise releaseForm begin"); - - var formId = numberTest() + ""; - console.log("FMS_fuzzTestString_0300_param_11_promise releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestString_0300_param_11_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - formManager.releaseForm(formId, isReleaseCache).then((err) => { - console.log("FMS_fuzzTestString_0300_param_11_promise async::sucess err:" + err); - if (Number.parseInt(formId) < 0) { - expect(err).assertEqual(0); - } else expect(err).assertEqual(0); - console.log("FMS_fuzzTestString_0300_param_11_promise deleteForm end"); - done(); - }); - - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_0300_param_11_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_1200_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_1200_callback getAllFormsInfo begin"); - - var testParam = stringTest(); - console.log("FMS_fuzzTestString_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); - - try{ - formManager.getAllFormsInfo( - testParam, - (err,data) => { - console.log("FMS_fuzzTestString_1200_callback async::callback return!!!") - console.log("FMS_fuzzTestString_1200_callback async::success data:" + data); - console.log("FMS_fuzzTestString_1200_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_1200_callback Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1200_callback getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_1200_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_1200_promise getAllFormsInfo begin"); - - var testParam = stringTest(); - console.log("FMS_fuzzTestString_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); - console.log("FMS_fuzzTestString_1200_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_1200_promise Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1200_promise getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_1300_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_1300_callback getFormsInfoByApp begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1300_callback getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); - - try{ - formManager.getFormsInfo( - bundleName, - (err,data) => { - console.log("FMS_fuzzTestString_1300_callback async::callback return!!!") - console.log("FMS_fuzzTestString_1300_callback async::success data:" + data); - console.log("FMS_fuzzTestString_1300_callback async::error err:" + err); - expect(err).assertEqual(0); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_1300_callback Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1300_callback getFormsInfoByApp end"); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1300_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_1300_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_1300_promise getFormsInfoByApp begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); - - formManager.getFormsInfo(bundleName).then((err) => { - console.log("FMS_fuzzTestString_1300_promise async::success err:" + err); - expect(err).assertEqual(0); - console.log("FMS_fuzzTestString_1300_promise getFormsInfoByApp end"); - done(); - }); - - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1300_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_1400_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_01_callback getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_01_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestString_1400_param_01_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestString_1400_param_01_callback async::callback return!!!") - console.log("FMS_fuzzTestString_1400_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestString_1400_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_1400_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1400_param_01_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_1400_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_01_promise getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_01_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestString_1400_param_01_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestString_1400_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_1400_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1400_param_01_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_1400_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_02_callback getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_02_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestString_1400_param_02_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestString_1400_param_02_callback async::callback return!!!") - console.log("FMS_fuzzTestString_1400_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestString_1400_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_1400_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1400_param_02_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_1400_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_02_promise getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_02_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestString_1400_param_02_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestString_1400_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_1400_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1400_param_02_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_1400_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_03_callback getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_03_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestString_1400_param_03_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestString_1400_param_03_callback async::callback return!!!") - console.log("FMS_fuzzTestString_1400_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestString_1400_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_1400_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1400_param_03_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_1400_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_03_promise getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_03_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestString_1400_param_03_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestString_1400_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_1400_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1400_param_03_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_1400_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_04_callback getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_04_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestString_1400_param_04_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestString_1400_param_04_callback async::callback return!!!") - console.log("FMS_fuzzTestString_1400_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestString_1400_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_1400_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1400_param_04_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_1400_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_04_promise getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_04_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestString_1400_param_04_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestString_1400_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_1400_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1400_param_04_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_1400_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_05_callback getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_05_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestString_1400_param_05_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestString_1400_param_05_callback async::callback return!!!") - console.log("FMS_fuzzTestString_1400_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestString_1400_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_1400_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1400_param_05_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_1400_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_05_promise getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_05_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestString_1400_param_05_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestString_1400_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_1400_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1400_param_05_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_1400_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_06_callback getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_06_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestString_1400_param_06_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestString_1400_param_06_callback async::callback return!!!") - console.log("FMS_fuzzTestString_1400_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestString_1400_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_1400_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1400_param_06_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_1400_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_06_promise getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_06_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestString_1400_param_06_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestString_1400_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_1400_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1400_param_06_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_1400_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_07_callback getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_07_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_07_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestString_1400_param_07_callback async::callback return!!!") - console.log("FMS_fuzzTestString_1400_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestString_1400_param_07_callback async::error err:" + err); - expect(retResult).assertEqual(0); - done(); - } - ); - - console.log("FMS_fuzzTestString_1400_param_07_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_1400_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_07_promise getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_07_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_07_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - formManager.getFormsInfo(bundleName, moduleName).then((err) => { - console.log("FMS_fuzzTestString_1400_param_07_promise async::success err:" + err); - expect(err).assertEqual(0); - console.log("FMS_fuzzTestString_1400_param_07_promise getFormsInfo end"); - done(); - }); - - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestString_1400_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_08_callback getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_08_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestString_1400_param_08_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestString_1400_param_08_callback async::callback return!!!") - console.log("FMS_fuzzTestString_1400_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestString_1400_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestString_1400_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1400_param_08_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestString_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestString_1400_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestString_1400_param_08_promise getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTestString_1400_param_08_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestString_1400_param_08_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestString_1400_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestString_1400_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestString_1400_param_08_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestString_1400_param_08_promise==================end'); - }, TIMEOUT) - }) - - } -}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzUndefined.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzUndefined.test.js deleted file mode 100644 index 857ecef5ed72859fa718df785405154cc1b7e107..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzUndefined.test.js +++ /dev/null @@ -1,1468 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import formManager from '@ohos.ability.formManager' -import {describe, it, expect} from 'deccjsunit/index' -import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, - objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js' - -const TIMEOUT = 8000; -describe('ActsFormFuzzUndefinedTest', function () { - console.log("ActsFormFuzzUndefinedTest===start"); - for (var i = 0; i < REPEAT_COUNT; i++) { - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_0200_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0200_callback deleteForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0200_callback deleteForm formId typeof:" + typeof(formId)); - - try{ - formManager.deleteForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestUndefined_0200_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_0200_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_0200_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0200_callback Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0200_callback deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_0200_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0200_promise deleteForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0200_promise deleteForm formId typeof:" + typeof(formId)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.deleteForm(formId)); - console.log("FMS_fuzzTestUndefined_0200_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0200_promise Exception caught:" + e); - expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0200_promise deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_0300_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_01_callback releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestUndefined_0300_param_01_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestUndefined_0300_param_01_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_0300_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_0300_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_01_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_0300_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_01_promise releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = arrayTest(); - console.log("FMS_fuzzTestUndefined_0300_param_01_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestUndefined_0300_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_01_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_0300_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_02_callback releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestUndefined_0300_param_02_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestUndefined_0300_param_02_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_0300_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_0300_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_02_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_0300_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_02_promise releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTestUndefined_0300_param_02_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestUndefined_0300_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_02_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_0300_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_03_callback releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestUndefined_0300_param_03_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestUndefined_0300_param_03_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_0300_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_0300_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_03_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_0300_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_03_promise releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = functionTest(); - console.log("FMS_fuzzTestUndefined_0300_param_03_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestUndefined_0300_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_03_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_0300_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_04_callback releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestUndefined_0300_param_04_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestUndefined_0300_param_04_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_0300_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_0300_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_04_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_0300_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_04_promise releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = nullTest(); - console.log("FMS_fuzzTestUndefined_0300_param_04_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestUndefined_0300_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_04_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_0300_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_05_callback releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestUndefined_0300_param_05_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestUndefined_0300_param_05_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_0300_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_0300_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_05_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_0300_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_05_promise releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = numberTest(); - console.log("FMS_fuzzTestUndefined_0300_param_05_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestUndefined_0300_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_05_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_0300_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_06_callback releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestUndefined_0300_param_06_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestUndefined_0300_param_06_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_0300_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_0300_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_06_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_0300_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_06_promise releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = objectTest(); - console.log("FMS_fuzzTestUndefined_0300_param_06_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestUndefined_0300_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_06_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_0300_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_07_callback releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestUndefined_0300_param_07_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestUndefined_0300_param_07_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_0300_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_0300_param_07_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_07_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_07_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_0300_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_07_promise releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = stringTest(); - console.log("FMS_fuzzTestUndefined_0300_param_07_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestUndefined_0300_param_07_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_07_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_07_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_0300_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_08_callback releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_08_callback releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, - isReleaseCache, - (err,data) => { - console.log("FMS_fuzzTestUndefined_0300_param_08_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_0300_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_0300_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_08_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_0300_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_08_promise releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); - - var isReleaseCache = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_08_promise releaseForm isReleaseCache typeof:" - + typeof(isReleaseCache)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTestUndefined_0300_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_08_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_08_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_0300_param_09_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_09_callback releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_09_callback releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - try{ - formManager.releaseForm( - formId, - (err,data) => { - console.log("FMS_fuzzTestUndefined_0300_param_09_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_0300_param_09_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_0300_param_09_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_09_callback Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_09_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_09_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_0300_param_09_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_0300_param_09_promise releaseForm begin"); - - var formId = undefinedTest(); - console.log("FMS_fuzzTestUndefined_0300_param_09_promise releaseForm formId typeof:" - + typeof(formId) + ",formId:" + formId); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId)); // formId: number>0 ok - console.log("FMS_fuzzTestUndefined_0300_param_09_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_0300_param_09_promise Exception caught:" + e); - expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_0300_param_09_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_0300_param_09_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_1200_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1200_callback getAllFormsInfo begin"); - - var testParam = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); - - try{ - formManager.getAllFormsInfo( - testParam, - (err,data) => { - console.log("FMS_fuzzTestUndefined_1200_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_1200_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_1200_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1200_callback Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1200_callback getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_1200_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1200_promise getAllFormsInfo begin"); - - var testParam = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); - console.log("FMS_fuzzTestUndefined_1200_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1200_promise Exception caught:" + e); - expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1200_promise getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_1300_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1300_callback getFormsInfoByApp begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1300_callback bundleName typeof:" + typeof(bundleName)); - - try{ - formManager.getFormsInfo( - bundleName, - (err,data) => { - console.log("FMS_fuzzTestUndefined_1300_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_1300_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_1300_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1300_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1300_callback getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1300_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_1300_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1300_promise getFormsInfoByApp begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); - console.log("FMS_fuzzTestUndefined_1300_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1300_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1300_promise getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1300_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_1400_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_01_callback getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_01_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestUndefined_1400_param_01_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestUndefined_1400_param_01_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_1400_param_01_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_1400_param_01_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_01_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_01_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_1400_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_01_promise getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_01_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = arrayTest(); - console.log("FMS_fuzzTestUndefined_1400_param_01_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestUndefined_1400_param_01_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_01_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_01_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_1400_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_02_callback getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_02_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestUndefined_1400_param_02_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestUndefined_1400_param_02_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_1400_param_02_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_1400_param_02_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_02_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_02_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_1400_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_02_promise getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_02_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = booleanTest(); - console.log("FMS_fuzzTestUndefined_1400_param_02_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestUndefined_1400_param_02_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_02_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_02_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_1400_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_03_callback getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_03_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestUndefined_1400_param_03_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestUndefined_1400_param_03_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_1400_param_03_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_1400_param_03_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_03_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_03_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_1400_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_03_promise getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_03_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = functionTest(); - console.log("FMS_fuzzTestUndefined_1400_param_03_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestUndefined_1400_param_03_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_03_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_03_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_1400_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_04_callback getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_04_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestUndefined_1400_param_04_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestUndefined_1400_param_04_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_1400_param_04_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_1400_param_04_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_04_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_04_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_04_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_1400_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_04_promise getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_04_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = nullTest(); - console.log("FMS_fuzzTestUndefined_1400_param_04_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestUndefined_1400_param_04_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_04_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_04_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_04_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_1400_param_05_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_05_callback getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_05_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestUndefined_1400_param_05_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestUndefined_1400_param_05_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_1400_param_05_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_1400_param_05_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_05_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_05_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_05_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_1400_param_05_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_05_promise getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_05_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = numberTest(); - console.log("FMS_fuzzTestUndefined_1400_param_05_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestUndefined_1400_param_05_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_05_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_05_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_05_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_1400_param_06_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_06_callback getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_06_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestUndefined_1400_param_06_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestUndefined_1400_param_06_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_1400_param_06_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_1400_param_06_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_06_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_06_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_06_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_1400_param_06_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_06_promise getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_06_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = objectTest(); - console.log("FMS_fuzzTestUndefined_1400_param_06_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestUndefined_1400_param_06_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_06_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_06_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_06_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_1400_param_07_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_07_callback getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_07_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestUndefined_1400_param_07_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestUndefined_1400_param_07_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_1400_param_07_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_1400_param_07_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_07_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_07_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_07_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_1400_param_07_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_07_promise getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_07_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTestUndefined_1400_param_07_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestUndefined_1400_param_07_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_07_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_07_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_07_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTestUndefined_1400_param_08_callback', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_08_callback getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_08_callback getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_08_callback getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, - moduleName, - (err,data) => { - console.log("FMS_fuzzTestUndefined_1400_param_08_callback async::callback return!!!"); - console.log("FMS_fuzzTestUndefined_1400_param_08_callback async::success data:" + data); - console.log("FMS_fuzzTestUndefined_1400_param_08_callback async::error err:" + err); - fail("should not reach here"); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_08_callback Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_08_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_08_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTestUndefined_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTestUndefined_1400_param_08_promise', 0, async function (done) { - console.log("FMS_fuzzTestUndefined_1400_param_08_promise getFormsInfoByModule begin"); - - var bundleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_08_promise getFormsInfoByModule bundleName typeof:" - + typeof(bundleName)); - - var moduleName = undefinedTest(); - console.log("FMS_fuzzTestUndefined_1400_param_08_promise getFormsInfoByModule moduleName typeof:" - + typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTestUndefined_1400_param_08_promise async::success retResult:" + retResult); - fail("should not reach here"); - done(); - } catch (e) { - console.log("FMS_fuzzTestUndefined_1400_param_08_promise Exception caught:" + e); - expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); - } - - console.log("FMS_fuzzTestUndefined_1400_param_08_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTestUndefined_1400_param_08_promise==================end'); - }, TIMEOUT) - }) - - } -}) diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/List.test.js deleted file mode 100644 index 3ac51cdb44e34535dfca9e1b6a28e93d364b46f5..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/List.test.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -require('./FormFuzzArray.test.js') -require('./FormFuzzBool.test.js') -require('./FormFuzzFunction.test.js') -require('./FormFuzzNull.test.js') -require('./FormFuzzNum.test.js') -require('./FormFuzzObject.test.js') -require('./FormFuzzString.test.js') -require('./FormFuzzUndefined.test.js') diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/getParam.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/getParam.js deleted file mode 100644 index e2a71cd90c59ce47448a23151562c39d084f724a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/getParam.js +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export const REPEAT_COUNT = 2; - -var RANDOM_BEGIN_POSITION = 0; -var RANDOM_BEGIN_POSITION_A = 2; -var STRING_RANDOM_LENGTH = 2064; -var BOOLEAN_RANDOM_LENGTH = 2; -var ARRAY_RANDOM_LENGTH = 10; -var ARRAY_RANDOM_TYPE_LENGTH = 3; -var OBJECT_RANDOM_LENGTH = 2; -var FUNCTION_RANDOM_LENGTH = 2; - -//string ascii -var STRING_RANDOM_LENGTH_A = 48; -var STRING_RANDOM_LENGTH_B = 58; -var STRING_RANDOM_LENGTH_C = 65; -var STRING_RANDOM_LENGTH_D = 91; -var STRING_RANDOM_LENGTH_E = 97; -var STRING_RANDOM_LENGTH_F = 122; - -// Return integer random, the range is: [iStart, iEnd) -function getIntegerRandom(iStart, iEnd) { - var decimal = iStart + (iEnd - iStart) * Math.random(); - return Math.floor(decimal); -} - -// return string random, the string length is: [0, 2064) -const stringTest = function() { - // string - var res = ""; - - // string length - var iNumber = getIntegerRandom(RANDOM_BEGIN_POSITION, STRING_RANDOM_LENGTH); - for(var iAsciiToChar = RANDOM_BEGIN_POSITION; iAsciiToChar < iNumber ; iAsciiToChar ++) { - - var iNumberString = getIntegerRandom(RANDOM_BEGIN_POSITION, RANDOM_BEGIN_POSITION_A); - - switch (iNumberString) { - case 0: - // get ascii [0-9] - iNumber = getIntegerRandom(STRING_RANDOM_LENGTH_A, STRING_RANDOM_LENGTH_B); - break; - case 1: - // get ascii [A-Z] - iNumber = getIntegerRandom(STRING_RANDOM_LENGTH_C, STRING_RANDOM_LENGTH_D); - break; - case 2: - default: - // get ascii [a-z] - iNumber = getIntegerRandom(STRING_RANDOM_LENGTH_E, STRING_RANDOM_LENGTH_F); - break; - - } - // from ascii to char - var asciiToChar = String.fromCharCode(iNumber); - res += asciiToChar; - } - console.log("The stringTest of this fuzzTest random:" + res); - return res; -}; - -// return number random, the number length is: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER] -const numberTest = function() { - console.log("The numberTest of this fuzzTest random" ); - return getIntegerRandom(Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER + 1); -}; - -// return boolean random, the boolean value is: 0->(false), 1->(true) -const booleanTest = function() { - console.log("The booleanTest of this fuzzTest random" ); - return Boolean(getIntegerRandom(RANDOM_BEGIN_POSITION, BOOLEAN_RANDOM_LENGTH)); -}; - -// null -const nullTest = function() { - console.log("The nullTest of this fuzzTest random" ); - return null; -}; - -// undefined -const undefinedTest = function() { - console.log("The undefinedTest of this fuzzTest random" ); - return undefined; -}; - -// return array random, the array value is: string,number,bool -const arrayTest = function() { - var arrValue = []; - - // array length - var iNumber = getIntegerRandom(RANDOM_BEGIN_POSITION, ARRAY_RANDOM_LENGTH); - for(var iArrNumber = 0; iArrNumber < iNumber ; iArrNumber ++) { - - // string,number,bool - iNumber = getIntegerRandom(RANDOM_BEGIN_POSITION, ARRAY_RANDOM_TYPE_LENGTH); - switch(iNumber) { - case 0: - arrValue[iArrNumber] = stringTest(); - break; - case 1: - arrValue[iArrNumber] = numberTest(); - break; - case 2: - arrValue[iArrNumber] = booleanTest(); - break; - default: - arrValue[iArrNumber] = ''; - } - } - console.log("The arrayTest of this fuzzTest random:" + arrValue); - return arrValue; -}; - -// return objectTest random, the objectTest value is: null, not null -const objectTest = function() { - var objectA = {}; - var objectb = {id : 'objectTest'}; - var objectB = Object.create(objectb); - - console.log("The objectTest of this fuzzTest random" ); - return getIntegerRandom(RANDOM_BEGIN_POSITION, OBJECT_RANDOM_LENGTH) ? objectA: objectB; -}; - -// return functionTest random, the functionTest value is: null, not null -const functionTest = function() { - var functionA = {}; - var functionB = {id:"functionTest"}; - - console.log("The functionTest of this fuzzTest random" ); - return getIntegerRandom(RANDOM_BEGIN_POSITION, FUNCTION_RANDOM_LENGTH) ? functionA: functionB; -}; - -export { - stringTest, numberTest, booleanTest, nullTest, undefinedTest, objectTest, arrayTest, functionTest -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/resources/base/element/string.json deleted file mode 100644 index f34a4a596cd58f236fd1b7bafc9c924af5bd82f0..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "fuzztest" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - }, - { - "name": "testForm", - "value": "REQUIRE_FORM permission" - }, - { - "name": "testFormA", - "value": "CAMERA permission" - } - - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/BUILD.gn deleted file mode 100644 index ec45783a5b37afc25a3c8234ad99e2f05d9b50ba..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/BUILD.gn +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("ActsFormsOneAndOneTest") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActsFormsOneAndOneTest" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/Test.json deleted file mode 100644 index f1e7f6ee87bc20be5fb7cc0d7c6d02f007566531..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/Test.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "JSUnitTest", - "test-timeout": "300000", - "package": "com.example.formsoneandone", - "shell-timeout": "600000" - }, - "kits": [ - { - "test-file-name": [ - "ActsFormsOneAndOneTest.hap", - "ActsFormSystemTestServiceB.hap", - "ActsFormSystemTestServiceC.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/config.json deleted file mode 100644 index df8e169bca79beec1b887e3ec566064365e4f0f0..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/config.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "app": { - "bundleName": "com.example.formsoneandone", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 5, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.formsoneandone", - "name": ".MyApplication", - "mainAbility": "com.example.formsoneandone.MainAbility", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "visible": true, - "name": "com.example.formsoneandone.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - } - ], - "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/pages/index/index.css deleted file mode 100644 index 0a66102a6f5e70198f774f5fbf658e36c25cc235..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,44 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 40px; - color: #000000; - opacity: 0.9; -} - -@media screen and (device-type: tablet) and (orientation: landscape) { - .title { - font-size: 100px; - } -} - -@media screen and (device-type: wearable) { - .title { - font-size: 28px; - color: #FFFFFF; - } -} - -@media screen and (device-type: tv) { - .container { - background-image: url("/common/images/Wallpaper.png"); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - } - - .title { - font-size: 100px; - color: #FFFFFF; - } -} - -@media screen and (device-type: phone) and (orientation: landscape) { - .title { - font-size: 60px; - } -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/pages/index/index.hml deleted file mode 100644 index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/pages/index/index.js deleted file mode 100644 index e4832498bfe3f34bb29573e181ce1b298fb7f617..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import app from '@system.app' -import file from '@system.file' -import router from '@system.router' -import device from '@system.device' -import {Core, ExpectExtend, ReportExtend} from 'deccjsunit/index' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = "卡片配置信息查询 \n有权限、是系统应用"; - }, - onShow() { - console.info('onShow finish') - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - const reportExtend = new ReportExtend(file) - core.addService('expect', expectExtend) - core.addService('report', reportExtend) - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - - require('../../../test/List.test') - core.execute() - console.info('onShow end') - }, - onReady() { - }, -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/test/FormsOneAndOneJsunit.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/test/FormsOneAndOneJsunit.test.js deleted file mode 100644 index 05bc394a609415020e3e9f0f176553fe88e8a6c4..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/test/FormsOneAndOneJsunit.test.js +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import formManager from '@ohos.ability.formManager' -import {describe, it, expect} from 'deccjsunit/index' - -const TIMEOUT = 3000; -describe('ActsFormsOneAndOneTest', function () { - console.log("ActsFormsOneAndOneTest===start"); - - /** - * @tc.name getAllFormsInfo test - * @tc.number FMS_getFormsInfo_0500 - * @tc.desc All form configuration information is queried successfully (by AsyncCallback) - */ - it('FMS_getFormsInfo_0500_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_0500_callback begin"); - var ret = formManager.getAllFormsInfo( - (result, data) => { - console.log("FMS_getFormsInfo_0500_callback, the forms number:" + data.length); - var dataB = data.filter((p) => { - return p.bundleName == "com.form.formsystemtestserviceb"; - }); - var dataC = data.filter((p) => { - return p.bundleName == "com.form.formsystemtestservicec"; - }); - console.log("FMS_getFormsInfo_0500_callback async::sucess, dataB json:" + JSON.stringify(dataB)); - console.log("FMS_getFormsInfo_0500_callback async::sucess, dataA json:" + JSON.stringify(dataC)); - console.log("FMS_getFormsInfo_0500_callback getAllFormsInfo async::result, result:" + result); - expect(result).assertEqual(1); - - function expe(datainfo) { - for(var i = 0; i < datainfo.length; i++) { - expect(datainfo[i].description).assertEqual("form_description"); - expect(datainfo[i].type).assertEqual(1); - expect(datainfo[i].colorMode).assertEqual(-1); - expect(datainfo[i].jsComponentName).assertEqual("card"); - expect(datainfo[i].isDefault).assertEqual(1); - expect(datainfo[i].updateEnabled).assertEqual(1); - expect(datainfo[i].updateDuration).assertEqual(1); - expect(datainfo[i].scheduledUpdateTime).assertEqual("10:30"); - expect(datainfo[i].formVisibleNotify).assertEqual(1); - expect(datainfo[i].defaultDimension).assertEqual(1); - expect(datainfo[i].supportDimensions[0]).assertEqual(1); - expect(datainfo[i].supportDimensions[1]).assertEqual(2); - expect(datainfo[i].metaData.customizeData[0].name).assertEqual("originWidgetName"); - expect(datainfo[i].metaData.customizeData[0].value).assertEqual("myTest"); - console.log("FMS_getFormsInfo_0500_callback=========expe, formName:" + datainfo[i].name); - } - } - expe(dataB); - expe(dataC); - expect(dataB[0].name).assertEqual("FormB_Js001"); - expect(dataC[0].name).assertEqual("FormC_Js001"); - console.log("FMS_getFormsInfo_0500_callback result end"); - done(); - } - ); - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0500_callback==================end'); - }, TIMEOUT) - console.log("FMS_getFormsInfo_0500_callback end, ret:"+ret); - }) - - /** - * @tc.name getAllFormsInfo test - * @tc.number FMS_getFormsInfo_0500 - * @tc.desc All form configuration information is queried successfully (by Promise) - */ - it('FMS_getFormsInfo_0500_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_0500_promise begin"); - - var promise = formManager.getAllFormsInfo(); - promise.then((data) => { - console.log("FMS_getFormsInfo_0500_promise, the forms number:" + data.length); - var dataB = data.filter((p) => { - return p.bundleName == "com.form.formsystemtestserviceb"; - }); - var dataC = data.filter((p) => { - return p.bundleName == "com.form.formsystemtestservicec"; - }); - console.log("FMS_getFormsInfo_0500_promise async::sucess, dataB json:" + JSON.stringify(dataB)); - console.log("FMS_getFormsInfo_0500_promise async::sucess, dataA json:" + JSON.stringify(dataC)); - - function expe(datainfo) { - for(var i = 0; i < datainfo.length; i++) { - expect(datainfo[i].description).assertEqual("form_description"); - expect(datainfo[i].type).assertEqual(1); - expect(datainfo[i].colorMode).assertEqual(-1); - expect(datainfo[i].jsComponentName).assertEqual("card"); - expect(datainfo[i].isDefault).assertEqual(1); - expect(datainfo[i].updateEnabled).assertEqual(1); - expect(datainfo[i].updateDuration).assertEqual(1); - expect(datainfo[i].scheduledUpdateTime).assertEqual("10:30"); - expect(datainfo[i].formVisibleNotify).assertEqual(1); - expect(datainfo[i].defaultDimension).assertEqual(1); - expect(datainfo[i].supportDimensions[0]).assertEqual(1); - expect(datainfo[i].supportDimensions[1]).assertEqual(2); - expect(datainfo[i].metaData.customizeData[0].name).assertEqual("originWidgetName"); - expect(datainfo[i].metaData.customizeData[0].value).assertEqual("myTest"); - console.log("FMS_getFormsInfo_0500_promise=========expe, formName:" + datainfo[i].name); - } - } - expe(dataB); - expe(dataC); - expect(dataB[0].name).assertEqual("FormB_Js001"); - expect(dataC[0].name).assertEqual("FormC_Js001"); - console.log("FMS_getFormsInfo_0500_promise result end"); - done(); - }); - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0500_promise==================end'); - }, TIMEOUT) - }) -}) diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/test/List.test.js deleted file mode 100644 index c33585ebe843fd090aa83be4f728d590448548a9..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/js/test/List.test.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -require('./FormsOneAndOneJsunit.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/resources/base/element/string.json deleted file mode 100644 index f92c362cd744365819e19feb6e31806f8cbfb9ad..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "formsoneandone" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandonetest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/BUILD.gn deleted file mode 100644 index 8d092ea8606dc30c163261e1c365ee5bdd332742..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/BUILD.gn +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("ActsFormsOneAndTwoTest") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActsFormsOneAndTwoTest" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/Test.json deleted file mode 100644 index c44b0203203817c6bd1404b89d4e14924809040e..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/Test.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "JSUnitTest", - "test-timeout": "120000", - "package": "com.example.formsoneandtwo", - "shell-timeout": "600000" - }, - "kits": [ - { - "test-file-name": [ - "ActsFormsOneAndTwoTest.hap", - "ActsFormSystemTestServiceA.hap", - "ActsFormSystemTestServiceB.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/config.json deleted file mode 100644 index 15b2026212e36860a7a3f870d2d6af681f9e85ed..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/config.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "app": { - "bundleName": "com.example.formsoneandtwo", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 5, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.formsoneandtwo", - "name": ".MyApplication", - "mainAbility": "com.example.formsoneandtwo.MainAbility", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "visible": true, - "name": "com.example.formsoneandtwo.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - } - ], - "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/app.js deleted file mode 100644 index e423f4bce4698ec1d7dc86c3eea3990a5e7b1085..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/app.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/pages/index/index.css deleted file mode 100644 index 0a66102a6f5e70198f774f5fbf658e36c25cc235..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,44 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 40px; - color: #000000; - opacity: 0.9; -} - -@media screen and (device-type: tablet) and (orientation: landscape) { - .title { - font-size: 100px; - } -} - -@media screen and (device-type: wearable) { - .title { - font-size: 28px; - color: #FFFFFF; - } -} - -@media screen and (device-type: tv) { - .container { - background-image: url("/common/images/Wallpaper.png"); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - } - - .title { - font-size: 100px; - color: #FFFFFF; - } -} - -@media screen and (device-type: phone) and (orientation: landscape) { - .title { - font-size: 60px; - } -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/pages/index/index.hml deleted file mode 100644 index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/pages/index/index.js deleted file mode 100644 index e4832498bfe3f34bb29573e181ce1b298fb7f617..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import app from '@system.app' -import file from '@system.file' -import router from '@system.router' -import device from '@system.device' -import {Core, ExpectExtend, ReportExtend} from 'deccjsunit/index' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = "卡片配置信息查询 \n有权限、是系统应用"; - }, - onShow() { - console.info('onShow finish') - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - const reportExtend = new ReportExtend(file) - core.addService('expect', expectExtend) - core.addService('report', reportExtend) - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - - require('../../../test/List.test') - core.execute() - console.info('onShow end') - }, - onReady() { - }, -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/test/FormsOneAndTwoJsunit.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/test/FormsOneAndTwoJsunit.test.js deleted file mode 100644 index 35120a3f59bf4645358a981aa64d2f8255f47d3f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/test/FormsOneAndTwoJsunit.test.js +++ /dev/null @@ -1,630 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import formManager from '@ohos.ability.formManager' -import {describe, it, expect} from 'deccjsunit/index' - -const TIMEOUT = 5000; -describe('ActsFormsOneAndTwoTest', function () { - console.log("ActsFormsOneAndTwoTest===start"); - - /** - * @tc.name getAllFormsInfo test - * @tc.number FMS_getFormsInfo_0600 - * @tc.desc All form configuration information is queried successfully (by AsyncCallback) - */ - it('FMS_getFormsInfo_0600_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_0600_callback begin"); - - var ret = formManager.getAllFormsInfo( - (result, data) => { - console.log("FMS_getFormsInfo_0600_callback, the forms number:" + data.length); - var dataA = data.filter((p) => { - return p.bundleName == "com.form.formsystemtestservicea"; - }); - var dataB = data.filter((p) => { - return p.bundleName == "com.form.formsystemtestserviceb"; - }); - console.log("FMS_getFormsInfo_0600_callback, the formA number:" + dataA.length); - console.log("FMS_getFormsInfo_0600_callback async::sucess, dataA json:" + JSON.stringify(dataA)); - console.log("FMS_getFormsInfo_0600_callback async::sucess, dataB json:" + JSON.stringify(dataB)); - console.log("FMS_getFormsInfo_0600_callback getAllFormsInfo async::result, result:" + result); - expect(result).assertEqual(1); - function expe(datainfo) { - for(var i = 0; i < datainfo.length; i++) { - expect(datainfo[i].description).assertEqual("form_description"); - expect(datainfo[i].type).assertEqual(1); - expect(datainfo[i].colorMode).assertEqual(-1); - expect(datainfo[i].jsComponentName).assertEqual("card"); - expect(datainfo[i].isDefault).assertEqual(1); - expect(datainfo[i].updateEnabled).assertEqual(1); - expect(datainfo[i].updateDuration).assertEqual(1); - expect(datainfo[i].scheduledUpdateTime).assertEqual("10:30"); - expect(datainfo[i].formVisibleNotify).assertEqual(1); - expect(datainfo[i].defaultDimension).assertEqual(1); - expect(datainfo[i].supportDimensions[0]).assertEqual(1); - expect(datainfo[i].supportDimensions[1]).assertEqual(2); - expect(datainfo[i].metaData.customizeData[0].name).assertEqual("originWidgetName"); - expect(datainfo[i].metaData.customizeData[0].value).assertEqual("myTest"); - console.log("FMS_getFormsInfo_0600_promise=========expe, formName:" + datainfo[i].name); - } - } - expe(dataA); - expe(dataB); - expect(dataA[0].name).assertEqual("FormA_Js001"); - expect(dataA[1].name).assertEqual("FormA_Js002"); - expect(dataB[0].name).assertEqual("FormB_Js001"); - console.log("FMS_getFormsInfo_0600_callback result end"); - done(); - } - ); - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0600_callback==================end'); - }, TIMEOUT) - console.log("FMS_getFormsInfo_0600_callback end, ret:" + ret); - }) - - /** - * @tc.name getAllFormsInfo test - * @tc.number FMS_getFormsInfo_0600 - * @tc.desc All form configuration information is queried successfully (by Promise) - */ - it('FMS_getFormsInfo_0600_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_0600_promise begin"); - - var promise = formManager.getAllFormsInfo(); - promise.then((data) => { - console.log("FMS_getFormsInfo_0600_promise, the forms number:" + data.length); - var dataA = data.filter((p) => { - return p.bundleName == "com.form.formsystemtestservicea"; - }); - var dataB = data.filter((p) => { - return p.bundleName == "com.form.formsystemtestserviceb"; - }); - console.log("FMS_getFormsInfo_0600_promise, the formA number:" + dataA.length); - console.log("FMS_getFormsInfo_0600_promise async::sucess, dataA json:" + JSON.stringify(dataA)); - console.log("FMS_getFormsInfo_0600_promise async::sucess, dataB json:" + JSON.stringify(dataB)); - - function expe(datainfo) { - for(var i = 0; i < datainfo.length; i++) { - expect(datainfo[i].description).assertEqual("form_description"); - expect(datainfo[i].type).assertEqual(1); - expect(datainfo[i].colorMode).assertEqual(-1); - expect(datainfo[i].jsComponentName).assertEqual("card"); - expect(datainfo[i].isDefault).assertEqual(1); - expect(datainfo[i].updateEnabled).assertEqual(1); - expect(datainfo[i].updateDuration).assertEqual(1); - expect(datainfo[i].scheduledUpdateTime).assertEqual("10:30"); - expect(datainfo[i].formVisibleNotify).assertEqual(1); - expect(datainfo[i].defaultDimension).assertEqual(1); - expect(datainfo[i].supportDimensions[0]).assertEqual(1); - expect(datainfo[i].supportDimensions[1]).assertEqual(2); - expect(datainfo[i].metaData.customizeData[0].name).assertEqual("originWidgetName"); - expect(datainfo[i].metaData.customizeData[0].value).assertEqual("myTest"); - console.log("FMS_getFormsInfo_0600_promise=========expe, formName:" + datainfo[i].name); - } - } - expe(dataA); - expe(dataB); - expect(dataA[0].name).assertEqual("FormA_Js001"); - expect(dataA[1].name).assertEqual("FormA_Js002"); - expect(dataB[0].name).assertEqual("FormB_Js001"); - console.log("FMS_getFormsInfo_0600_promise result end"); - done(); - }); - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0600_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name bundleName is null test - * @tc.number FMS_getFormsInfo_0900 - * @tc.desc When the bundleName is null, the form configuration information query fails - * (by AsyncCallback) - */ - it('FMS_getFormsInfo_0900_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_0900_callback begin"); - - var ret = formManager.getFormsInfo( - "", - (result, data) => { - console.log("FMS_getFormsInfo_0900_callback getFormsInfo async::sucess, data json:" - + JSON.stringify(data)); - console.log("FMS_getFormsInfo_0900_callback async::result, result:" + result); - expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_0900_callback result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0900_callback==================end'); - }, TIMEOUT) - console.log("FMS_getFormsInfo_0900_callback end, ret:" + ret); - }) - - /** - * @tc.name bundleName is null test - * @tc.number FMS_getFormsInfo_0900 - * @tc.desc When the bundleName is null, the form configuration information query fails (by Promise) - */ - it('FMS_getFormsInfo_0900_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_0900_promise begin"); - - var promise = formManager.getFormsInfo( - "", - ); - promise.then((result) => { - console.log("FMS_getFormsInfo_0900_promise result:" + result); - expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_0900_promise result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0900_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name bundleName isn't exist test - * @tc.number FMS_getFormsInfo_1000 - * @tc.desc When the bundleName isn't exist, the form configuration information query fails - * (by AsyncCallback). - */ - it('FMS_getFormsInfo_1000_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_1000_callback begin"); - - var ret = formManager.getFormsInfo( - "aaaaaaa", - (result, data) => { - console.log("FMS_getFormsInfo_1000_callback getFormsInfo async::sucess, data json:" - + JSON.stringify(data)); - console.log("FMS_getFormsInfo_1000_callback async::result, result:" + result); - expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1000_callback result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1000_callback==================end'); - }, TIMEOUT) - console.log("FMS_getFormsInfo_1000_callback end, ret:" + ret); - }) - - /** - * @tc.name bundleName isn't exist test - * @tc.number FMS_getFormsInfo_1000 - * @tc.desc When the bundleName isn't exist, the form configuration information query fails (by Promise) - */ - it('FMS_getFormsInfo_1000_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_1000_promise begin"); - - var promise = formManager.getFormsInfo( - "aaaaaaa", - ); - promise.then((result) => { - console.log("FMS_getFormsInfo_1000_promise result:" + result); - expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1000_promise result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1000_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1100 - * @tc.desc When the bundleName exist, the form configuration information is queried successfully - * (by AsyncCallback) - */ - it('FMS_getFormsInfo_1100_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_1100_callback begin"); - - var ret = formManager.getFormsInfo( - "com.form.formsystemtestservicea", - (result, data) => { - console.log("FMS_getFormsInfo_1100_callback getFormsInfo async::sucess, data json:" - + JSON.stringify(data)); - console.log("FMS_getFormsInfo_1100_callback async::result, result:" + result); - for(var i = 0; i < data.length; i++) { - expect(typeof (data[i].description)).assertEqual("string"); - expect(data[i].description).assertEqual("form_description"); - expect(data[i].type).assertEqual(1); - expect(data[i].colorMode).assertEqual(-1); - expect(data[i].jsComponentName).assertEqual("card"); - expect(data[i].isDefault).assertEqual(1); - expect(data[i].updateEnabled).assertEqual(1); - expect(data[i].updateDuration).assertEqual(1); - expect(data[i].scheduledUpdateTime).assertEqual("10:30"); - expect(data[i].formVisibleNotify).assertEqual(1); - expect(data[i].defaultDimension).assertEqual(1); - expect(data[i].supportDimensions[0]).assertEqual(1); - expect(data[i].supportDimensions[1]).assertEqual(2); - expect(data[i].metaData.customizeData[0].name).assertEqual("originWidgetName"); - expect(data[i].metaData.customizeData[0].value).assertEqual("myTest"); - } - - expect(data[0].name).assertEqual("FormA_Js001"); - expect(data[1].name).assertEqual("FormA_Js002"); - console.log("FMS_getFormsInfo_1100_callback result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1100_callback==================end'); - }, TIMEOUT) - console.log("FMS_getFormsInfo_1100_callback end, ret:" + ret); - }) - - /** - * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1100 - * @tc.desc When the bundleName exist, the form configuration information is queried successfully - * (by Promise) - */ - it('FMS_getFormsInfo_1100_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_1100_promise begin"); - - var promise = formManager.getFormsInfo( - "com.form.formsystemtestservicea", - ); - promise.then((data) => { - console.log("FMS_getFormsInfo_1100_promise async::sucess, data json:" + JSON.stringify(data)); - for(var i = 0; i < data.length; i++) { - expect(typeof (data[i].description)).assertEqual("string"); - expect(data[i].description).assertEqual("form_description"); - expect(data[i].type).assertEqual(1); - expect(data[i].colorMode).assertEqual(-1); - expect(data[i].jsComponentName).assertEqual("card"); - expect(data[i].isDefault).assertEqual(1); - expect(data[i].updateEnabled).assertEqual(1); - expect(data[i].updateDuration).assertEqual(1); - expect(data[i].scheduledUpdateTime).assertEqual("10:30"); - expect(data[i].formVisibleNotify).assertEqual(1); - expect(data[i].defaultDimension).assertEqual(1); - expect(data[i].supportDimensions[0]).assertEqual(1); - expect(data[i].supportDimensions[1]).assertEqual(2); - expect(data[i].metaData.customizeData[0].name).assertEqual("originWidgetName"); - expect(data[i].metaData.customizeData[0].value).assertEqual("myTest"); - } - - expect(data[0].name).assertEqual("FormA_Js001"); - expect(data[1].name).assertEqual("FormA_Js002"); - console.log("FMS_getFormsInfo_1100_promise result end"); - done(); - }); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1100_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1400 - * @tc.desc When the bundleName is null, moduleName is exist,the form configuration information - * query fails (by AsyncCallback). - */ - it('FMS_getFormsInfo_1400_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_1400_callback begin"); - - var ret = formManager.getFormsInfo( - "", - "formmodule001", - (result, data) => { - console.log("FMS_getFormsInfo_1400_callback getFormsInfo async::sucess, data json:" - + JSON.stringify(data)); - console.log("FMS_getFormsInfo_1400_callback async::result, result:" + result); - expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1400_callback result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1400_callback==================end'); - }, TIMEOUT) - console.log("FMS_getFormsInfo_1400_callback end, ret:" + ret); - }) - - /** - * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1400 - * @tc.desc When the bundleName is null, moduleName is exist,the form configuration information - * query fails (by Promise) - */ - it('FMS_getFormsInfo_1400_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_1400_promise begin"); - - var promise = formManager.getFormsInfo( - "", - "formmodule001", - ); - promise.then((result) => { - console.log("FMS_getFormsInfo_1400_promise result:" + result); - expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1400_promise result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1400_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1500 - * @tc.desc When the bundleName isn't exist, moduleName is exist, the form configuration information - * query fails (by AsyncCallback) - */ - it('FMS_getFormsInfo_1500_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_1500_callback begin"); - - var ret = formManager.getFormsInfo( - "aaaaaa", - "formmodule001", - (result, data) => { - console.log("FMS_getFormsInfo_1500_callback getFormsInfo async::sucess, data json:" - + JSON.stringify(data)); - console.log("FMS_getFormsInfo_1500_callback async::result, result:" + result); - expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1500_callback result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1500_callback==================end'); - }, TIMEOUT) - console.log("FMS_getFormsInfo_1500_callback end, ret:" + ret); - }) - - /** - * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1500 - * @tc.desc When the bundleName isn't exist, moduleName is exist, the form configuration - * information query fails (by Promise) - */ - it('FMS_getFormsInfo_1500_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_1500_promise begin"); - - var promise = formManager.getFormsInfo( - "aaaaaaa", - "formmodule001", - ); - promise.then((result) => { - console.log("FMS_getFormsInfo_1500_promise result:" + result); - expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1500_promise result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1500_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1600 - * @tc.desc When the bundleName is exist, moduleName is null, the form configuration information - * query fails (by AsyncCallback) - */ - it('FMS_getFormsInfo_1600_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_1600_callback begin"); - - var ret = formManager.getFormsInfo( - "com.form.formsystemtestservicea", - "", - (result, data) => { - console.log("FMS_getFormsInfo_1600_callback getFormsInfo async::sucess, data json:" - + JSON.stringify(data)); - console.log("FMS_getFormsInfo_1600_callback async::result, result:" + result); - expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1600_callback result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1600_callback==================end'); - }, TIMEOUT) - console.log("FMS_getFormsInfo_1600_callback end, ret:" + ret); - }) - - /** - * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1600 - * @tc.desc When the bundleName is exist, moduleName is null, the form configuration information - * query fails (by Promise) - */ - it('FMS_getFormsInfo_1600_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_1600_promise begin"); - - var promise = formManager.getFormsInfo( - "com.form.formsystemtestservicea", - "", - ); - promise.then((result) => { - console.log("FMS_getFormsInfo_1600_promise result:" + result); - expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1600_promise result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1600_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1700 - * @tc.desc When the bundleName is exist, moduleName is null, the form configuration information - * query fails (by AsyncCallback) - */ - it('FMS_getFormsInfo_1700_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_1700_callback begin"); - - var ret = formManager.getFormsInfo( - "com.form.formsystemtestservicea", - "aaaaa", - (result, data) => { - console.log("FMS_getFormsInfo_1700_callback getFormsInfo async::sucess, data json:" - + JSON.stringify(data)); - console.log("FMS_getFormsInfo_1700_callback async::result, result:" + result); - expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1700_callback result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1700_callback==================end'); - }, TIMEOUT) - console.log("FMS_getFormsInfo_1700_callback end, ret:" + ret); - }) - - /** - * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1700 - * @tc.desc When the bundleName is exist, moduleName is null, the form configuration information - * query fails (by Promise) - */ - it('FMS_getFormsInfo_1700_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_1700_promise begin"); - - var promise = formManager.getFormsInfo( - "com.form.formsystemtestservicea", - "aaaaa", - ); - promise.then((result) => { - console.log("FMS_getFormsInfo_1700_promise result:" + result); - expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1700_promise result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1700_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1800 - * @tc.desc When the bundleName and moduleName is exist, the form configuration information is - * queried successfully (by AsyncCallback). - */ - it('FMS_getFormsInfo_1800_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_1800_callback begin"); - - var ret = formManager.getFormsInfo( - "com.form.formsystemtestservicea", - "formmodule001", - (result, data) => { - console.log("FMS_getFormsInfo_1800_callback getFormsInfo async::sucess, data json:" - + JSON.stringify(data)); - console.log("FMS_getFormsInfo_1800_callback async::result, result:" + result); - for(var i = 0; i < data.length; i++) { - expect(typeof (data[i].description)).assertEqual("string"); - expect(data[i].description).assertEqual("form_description"); - expect(data[i].type).assertEqual(1); - expect(data[i].colorMode).assertEqual(-1); - expect(data[i].jsComponentName).assertEqual("card"); - expect(data[i].isDefault).assertEqual(1); - expect(data[i].updateEnabled).assertEqual(1); - expect(data[i].updateDuration).assertEqual(1); - expect(data[i].scheduledUpdateTime).assertEqual("10:30"); - expect(data[i].formVisibleNotify).assertEqual(1); - expect(data[i].defaultDimension).assertEqual(1); - expect(data[i].supportDimensions[0]).assertEqual(1); - expect(data[i].supportDimensions[1]).assertEqual(2); - expect(data[i].metaData.customizeData[0].name).assertEqual("originWidgetName"); - expect(data[i].metaData.customizeData[0].value).assertEqual("myTest"); - } - - expect(data[0].name).assertEqual("FormA_Js001"); - expect(data[1].name).assertEqual("FormA_Js002"); - console.log("FMS_getFormsInfo_1800_callback result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1800_callback==================end'); - }, TIMEOUT) - console.log("FMS_getFormsInfo_1800_callback end, ret:" + ret); - }) - - /** - * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1800 - * @tc.desc When the bundleName and moduleName is exist, the form configuration information is - * queried successfully (by Promise) - */ - it('FMS_getFormsInfo_1800_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_1800_promise begin"); - - var promise = formManager.getFormsInfo( - "com.form.formsystemtestservicea", - "formmodule001", - ); - promise.then((data) => { - console.log("FMS_getFormsInfo_1800_promise async::sucess, data json:" + JSON.stringify(data)); - for(var i = 0; i < data.length; i++) { - expect(typeof (data[i].description)).assertEqual("string"); - expect(data[i].description).assertEqual("form_description"); - expect(data[i].type).assertEqual(1); - expect(data[i].colorMode).assertEqual(-1); - expect(data[i].jsComponentName).assertEqual("card"); - expect(data[i].isDefault).assertEqual(1); - expect(data[i].updateEnabled).assertEqual(1); - expect(data[i].updateDuration).assertEqual(1); - expect(data[i].scheduledUpdateTime).assertEqual("10:30"); - expect(data[i].formVisibleNotify).assertEqual(1); - expect(data[i].defaultDimension).assertEqual(1); - expect(data[i].supportDimensions[0]).assertEqual(1); - expect(data[i].supportDimensions[1]).assertEqual(2); - expect(data[i].metaData.customizeData[0].name).assertEqual("originWidgetName"); - expect(data[i].metaData.customizeData[0].value).assertEqual("myTest"); - } - - expect(data[0].name).assertEqual("FormA_Js001"); - expect(data[1].name).assertEqual("FormA_Js002"); - console.log("FMS_getFormsInfo_1800_promise result end"); - done(); - }); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1800_promise==================end'); - }, TIMEOUT) - }) - -}) diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/test/List.test.js deleted file mode 100644 index e0cc97565827c143066ba7cbb749e54ce3cb66c5..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/js/test/List.test.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -require('./FormsOneAndTwoJsunit.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/resources/base/element/string.json deleted file mode 100644 index f1b28c625290e597ed8a1970b69e703081b11528..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "formsoneandtwo" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformsoneandtwotest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/BUILD.gn deleted file mode 100644 index b5ab641a85dab7ca47a6ea3701748bc892c07f84..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/BUILD.gn +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("ActsFormsZeroAndOneTest") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActsFormsZeroAndOneTest" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/Test.json deleted file mode 100644 index 446c6fb3cfe21e2c1c2d343cc5c729c32138b218..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/Test.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "JSUnitTest", - "test-timeout": "300000", - "package": "com.example.formszeroandone", - "shell-timeout": "600000" - }, - "kits": [ - { - "test-file-name": [ - "ActsFormsZeroAndOneTest.hap", - "ActsFormSystemTestServiceB.hap", - "ActsFormSystemTestServiceD.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/config.json deleted file mode 100644 index 1e8cf47314927e6bdf8b223b17e8cafa48c84a13..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/config.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "app": { - "bundleName": "com.example.formszeroandone", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 5, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.formszeroandone", - "name": ".MyApplication", - "mainAbility": "com.example.formszeroandone.MainAbility", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "visible": true, - "name": "com.example.formszeroandone.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - } - ], - "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/app.js deleted file mode 100644 index e423f4bce4698ec1d7dc86c3eea3990a5e7b1085..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/app.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/pages/index/index.css deleted file mode 100644 index 0a66102a6f5e70198f774f5fbf658e36c25cc235..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,44 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 40px; - color: #000000; - opacity: 0.9; -} - -@media screen and (device-type: tablet) and (orientation: landscape) { - .title { - font-size: 100px; - } -} - -@media screen and (device-type: wearable) { - .title { - font-size: 28px; - color: #FFFFFF; - } -} - -@media screen and (device-type: tv) { - .container { - background-image: url("/common/images/Wallpaper.png"); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - } - - .title { - font-size: 100px; - color: #FFFFFF; - } -} - -@media screen and (device-type: phone) and (orientation: landscape) { - .title { - font-size: 60px; - } -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/pages/index/index.hml deleted file mode 100644 index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/pages/index/index.js deleted file mode 100644 index e4832498bfe3f34bb29573e181ce1b298fb7f617..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import app from '@system.app' -import file from '@system.file' -import router from '@system.router' -import device from '@system.device' -import {Core, ExpectExtend, ReportExtend} from 'deccjsunit/index' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = "卡片配置信息查询 \n有权限、是系统应用"; - }, - onShow() { - console.info('onShow finish') - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - const reportExtend = new ReportExtend(file) - core.addService('expect', expectExtend) - core.addService('report', reportExtend) - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - - require('../../../test/List.test') - core.execute() - console.info('onShow end') - }, - onReady() { - }, -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/test/FormsZeroAndOneJsunit.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/test/FormsZeroAndOneJsunit.test.js deleted file mode 100644 index d1feeac016e4ad002f93d4815980255952308b6b..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/test/FormsZeroAndOneJsunit.test.js +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import formManager from '@ohos.ability.formManager' -import {describe, it, expect} from 'deccjsunit/index' - -const TIMEOUT = 3000; -describe('ActsFormsZeroAndOneTest', function () { - console.log("ActsFormsZeroAndOneTest===start"); - - /** - * @tc.name getAllFormsInfo test - * @tc.number FMS_getFormsInfo_0400 - * @tc.desc All form configuration information is queried successfully (by AsyncCallback) - */ - it('FMS_getFormsInfo_0400_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_0400_callback begin"); - - var ret = formManager.getAllFormsInfo( - (result, data) => { - console.log("FMS_getFormsInfo_0400_callback, the forms number:" + data.length); - console.log("FMS_getFormsInfo_0400_callback async::sucess, data json:" + JSON.stringify(data)); - var dataB = data.filter((p) => { - return p.bundleName == "com.form.formsystemtestserviceb"; - }); - console.log("FMS_getFormsInfo_0400_callback async::sucess, dataB json:" + JSON.stringify(dataB)); - console.log("FMS_getFormsInfo_0400_callback async::result, result:" + result); - expect(result).assertEqual(1); - - expect(dataB[0].name).assertEqual("FormB_Js001"); - expect(dataB[0].description).assertEqual("form_description"); - expect(dataB[0].type).assertEqual(1); - expect(dataB[0].colorMode).assertEqual(-1); - expect(dataB[0].jsComponentName).assertEqual("card"); - expect(dataB[0].isDefault).assertEqual(1); - expect(dataB[0].updateEnabled).assertEqual(1); - expect(dataB[0].updateDuration).assertEqual(1); - expect(dataB[0].scheduledUpdateTime).assertEqual("10:30"); - expect(dataB[0].formVisibleNotify).assertEqual(1); - expect(dataB[0].defaultDimension).assertEqual(1); - expect(dataB[0].supportDimensions[0]).assertEqual(1); - expect(dataB[0].supportDimensions[1]).assertEqual(2); - expect(dataB[0].metaData.customizeData[0].name).assertEqual("originWidgetName"); - expect(dataB[0].metaData.customizeData[0].value).assertEqual("myTest"); - console.log("FMS_getFormsInfo_0400_callback result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0400_callback==================end'); - }, TIMEOUT) - console.log("FMS_getFormsInfo_0400_callback end, ret:"+ret); - }) - - /** - * @tc.name getAllFormsInfo test - * @tc.number FMS_getFormsInfo_0400 - * @tc.desc All form configuration information is queried successfully (by Promise) - */ - it('FMS_getFormsInfo_0400_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_0400_promise begin"); - - var promise = formManager.getAllFormsInfo(); - promise.then((data) => { - console.log("FMS_getFormsInfo_0400_promise, the forms number:" + data.length); - console.log("FMS_getFormsInfo_0400_promise async::sucess, data json:" + JSON.stringify(data)); - var dataB = data.filter((p) => { - return p.bundleName == "com.form.formsystemtestserviceb"; - }); - console.log("FMS_getFormsInfo_0400_promise async::sucess, dataB json:" + JSON.stringify(dataB)); - - expect(dataB[0].name).assertEqual("FormB_Js001"); - expect(dataB[0].description).assertEqual("form_description"); - expect(dataB[0].type).assertEqual(1); - expect(dataB[0].colorMode).assertEqual(-1); - expect(dataB[0].jsComponentName).assertEqual("card"); - expect(dataB[0].isDefault).assertEqual(1); - expect(dataB[0].updateEnabled).assertEqual(1); - expect(dataB[0].updateDuration).assertEqual(1); - expect(dataB[0].scheduledUpdateTime).assertEqual("10:30"); - expect(dataB[0].formVisibleNotify).assertEqual(1); - expect(dataB[0].defaultDimension).assertEqual(1); - expect(dataB[0].supportDimensions[0]).assertEqual(1); - expect(dataB[0].supportDimensions[1]).assertEqual(2); - expect(dataB[0].metaData.customizeData[0].name).assertEqual("originWidgetName"); - expect(dataB[0].metaData.customizeData[0].value).assertEqual("myTest"); - console.log("FMS_getFormsInfo_0400_promise result end"); - done(); - } - ); - - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0400_promise==================end'); - }, TIMEOUT) - }) - -}) diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/test/List.test.js deleted file mode 100644 index ed8dacc746f6f8cda063d23d46c752a1515528a3..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/js/test/List.test.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -require('./FormsZeroAndOneJsunit.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/resources/base/element/string.json deleted file mode 100644 index a97c4c16cac15dde2e5abb22d27abf3f103fb8da..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "formszeroandone" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszeroandonetest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/BUILD.gn deleted file mode 100644 index b9591a5e13d742a984bd00b33babc82826863704..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/BUILD.gn +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("ActsFormsZeroTest") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActsFormsZeroTest" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/Test.json deleted file mode 100644 index eb2941d66f58760f12ba0962e13b9b735a52394a..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/Test.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "JSUnitTest", - "test-timeout": "300000", - "package": "com.example.formszero", - "shell-timeout": "600000" - }, - "kits": [ - { - "test-file-name": [ - "ActsFormsZeroTest.hap", - "ActsFormSystemTestServiceD.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/config.json deleted file mode 100644 index 95b96b2afa05c3021b753024bd28f125e67793bd..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/config.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "app": { - "bundleName": "com.example.formszero", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 5, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.formszero", - "name": ".MyApplication", - "mainAbility": "com.example.formszero.MainAbility", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "visible": true, - "name": "com.example.formszero.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - } - ], - "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/app.js deleted file mode 100644 index e423f4bce4698ec1d7dc86c3eea3990a5e7b1085..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/app.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/pages/index/index.css deleted file mode 100644 index 0a66102a6f5e70198f774f5fbf658e36c25cc235..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,44 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 40px; - color: #000000; - opacity: 0.9; -} - -@media screen and (device-type: tablet) and (orientation: landscape) { - .title { - font-size: 100px; - } -} - -@media screen and (device-type: wearable) { - .title { - font-size: 28px; - color: #FFFFFF; - } -} - -@media screen and (device-type: tv) { - .container { - background-image: url("/common/images/Wallpaper.png"); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - } - - .title { - font-size: 100px; - color: #FFFFFF; - } -} - -@media screen and (device-type: phone) and (orientation: landscape) { - .title { - font-size: 60px; - } -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/pages/index/index.hml deleted file mode 100644 index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/pages/index/index.js deleted file mode 100644 index e4832498bfe3f34bb29573e181ce1b298fb7f617..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import app from '@system.app' -import file from '@system.file' -import router from '@system.router' -import device from '@system.device' -import {Core, ExpectExtend, ReportExtend} from 'deccjsunit/index' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = "卡片配置信息查询 \n有权限、是系统应用"; - }, - onShow() { - console.info('onShow finish') - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - const reportExtend = new ReportExtend(file) - core.addService('expect', expectExtend) - core.addService('report', reportExtend) - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - - require('../../../test/List.test') - core.execute() - console.info('onShow end') - }, - onReady() { - }, -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/test/FormsZeroJsunit.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/test/FormsZeroJsunit.test.js deleted file mode 100644 index 30f5ebdd438d99aecffca0e4425110a19893a136..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/test/FormsZeroJsunit.test.js +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import formBindingData from "@ohos.application.formBindingData" -import formManager from '@ohos.ability.formManager' -import {describe, it, expect} from 'deccjsunit/index' - -const TIMEOUT = 3000; -describe('ActsFormsZeroTest', function () { - console.log("ActsFormsZeroTest===start"); - - /** - * @tc.name getAllFormsInfo test - * @tc.number FMS_getFormsInfo_0300 - * @tc.desc All form configuration information is empty (by AsyncCallback) - */ - it('FMS_getFormsInfo_0300_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_0300_callback begin"); - var ret = formManager.getAllFormsInfo( - (result, data) => { - var dataD = data.filter((p) => { - return p.bundleName == "com.form.formsystemtestserviced"; - }); - console.log("FMS_getFormsInfo_0300_callback, dataB json:" + JSON.stringify(data)); - console.log("FMS_getFormsInfo_0300_callback, dataB json:" + JSON.stringify(dataD)); - console.log("FMS_getFormsInfo_0300_callback, the all forms number:" + data.length); - console.log("FMS_getFormsInfo_0300_callback, the formD number:" + dataD.length); - console.log("FMS_getFormsInfo_0300_callback async::result, result:" + result); - expect(dataD.length).assertEqual(0); - console.log("FMS_getFormsInfo_0300_callback result end"); - done(); - } - ); - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0300_callback==================end'); - }, TIMEOUT) - console.log("FMS_getFormsInfo_0300_callback end, ret:" + ret); - }) - - /** - * @tc.name getAllFormsInfo test - * @tc.number FMS_getFormsInfo_0300 - * @tc.desc All form configuration information is empty (by Promise) - */ - it('FMS_getFormsInfo_0300_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_0300_promise begin"); - var ret = formManager.getAllFormsInfo( - (result, data) => { - console.log("FMS_getFormsInfo_0300_promise, data json:" + JSON.stringify(data)); - console.log("FMS_getFormsInfo_0300_promise, the all forms number:" + data.length); - console.log("FMS_getFormsInfo_0300_promise async::result, result:" + result); - console.log("FMS_getFormsInfo_0300_promise result end"); - if (data.length != 0){ - var dataD = data.filter((p) => { - return p.bundleName == "com.form.formsystemtestserviced"; - }); - console.log("FMS_getFormsInfo_0300_promise, dataB json:" + JSON.stringify(dataD)); - console.log("FMS_getFormsInfo_0300_promise, the formD number:" + dataD.length); - expect(dataD.length).assertEqual(0); - console.log("FMS_getFormsInfo_0300_promise result end"); - done(); - } else { - var promise = formManager.getAllFormsInfo(); - promise.then((result) => { - console.log("FMS_getFormsInfo_0300_promise result:" + result); - expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_0300_promise result end"); - done(); - }); - } - } - ); - setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0300_promise==================end'); - }, TIMEOUT) - console.log("FMS_getFormsInfo_0300_promise end, ret:" + ret); - }) - - /** - * @tc.name CreateFormBindingData test - * @tc.number FMS_CreateFormBindingData_0100 - * @tc.desc Creates data and returns a data object - */ - it('FMS_CreateFormBindingData_0100', 0, async function (done) { - console.log("FMS_CreateFormBindingData_0100 begin"); - let dataObj = { - temperature:"22c", - "time":"22:00", - "test":22, - "test3":true - }; - let obj = formBindingData.createFormBindingData(JSON.stringify(dataObj)); - console.log('FMS_CreateFormBindingData_0100, obj.data:' + obj.data); - expect(JSON.stringify(dataObj)).assertEqual(obj.data); - done(); - console.log("FMS_CreateFormBindingData_0100 end"); - }) - -}) diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/test/List.test.js deleted file mode 100644 index dffd56ce04ff40f04751919b004095ee0e51a137..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/js/test/List.test.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -require('./FormsZeroJsunit.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/resources/base/element/string.json deleted file mode 100644 index 2eacd82ce7a8aa495f1252381f0fb709b1f37124..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "formszero" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformszerotest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/BUILD.gn deleted file mode 100644 index 017887f5d267e8aa62ee8749421497001c225c6f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -import("//test/xts/tools/build/suite.gni") - -ohos_hap("ActsFormSystemTestServiceA") { - hap_profile = "./src/main/config.json" - hap_name = "ActsFormSystemTestServiceA" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/Test.json deleted file mode 100755 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/config.json deleted file mode 100644 index c2b828066d1461e9795f3b81c8aae0b2f1f8183f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/config.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "app": { - "bundleName": "com.form.formsystemtestservicea", - "vendor": "ohos", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 5, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.form.formsystemtestservicea", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "formmodule001", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "visible": true, - "name": "FormStServiceAbilityA", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:entry_MainAbility", - "type": "service", - "launchType": "standard", - "formsEnabled": true, - "srcLanguage": "c++", - "forms": [ - { - "name": "FormA_Js001", - "description": "form_description", - "isDefault": true, - "type": "JS", - "colorMode": "auto", - "supportDimensions":[ "1*2", "2*2" ], - "defaultDimension": "1*2", - "updateEnabled": true, - "updateDuration": 1, - "scheduledUpdateTime": "10:30", - "jsComponentName": "card", - "formVisibleNotify" : true, - "metaData": { - "customizeData": [ - { - "name": "originWidgetName", - "value": "myTest" - } - ] - } - }, - { - "name": "FormA_Js002", - "description": "form_description", - "isDefault": true, - "type": "JS", - "colorMode": "auto", - "supportDimensions":[ "1*2", "2*2" ], - "defaultDimension": "1*2", - "updateEnabled": true, - "updateDuration": 1, - "scheduledUpdateTime": "10:30", - "jsComponentName": "card", - "formVisibleNotify" : true, - "metaData": { - "customizeData": [ - { - "name": "originWidgetName", - "value": "myTest" - } - ] - } - } - ] - } - ], - "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/app.js deleted file mode 100644 index 35bb6d87002697dfeea26db96fa33b099af16a3d..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/app.js +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Subscriber from '@ohos.commonEvent' - -export default { - constructor(obj) { - console.log('formSystemTestServiceA: constructor ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_constructor", - (err,data) => { - console.log("formSystemTestServiceA: constructor publish callback return! ") - } - ); - }, - - updateData(obj) { - console.log('formSystemTestServiceA: updateData ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_updateData", - (err,data) => { - console.log("formSystemTestServiceA: updateData publish callback return! ") - } - ); - }, - - getDataString() { - console.log('formSystemTestServiceA: getDataString ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_getDataString", - (err,data) => { - console.log("formSystemTestServiceA: getDataString publish callback return! ") - } - ); - return "dataString"; - }, - - addImageData(name, data){ - console.log('formSystemTestServiceA: addImageData ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_addImageData", - (err,data) => { - console.log("formSystemTestServiceA: addImageData publish callback return! ") - } - ); - }, - - removeImageData(name){ - console.log('formSystemTestServiceA: removeImageData ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_removeImageData", - (err,data) => { - console.log("formSystemTestServiceA: removeImageData publish callback return! ") - } - ); - }, - - onCreate(para) { - console.log('formSystemTestServiceA: onCreate ok, para:'+ para + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onCreate", - (err,data) => { - console.log("formSystemTestServiceA: onCreate publish callback return! ") - } - ); - return {"city":"beijingA"}; - }, - - onDestroy(para) { - console.log('formSystemTestServiceA: onDestroy para:'+ para + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onDestroy", - (err,data) => { - console.log("formSystemTestServiceA: onDestroy publish callback return! ") - } - ); - }, - - onDelete(formId) { - console.log('formSystemTestServiceA: onDelete ok, formId:' + formId + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onDelete", - (err,data) => { - console.log("formSystemTestServiceA: onDelete publish callback return! ") - } - ); - }, - - onTriggerEvent(formId, message) { - console.log('formSystemTestServiceA: onTriggerEvent ok, formId:' + formId - + ', message:' + message + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onTriggerEvent", - (err,data) => { - console.log("formSystemTestServiceA: onTriggerEvent publish callback return! ") - } - ); - }, - - onUpdate(formId) { - console.log('formSystemTestServiceA: onUpdate ok, formId:' + formId + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onUpdate", - (err,data) => { - console.log("formSystemTestServiceA: onUpdate publish callback return! ") - } - ); - }, - - onCastTemp(formId) { - console.log('formSystemTestServiceA: onCastTemp ok, formId:' + formId + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onCastTemp", - (err,data) => { - console.log("formSystemTestServiceA: onCastTemp publish callback return! ") - } - ); - }, - - onVisibilityChanged(formEventsMap) { - console.log('formSystemTestServiceA: OnVisibilityChanged ok, map:'+ formEventsMap + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onVisibilityChanged", - (err,data) => { - console.log("formSystemTestServiceA: onVisibilityChanged publish callback return! ") - } - ); - }, - - onAcquireState(want) { - console.log('formSystemTestServiceA: OnAcquireState ok, '+ 'want.abilityName:' + want.abilityName + - ', want.bundleName:' + want.bundleName + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onAcquireState", - (err,data) => { - console.log("formSystemTestServiceA: onAcquireState publish callback return! ") - } - ); - } -}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/pages/index/index.css deleted file mode 100644 index 2b1965821483f4f8c8b97c86ef07fe87ea767d01..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,44 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 40px; - color: #000000; - opacity: 0.9; -} - -@media screen and (device-type: tablet) and (orientation: landscape) { - .title { - font-size: 100px; - } -} - -@media screen and (device-type: wearable) { - .title { - font-size: 28px; - color: #FFFFFF; - } -} - -@media screen and (device-type: tv) { - .container { - background-image: url("../../common/images/Wallpaper.png"); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - } - - .title { - font-size: 100px; - color: #FFFFFF; - } -} - -@media screen and (device-type: phone) and (orientation: landscape) { - .title { - font-size: 60px; - } -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/pages/index/index.hml deleted file mode 100644 index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/pages/index/index.js deleted file mode 100644 index 1ced937cf25654b5e91be9753e6b60f21d82569c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/resources/base/element/string.json deleted file mode 100644 index 4b0015b3db4aeede8b6d82b1fd2c52e1d667be38..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "A_fms" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/BUILD.gn deleted file mode 100644 index 81242b602c03cc9f9a66b5d9d63435c75052ac9e..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -import("//test/xts/tools/build/suite.gni") - -ohos_hap("ActsFormSystemTestServiceB") { - hap_profile = "./src/main/config.json" - hap_name = "ActsFormSystemTestServiceB" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/config.json deleted file mode 100644 index 9233c2eaaa2930aa661d7f55ede23be47e778fa1..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/config.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "app": { - "bundleName": "com.form.formsystemtestserviceb", - "vendor": "ohos", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 5, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.form.formsystemtestserviceb", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "formmodule001", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "visible": true, - "name": "FormStServiceAbilityB", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:entry_MainAbility", - "type": "service", - "launchType": "standard", - "formsEnabled": true, - "forms": [ - { - "name": "FormB_Js001", - "description": "form_description", - "isDefault": true, - "type": "JS", - "colorMode": "auto", - "supportDimensions":[ "1*2", "2*2" ], - "defaultDimension": "1*2", - "updateEnabled": true, - "updateDuration": 1, - "scheduledUpdateTime": "10:30", - "jsComponentName": "card", - "formVisibleNotify" : true, - "metaData": { - "customizeData": [ - { - "name": "originWidgetName", - "value": "myTest" - } - ] - } - } - ] - } - ], - "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/app.js deleted file mode 100644 index 35bb6d87002697dfeea26db96fa33b099af16a3d..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/app.js +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Subscriber from '@ohos.commonEvent' - -export default { - constructor(obj) { - console.log('formSystemTestServiceA: constructor ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_constructor", - (err,data) => { - console.log("formSystemTestServiceA: constructor publish callback return! ") - } - ); - }, - - updateData(obj) { - console.log('formSystemTestServiceA: updateData ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_updateData", - (err,data) => { - console.log("formSystemTestServiceA: updateData publish callback return! ") - } - ); - }, - - getDataString() { - console.log('formSystemTestServiceA: getDataString ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_getDataString", - (err,data) => { - console.log("formSystemTestServiceA: getDataString publish callback return! ") - } - ); - return "dataString"; - }, - - addImageData(name, data){ - console.log('formSystemTestServiceA: addImageData ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_addImageData", - (err,data) => { - console.log("formSystemTestServiceA: addImageData publish callback return! ") - } - ); - }, - - removeImageData(name){ - console.log('formSystemTestServiceA: removeImageData ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_removeImageData", - (err,data) => { - console.log("formSystemTestServiceA: removeImageData publish callback return! ") - } - ); - }, - - onCreate(para) { - console.log('formSystemTestServiceA: onCreate ok, para:'+ para + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onCreate", - (err,data) => { - console.log("formSystemTestServiceA: onCreate publish callback return! ") - } - ); - return {"city":"beijingA"}; - }, - - onDestroy(para) { - console.log('formSystemTestServiceA: onDestroy para:'+ para + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onDestroy", - (err,data) => { - console.log("formSystemTestServiceA: onDestroy publish callback return! ") - } - ); - }, - - onDelete(formId) { - console.log('formSystemTestServiceA: onDelete ok, formId:' + formId + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onDelete", - (err,data) => { - console.log("formSystemTestServiceA: onDelete publish callback return! ") - } - ); - }, - - onTriggerEvent(formId, message) { - console.log('formSystemTestServiceA: onTriggerEvent ok, formId:' + formId - + ', message:' + message + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onTriggerEvent", - (err,data) => { - console.log("formSystemTestServiceA: onTriggerEvent publish callback return! ") - } - ); - }, - - onUpdate(formId) { - console.log('formSystemTestServiceA: onUpdate ok, formId:' + formId + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onUpdate", - (err,data) => { - console.log("formSystemTestServiceA: onUpdate publish callback return! ") - } - ); - }, - - onCastTemp(formId) { - console.log('formSystemTestServiceA: onCastTemp ok, formId:' + formId + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onCastTemp", - (err,data) => { - console.log("formSystemTestServiceA: onCastTemp publish callback return! ") - } - ); - }, - - onVisibilityChanged(formEventsMap) { - console.log('formSystemTestServiceA: OnVisibilityChanged ok, map:'+ formEventsMap + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onVisibilityChanged", - (err,data) => { - console.log("formSystemTestServiceA: onVisibilityChanged publish callback return! ") - } - ); - }, - - onAcquireState(want) { - console.log('formSystemTestServiceA: OnAcquireState ok, '+ 'want.abilityName:' + want.abilityName + - ', want.bundleName:' + want.bundleName + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onAcquireState", - (err,data) => { - console.log("formSystemTestServiceA: onAcquireState publish callback return! ") - } - ); - } -}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/pages/index/index.css deleted file mode 100644 index 2b1965821483f4f8c8b97c86ef07fe87ea767d01..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,44 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 40px; - color: #000000; - opacity: 0.9; -} - -@media screen and (device-type: tablet) and (orientation: landscape) { - .title { - font-size: 100px; - } -} - -@media screen and (device-type: wearable) { - .title { - font-size: 28px; - color: #FFFFFF; - } -} - -@media screen and (device-type: tv) { - .container { - background-image: url("../../common/images/Wallpaper.png"); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - } - - .title { - font-size: 100px; - color: #FFFFFF; - } -} - -@media screen and (device-type: phone) and (orientation: landscape) { - .title { - font-size: 60px; - } -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/pages/index/index.hml deleted file mode 100644 index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/pages/index/index.js deleted file mode 100644 index 1ced937cf25654b5e91be9753e6b60f21d82569c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/resources/base/element/string.json deleted file mode 100644 index b0371a68d5d2fc4c401add8ff26331dc6967c848..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "B_fms" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/BUILD.gn deleted file mode 100644 index 1cdb5a6e5ca720184dd54e2482e33bf7da73fa24..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -import("//test/xts/tools/build/suite.gni") - -ohos_hap("ActsFormSystemTestServiceC") { - hap_profile = "./src/main/config.json" - hap_name = "ActsFormSystemTestServiceC" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/config.json deleted file mode 100644 index 992305753fa5c030801813f971d1edc398c6220b..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/config.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "app": { - "bundleName": "com.form.formsystemtestservicec", - "vendor": "ohos", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 5, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.form.formsystemtestservicec", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "formmodule001", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "visible": true, - "name": "FormStServiceAbilityC", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:entry_MainAbility", - "type": "service", - "launchType": "standard", - "formsEnabled": true, - "forms": [ - { - "name": "FormC_Js001", - "description": "form_description", - "isDefault": true, - "type": "JS", - "colorMode": "auto", - "supportDimensions":[ "1*2", "2*2" ], - "defaultDimension": "1*2", - "updateEnabled": true, - "updateDuration": 1, - "scheduledUpdateTime": "10:30", - "jsComponentName": "card", - "formVisibleNotify" : true, - "metaData": { - "customizeData": [ - { - "name": "originWidgetName", - "value": "myTest" - } - ] - } - } - ] - } - ], - "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/app.js deleted file mode 100644 index 35bb6d87002697dfeea26db96fa33b099af16a3d..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/app.js +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Subscriber from '@ohos.commonEvent' - -export default { - constructor(obj) { - console.log('formSystemTestServiceA: constructor ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_constructor", - (err,data) => { - console.log("formSystemTestServiceA: constructor publish callback return! ") - } - ); - }, - - updateData(obj) { - console.log('formSystemTestServiceA: updateData ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_updateData", - (err,data) => { - console.log("formSystemTestServiceA: updateData publish callback return! ") - } - ); - }, - - getDataString() { - console.log('formSystemTestServiceA: getDataString ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_getDataString", - (err,data) => { - console.log("formSystemTestServiceA: getDataString publish callback return! ") - } - ); - return "dataString"; - }, - - addImageData(name, data){ - console.log('formSystemTestServiceA: addImageData ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_addImageData", - (err,data) => { - console.log("formSystemTestServiceA: addImageData publish callback return! ") - } - ); - }, - - removeImageData(name){ - console.log('formSystemTestServiceA: removeImageData ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_removeImageData", - (err,data) => { - console.log("formSystemTestServiceA: removeImageData publish callback return! ") - } - ); - }, - - onCreate(para) { - console.log('formSystemTestServiceA: onCreate ok, para:'+ para + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onCreate", - (err,data) => { - console.log("formSystemTestServiceA: onCreate publish callback return! ") - } - ); - return {"city":"beijingA"}; - }, - - onDestroy(para) { - console.log('formSystemTestServiceA: onDestroy para:'+ para + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onDestroy", - (err,data) => { - console.log("formSystemTestServiceA: onDestroy publish callback return! ") - } - ); - }, - - onDelete(formId) { - console.log('formSystemTestServiceA: onDelete ok, formId:' + formId + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onDelete", - (err,data) => { - console.log("formSystemTestServiceA: onDelete publish callback return! ") - } - ); - }, - - onTriggerEvent(formId, message) { - console.log('formSystemTestServiceA: onTriggerEvent ok, formId:' + formId - + ', message:' + message + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onTriggerEvent", - (err,data) => { - console.log("formSystemTestServiceA: onTriggerEvent publish callback return! ") - } - ); - }, - - onUpdate(formId) { - console.log('formSystemTestServiceA: onUpdate ok, formId:' + formId + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onUpdate", - (err,data) => { - console.log("formSystemTestServiceA: onUpdate publish callback return! ") - } - ); - }, - - onCastTemp(formId) { - console.log('formSystemTestServiceA: onCastTemp ok, formId:' + formId + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onCastTemp", - (err,data) => { - console.log("formSystemTestServiceA: onCastTemp publish callback return! ") - } - ); - }, - - onVisibilityChanged(formEventsMap) { - console.log('formSystemTestServiceA: OnVisibilityChanged ok, map:'+ formEventsMap + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onVisibilityChanged", - (err,data) => { - console.log("formSystemTestServiceA: onVisibilityChanged publish callback return! ") - } - ); - }, - - onAcquireState(want) { - console.log('formSystemTestServiceA: OnAcquireState ok, '+ 'want.abilityName:' + want.abilityName + - ', want.bundleName:' + want.bundleName + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onAcquireState", - (err,data) => { - console.log("formSystemTestServiceA: onAcquireState publish callback return! ") - } - ); - } -}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/pages/index/index.css deleted file mode 100644 index 2b1965821483f4f8c8b97c86ef07fe87ea767d01..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,44 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 40px; - color: #000000; - opacity: 0.9; -} - -@media screen and (device-type: tablet) and (orientation: landscape) { - .title { - font-size: 100px; - } -} - -@media screen and (device-type: wearable) { - .title { - font-size: 28px; - color: #FFFFFF; - } -} - -@media screen and (device-type: tv) { - .container { - background-image: url("../../common/images/Wallpaper.png"); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - } - - .title { - font-size: 100px; - color: #FFFFFF; - } -} - -@media screen and (device-type: phone) and (orientation: landscape) { - .title { - font-size: 60px; - } -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/pages/index/index.hml deleted file mode 100644 index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/pages/index/index.js deleted file mode 100644 index 1ced937cf25654b5e91be9753e6b60f21d82569c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/resources/base/element/string.json deleted file mode 100644 index 5579dbb9f6dc489d465611d74d8d696e60375756..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "C_fms" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/BUILD.gn deleted file mode 100644 index e09b98ed7bbab532a404ae836835d2993e11f82c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -import("//test/xts/tools/build/suite.gni") - -ohos_hap("ActsFormSystemTestServiceD") { - hap_profile = "./src/main/config.json" - hap_name = "ActsFormSystemTestServiceD" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/signature/openharmony_sx.p7b and /dev/null differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/config.json deleted file mode 100644 index ccd6a339b071de6a60657e229bba9f4ec90dc019..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/config.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "app": { - "bundleName": "com.form.formsystemtestserviced", - "vendor": "ohos", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 5, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.form.formsystemtestserviced", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "formmodule001", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "visible": true, - "name": "FormStServiceAbilityD", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:entry_MainAbility", - "type": "service", - "launchType": "standard", - "formsEnabled": true, - "srcLanguage": "c++" - } - ], - "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/app.js deleted file mode 100644 index 35bb6d87002697dfeea26db96fa33b099af16a3d..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/app.js +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Subscriber from '@ohos.commonEvent' - -export default { - constructor(obj) { - console.log('formSystemTestServiceA: constructor ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_constructor", - (err,data) => { - console.log("formSystemTestServiceA: constructor publish callback return! ") - } - ); - }, - - updateData(obj) { - console.log('formSystemTestServiceA: updateData ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_updateData", - (err,data) => { - console.log("formSystemTestServiceA: updateData publish callback return! ") - } - ); - }, - - getDataString() { - console.log('formSystemTestServiceA: getDataString ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_getDataString", - (err,data) => { - console.log("formSystemTestServiceA: getDataString publish callback return! ") - } - ); - return "dataString"; - }, - - addImageData(name, data){ - console.log('formSystemTestServiceA: addImageData ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_addImageData", - (err,data) => { - console.log("formSystemTestServiceA: addImageData publish callback return! ") - } - ); - }, - - removeImageData(name){ - console.log('formSystemTestServiceA: removeImageData ok, time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_removeImageData", - (err,data) => { - console.log("formSystemTestServiceA: removeImageData publish callback return! ") - } - ); - }, - - onCreate(para) { - console.log('formSystemTestServiceA: onCreate ok, para:'+ para + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onCreate", - (err,data) => { - console.log("formSystemTestServiceA: onCreate publish callback return! ") - } - ); - return {"city":"beijingA"}; - }, - - onDestroy(para) { - console.log('formSystemTestServiceA: onDestroy para:'+ para + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onDestroy", - (err,data) => { - console.log("formSystemTestServiceA: onDestroy publish callback return! ") - } - ); - }, - - onDelete(formId) { - console.log('formSystemTestServiceA: onDelete ok, formId:' + formId + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onDelete", - (err,data) => { - console.log("formSystemTestServiceA: onDelete publish callback return! ") - } - ); - }, - - onTriggerEvent(formId, message) { - console.log('formSystemTestServiceA: onTriggerEvent ok, formId:' + formId - + ', message:' + message + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onTriggerEvent", - (err,data) => { - console.log("formSystemTestServiceA: onTriggerEvent publish callback return! ") - } - ); - }, - - onUpdate(formId) { - console.log('formSystemTestServiceA: onUpdate ok, formId:' + formId + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onUpdate", - (err,data) => { - console.log("formSystemTestServiceA: onUpdate publish callback return! ") - } - ); - }, - - onCastTemp(formId) { - console.log('formSystemTestServiceA: onCastTemp ok, formId:' + formId + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onCastTemp", - (err,data) => { - console.log("formSystemTestServiceA: onCastTemp publish callback return! ") - } - ); - }, - - onVisibilityChanged(formEventsMap) { - console.log('formSystemTestServiceA: OnVisibilityChanged ok, map:'+ formEventsMap + - ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onVisibilityChanged", - (err,data) => { - console.log("formSystemTestServiceA: onVisibilityChanged publish callback return! ") - } - ); - }, - - onAcquireState(want) { - console.log('formSystemTestServiceA: OnAcquireState ok, '+ 'want.abilityName:' + want.abilityName + - ', want.bundleName:' + want.bundleName + ', time stamp:'+ Date.parse(new Date())); - - Subscriber.publish( - "fms_serviceA_onAcquireState", - (err,data) => { - console.log("formSystemTestServiceA: onAcquireState publish callback return! ") - } - ); - } -}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/pages/index/index.css deleted file mode 100644 index 2b1965821483f4f8c8b97c86ef07fe87ea767d01..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,44 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 40px; - color: #000000; - opacity: 0.9; -} - -@media screen and (device-type: tablet) and (orientation: landscape) { - .title { - font-size: 100px; - } -} - -@media screen and (device-type: wearable) { - .title { - font-size: 28px; - color: #FFFFFF; - } -} - -@media screen and (device-type: tv) { - .container { - background-image: url("../../common/images/Wallpaper.png"); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - } - - .title { - font-size: 100px; - color: #FFFFFF; - } -} - -@media screen and (device-type: phone) and (orientation: landscape) { - .title { - font-size: 60px; - } -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/pages/index/index.hml deleted file mode 100644 index f64b040a5ae394dbaa5e185e1ecd4f4556b92184..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/pages/index/index.js deleted file mode 100644 index 1ced937cf25654b5e91be9753e6b60f21d82569c..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/resources/base/element/string.json deleted file mode 100644 index 289df3ea7801326db65e4e0933b6ff8573efde88..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "D_fms" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - } - ] -} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/resources/base/media/icon.png and /dev/null differ