diff --git a/aafwk/aafwk_standard/formmanager/BUILD.gn b/aafwk/aafwk_standard/formmanager/BUILD.gn index 8aefe399d64bf5b9f348a5ed2fc823adfd72eeef..7f477896e56d6b2bd74cdbb31a6d9aeb8222a4f6 100755 --- a/aafwk/aafwk_standard/formmanager/BUILD.gn +++ b/aafwk/aafwk_standard/formmanager/BUILD.gn @@ -17,9 +17,15 @@ group("formmanager") { testonly = true if (is_standard_system) { deps = [ - #"formsystemtesthost/FormFuzzTest:FormFuzzTest", - #"formsystemtesthost/getallformsinfo:GetAllFormsInfo", - #"formsystemtestservice/formsystemtestservicea:ActsFormSystemTestServiceA", + "formsystemtestservice/formsystemtestservicea:ActsFormSystemTestServiceA", + "formsystemtestservice/formsystemtestserviceb:ActsFormSystemTestServiceB", + "formsystemtestservice/formsystemtestservicec:ActsFormSystemTestServiceC", + "formsystemtestservice/formsystemtestserviced:ActsFormSystemTestServiceD", + "formsystemtesthost/FormFuzzTest:FormFuzzTest", + "formsystemtesthost/getallformsinfo212:GetAllFormsInfo212", + "formsystemtesthost/getallformsinfo211:GetAllFormsInfo211", + "formsystemtesthost/getallformsinfo201:GetAllFormsInfo201", + "formsystemtesthost/getallformsinfo10:GetAllFormsInfo10", ] } } diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/Test.json index 49e7fd17e4f2ee1ab0518e52e74589a56d4ee788..7e05f9f85a53faf0262d9ec0c733af41791bff6e 100755 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/Test.json +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/Test.json @@ -2,7 +2,7 @@ "description": "Configuration for hjunit demo Tests", "driver": { "type": "JSUnitTest", - "test-timeout": "240000", + "test-timeout": "360000", "package": "com.example.formfuzztest", "shell-timeout": "60000" }, diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTest.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTest.test.js deleted file mode 100755 index b6d1b992de90777ba539603afc68b78eec9d2f71..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTest.test.js +++ /dev/null @@ -1,634 +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, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' -import {parameterValue, stringTest, numberTest, booleanTest, -nullTest, undefinedTest, objectTest, arrayTest, functionTest} from './getParam.js' - -const TIMEOUT = 2000; -describe('formFuzzTest', function () { - console.log("formFuzzTest===start"); - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_0200_callback', 0, async function (done) { - console.log("FMS_fuzzTest_0200_callback deleteForm begin"); - - var formId = parameterValue(); - console.log("FMS_fuzzTest_0200_callback deleteForm formId typeof:"+ typeof(formId)); - - try{ - formManager.deleteForm( - formId, // formId: number>0 ok - (err,data) => { - console.log("FMS_fuzzTest_0200_callback async::callbak return!!!") - console.log("FMS_fuzzTest_0200_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_0200_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTest_0200_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0200_callback deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_0200_promise', 0, async function (done) { - console.log("FMS_fuzzTest_0200_promise deleteForm begin"); - - var formId = parameterValue(); - console.log("FMS_fuzzTest_0200_promise deleteForm formId typeof:"+ typeof(formId)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.deleteForm(formId)); // formId: number>0 ok - console.log("FMS_fuzzTest_0200_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_0200_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0200_promise deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_0300_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_01_callback releaseForm begin"); - - var formId = parameterValue(); - console.log("FMS_fuzzTest_0300_param_01_callback releaseForm formId typeof:"+ typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTest_0300_param_01_callback releaseForm isReleaseCache typeof:"+ typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, // formId: number>0 ok - isReleaseCache, // isReleaseCache: boolean ok - (err,data) => { - console.log("FMS_fuzzTest_0300_param_01_callback async::callbak return!!!") - console.log("FMS_fuzzTest_0300_param_01_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_0300_param_01_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_01_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_01_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_0300_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_01_promise releaseForm begin"); - - var formId = parameterValue(); - console.log("FMS_fuzzTest_0300_param_01_promise releaseForm formId typeof:"+ typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTest_0300_param_01_promise releaseForm isReleaseCache typeof:"+ typeof(isReleaseCache)); - - var retResult; - try{ - // formId: number>0 ok, isReleaseCache: boolean - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTest_0300_param_01_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_01_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_01_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_0300_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_02_callback releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTest_0300_param_02_callback releaseForm formId typeof:"+ - typeof(formId) + ",formId:" + formId); - - var isReleaseCache = parameterValue(); - console.log("FMS_fuzzTest_0300_param_02_callback releaseForm isReleaseCache typeof:"+ typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, // formId: number>0 ok - isReleaseCache, // isReleaseCache: boolean ok - (err,data) => { - console.log("FMS_fuzzTest_0300_param_02_callback async::callbak return!!!") - console.log("FMS_fuzzTest_0300_param_02_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_0300_param_02_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - - ); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_02_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_02_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_0300_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_02_promise releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTest_0300_param_02_promise releaseForm formId typeof:"+ - typeof(formId) + ",formId:" + formId); - - var isReleaseCache = parameterValue(); - console.log("FMS_fuzzTest_0300_param_02_promise releaseForm isReleaseCache typeof:"+ typeof(isReleaseCache)); - - var retResult; - try{ - // formId: number>0 ok, isReleaseCache: boolean - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTest_0300_param_02_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_02_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_02_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_0300_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_03_callback releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTest_0300_param_03_callback releaseForm formId typeof:"+ - typeof(formId) + ",formId:" + formId); - - try{ - formManager.releaseForm( - formId, // formId: number>0 ok - (err,data) => { - console.log("FMS_fuzzTest_0300_param_03_callback async::callbak return!!!") - console.log("FMS_fuzzTest_0300_param_03_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_0300_param_03_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - - ); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_03_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_03_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_0300_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_03_promise releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTest_0300_param_03_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_fuzzTest_0300_param_03_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_03_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_03_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_0300_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_04_callback releaseForm begin"); - - var formId = parameterValue(); - console.log("FMS_fuzzTest_0300_param_04_callback releaseForm formId typeof:"+ typeof(formId)); - - try{ - formManager.releaseForm( - formId, // formId: number>0 ok - (err,data) => { - console.log("FMS_fuzzTest_0300_param_04_callback async::callbak return!!!") - console.log("FMS_fuzzTest_0300_param_04_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_0300_param_04_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_04_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_04_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_04_callback==================end'); - }, TIMEOUT) -}) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ -it('FMS_fuzzTest_0300_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_04_promise releaseForm begin"); - - var formId = parameterValue(); - console.log("FMS_fuzzTest_0300_param_04_promise releaseForm formId typeof:"+ typeof(formId)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId)); // formId: number>0 ok - console.log("FMS_fuzzTest_0300_param_04_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_04_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_04_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_04_promise==================end'); - }, TIMEOUT) -}) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_1200_callback', 0, async function (done) { - console.log("FMS_fuzzTest_1200_callback getAllFormsInfo begin"); - - var testParam = parameterValue(); - console.log("FMS_fuzzTest_1200_callback getAllFormsInfo formIds typeof:"+ typeof(testParam)); - - try{ - formManager.getAllFormsInfo( - testParam, // formIds: array ok - (err,data) => { - console.log("FMS_fuzzTest_1200_callback async::callbak return!!!") - console.log("FMS_fuzzTest_1200_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_1200_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTest_1200_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1200_callback getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_1200_promise', 0, async function (done) { - console.log("FMS_fuzzTest_1200_promise getAllFormsInfo begin"); - - var testParam = parameterValue(); - console.log("FMS_fuzzTest_1200_promise getAllFormsInfo formIds typeof:"+ typeof(testParam)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); - console.log("FMS_fuzzTest_1200_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_1200_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1200_promise getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_1300_callback', 0, async function (done) { - console.log("FMS_fuzzTest_1300_callback getFormsInfoByApp begin"); - - var bundleName = parameterValue(); - console.log("FMS_fuzzTest_1300_callback getFormsInfoByApp bundleName typeof:"+ typeof(bundleName)); - - try{ - formManager.getFormsInfo( - bundleName, // bundleName string - (err,data) => { - console.log("FMS_fuzzTest_1300_callback async::callbak return!!!") - console.log("FMS_fuzzTest_1300_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_1300_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTest_1300_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1300_callback getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1300_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_1300_promise', 0, async function (done) { - console.log("FMS_fuzzTest_1300_promise getFormsInfoByApp begin"); - - var bundleName = parameterValue(); - console.log("FMS_fuzzTest_1300_promise getFormsInfoByApp bundleName typeof:"+ typeof(bundleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); - console.log("FMS_fuzzTest_1300_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_1300_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1300_promise getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1300_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_1400_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTest_1400_param_01_callback getFormsInfoByModule begin"); - - var bundleName = parameterValue(); - console.log("FMS_fuzzTest_1400_param_01_callback getFormsInfoByModule bundleName typeof:"+ typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTest_1400_param_01_callback getFormsInfoByModule moduleName typeof:"+ typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, // bundleName string - moduleName,// moduleName string - (err,data) => { - console.log("FMS_fuzzTest_1400_param_01_callback async::callbak return!!!") - console.log("FMS_fuzzTest_1400_param_01_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_1400_param_01_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTest_1400_param_01_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1400_param_01_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1400_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_1400_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTest_1400_param_01_promise getFormsInfoByModule begin"); - - var bundleName = parameterValue(); - console.log("FMS_fuzzTest_1400_param_01_promise getFormsInfoByModule bundleName typeof:"+ typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTest_1400_param_01_promise getFormsInfoByModule moduleName typeof:"+ typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTest_1400_param_01_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_1400_param_01_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1400_param_01_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1400_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_1400_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTest_1400_param_02_callback getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTest_1400_param_02_callback getFormsInfoByModule bundleName typeof:"+ typeof(bundleName)); - - var moduleName = parameterValue(); - console.log("FMS_fuzzTest_1400_param_02_callback getFormsInfoByModule moduleName typeof:"+ typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, // bundleName string - moduleName, // moduleName string - (err,data) => { - console.log("FMS_fuzzTest_1400_param_02_callback async::callbak return!!!") - console.log("FMS_fuzzTest_1400_param_02_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_1400_param_02_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTest_1400_param_02_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1400_param_02_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1400_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_1400_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTest_1400_param_02_promise getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTest_1400_param_02_promise getFormsInfoByModule bundleName typeof:"+ typeof(bundleName)); - - var moduleName = parameterValue(); - console.log("FMS_fuzzTest_1400_param_02_promise getFormsInfoByModule moduleName typeof:"+ typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTest_1400_param_02_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_1400_param_02_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1400_param_02_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1400_param_02_promise==================end'); - }, TIMEOUT) - }) - -}) diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestArray.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestArray.test.js new file mode 100644 index 0000000000000000000000000000000000000000..9670c1bf9effdce1858d8d17e811cab8d889f406 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestArray.test.js @@ -0,0 +1,1414 @@ +/* + * 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} from './getParam.js' + +const TIMEOUT = 5000; +describe('FMS_fuzzTestArray', function () { + console.log("FMS_fuzzTestArray===start"); + + /** + * @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::callbak return!!!") + console.log("FMS_fuzzTestArray_0200_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_01_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_02_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_03_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_04_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_05_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_06_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_07_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_08_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_09_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_1200_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_1300_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_01_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_02_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_03_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_04_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_05_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_06_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_07_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_08_callback async::sucess 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::sucess 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/FormFuzzTest/entry/src/main/js/test/FormFuzzTestBool.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestBool.test.js new file mode 100644 index 0000000000000000000000000000000000000000..879a0b7185b429ead756e4d7dac8654049adada8 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestBool.test.js @@ -0,0 +1,1414 @@ +/* + * 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} from './getParam.js' + +const TIMEOUT = 5000; +describe('formFuzzTest', function () { + console.log("formFuzzTest===start"); + + /** + * @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::callbak return!!!") + console.log("FMS_fuzzTestBool_0200_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_01_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_02_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_03_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_04_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_05_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_06_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_07_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_08_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_09_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_1200_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_1300_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_01_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_02_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_03_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_04_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_05_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_06_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_07_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_08_callback async::sucess 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::sucess 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/FormFuzzTest/entry/src/main/js/test/FormFuzzTestFunction.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestFunction.test.js new file mode 100644 index 0000000000000000000000000000000000000000..1cbfa2ee1e300f9fbcfa690ae4f4a55983f19657 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestFunction.test.js @@ -0,0 +1,1414 @@ +/* + * 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} from './getParam.js' + +const TIMEOUT = 5000; +describe('FMS_fuzzTestFunction', function () { + console.log("FMS_fuzzTestFunction===start"); + + /** + * @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::callbak return!!!") + console.log("FMS_fuzzTestFunction_0200_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_01_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_02_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_03_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_04_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_05_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_06_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_07_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_08_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_09_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_1200_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_1300_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_01_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_02_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_03_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_04_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_05_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_06_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_07_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_08_callback async::sucess 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::sucess 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/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNull.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNull.test.js new file mode 100644 index 0000000000000000000000000000000000000000..906ac7ade6cf1a8e7aef56fc89c2b0c8607d5a23 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNull.test.js @@ -0,0 +1,1414 @@ +/* + * 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} from './getParam.js' + +const TIMEOUT = 5000; +describe('FMS_fuzzTestNull', function () { + console.log("FMS_fuzzTestNull===start"); + + /** + * @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::callbak return!!!") + console.log("FMS_fuzzTestNull_0200_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_01_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_02_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_03_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_04_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_05_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_06_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_07_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_08_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_09_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_1200_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_1300_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_01_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_02_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_03_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_04_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_05_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_06_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_07_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_08_callback async::sucess 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::sucess 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/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNum.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNum.test.js new file mode 100644 index 0000000000000000000000000000000000000000..84517b79b8eff1a75ea16e334c7babdd2c82b1be --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNum.test.js @@ -0,0 +1,1414 @@ +/* + * 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} from './getParam.js' + +const TIMEOUT = 5000; +describe('FMS_fuzzTestNum', function () { + console.log("FMS_fuzzTestNum===start"); + + /** + * @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::callbak return!!!") + console.log("FMS_fuzzTestNum_0200_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_01_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_02_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_03_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_04_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_05_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_06_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_07_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_08_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_09_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_1200_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_1300_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_01_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_02_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_03_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_04_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_05_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_06_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_07_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_08_callback async::sucess 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::sucess 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/FormFuzzTest/entry/src/main/js/test/FormFuzzTestObject.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestObject.test.js new file mode 100644 index 0000000000000000000000000000000000000000..0e2fe6c5e5464edb5fff35707cee681bef18f47c --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestObject.test.js @@ -0,0 +1,1414 @@ +/* + * 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} from './getParam.js' + +const TIMEOUT = 5000; +describe('FMS_fuzzTestObject', function () { + console.log("FMS_fuzzTestObject===start"); + + /** + * @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::callbak return!!!") + console.log("FMS_fuzzTestObject_0200_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_01_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_02_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_03_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_04_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_05_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_06_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_07_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_08_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_09_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_1200_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_1300_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_01_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_02_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_03_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_04_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_05_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_06_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_07_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_08_callback async::sucess 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::sucess 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/FormFuzzTest/entry/src/main/js/test/FormFuzzTestString.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestString.test.js new file mode 100644 index 0000000000000000000000000000000000000000..164108a7a64703339d250bde724e58e266538186 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestString.test.js @@ -0,0 +1,1566 @@ +/* + * 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} from './getParam.js' + +const TIMEOUT = 5000; +describe('formFuzzTest', function () { + console.log("formFuzzTest===start"); + + /** + * @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::callbak return!!!") + console.log("FMS_fuzzTestString_0200_param_01_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_0200_param_02_callback async::sucess 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"); + done(); + 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_01_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_02_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_03_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_04_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_05_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_06_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_07_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_08_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_09_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_10_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_0300_param_10_callback async::error err:" + err); + expect(err).assertEqual(0); + done(); + } + ); + + console.log("FMS_fuzzTestString_0300_param_10_callback releaseForm end"); + done(); + 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); + 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', 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 = booleanTest(); + 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_011_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_011_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_0300_param_011_callback async::error err:" + err); + expect(err).assertEqual(0); + done(); + } + ); + + console.log("FMS_fuzzTestString_0300_param_011_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_011_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); + 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::callbak return!!!") + console.log("FMS_fuzzTestString_1200_callback async::sucess 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(0).assertEqual(0); + } + + 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::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_1200_promise Exception caught:" + e); + expect(0).assertEqual(0); + } + + 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::callbak return!!!") + console.log("FMS_fuzzTestString_1300_callback async::sucess 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(0).assertEqual(0); + } + + console.log("FMS_fuzzTestString_1300_callback getFormsInfoByApp end"); + done(); + 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)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); + console.log("FMS_fuzzTestString_1300_promise async::sucess retResult:" + retResult); + expect(retResult).assertEqual(0); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_1300_promise Exception caught:" + e); + expect(0).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::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_01_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_02_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_03_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_04_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_05_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_06_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_07_callback async::sucess 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::sucess 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::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_08_callback async::sucess 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::sucess 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/FormFuzzTest/entry/src/main/js/test/FormFuzzTestUndefined.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestUndefined.test.js new file mode 100644 index 0000000000000000000000000000000000000000..da62078b3e5d5a58d9347061abb4c40807709afd --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestUndefined.test.js @@ -0,0 +1,1414 @@ +/* + * 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} from './getParam.js' + +const TIMEOUT = 5000; +describe('FMS_fuzzTestUndefined', function () { + console.log("FMS_fuzzTestUndefined===start"); + + /** + * @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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0200_callback async::sucess 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::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_01_callback async::sucess 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)); // formId: number>0 ok, isReleaseCache: boolean + console.log("FMS_fuzzTestUndefined_0300_param_01_promise async::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_02_callback async::sucess 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)); // formId: number>0 ok, isReleaseCache: boolean + console.log("FMS_fuzzTestUndefined_0300_param_02_promise async::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_03_callback async::sucess 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)); // formId: number>0 ok, isReleaseCache: boolean + console.log("FMS_fuzzTestUndefined_0300_param_03_promise async::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_04_callback async::sucess 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)); // formId: number>0 ok, isReleaseCache: boolean + console.log("FMS_fuzzTestUndefined_0300_param_04_promise async::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_05_callback async::sucess 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)); // formId: number>0 ok, isReleaseCache: boolean + console.log("FMS_fuzzTestUndefined_0300_param_05_promise async::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_06_callback async::sucess 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)); // formId: number>0 ok, isReleaseCache: boolean + console.log("FMS_fuzzTestUndefined_0300_param_06_promise async::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_07_callback async::sucess 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)); // formId: number>0 ok, isReleaseCache: boolean + console.log("FMS_fuzzTestUndefined_0300_param_07_promise async::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_08_callback async::sucess 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)); // formId: number>0 ok, isReleaseCache: boolean + console.log("FMS_fuzzTestUndefined_0300_param_08_promise async::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_09_callback async::sucess 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::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1200_callback async::sucess 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::sucess 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 getFormsInfoByApp bundleName typeof:"+ typeof(bundleName)); + + try{ + formManager.getFormsInfo( + bundleName, + (err,data) => { + console.log("FMS_fuzzTestUndefined_1300_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1300_callback async::sucess 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::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_01_callback async::sucess 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::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_02_callback async::sucess 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::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_03_callback async::sucess 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::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_04_callback async::sucess 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::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_05_callback async::sucess 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::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_06_callback async::sucess 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::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_07_callback async::sucess 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::sucess 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::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_08_callback async::sucess 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::sucess 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) + }) +}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/List.test.js old mode 100755 new mode 100644 index ae0ba3f5175a63778a30fa9d3f6076cfe55bd8bf..182052736120a5dfaf18861e188b00c76b942975 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/List.test.js +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/List.test.js @@ -13,4 +13,11 @@ * limitations under the License. */ -require('./FormFuzzTest.test.js') \ No newline at end of file +require('./FormFuzzTestArray.test.js') +require('./FormFuzzTestBool.test.js') +require('./FormFuzzTestFunction.test.js') +require('./FormFuzzTestNull.test.js') +require('./FormFuzzTestNum.test.js') +require('./FormFuzzTestObject.test.js') +require('./FormFuzzTestString.test.js') +require('./FormFuzzTestUndefined.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/getParam.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/getParam.js old mode 100755 new mode 100644 index 69e4f8396b7f802361a5199e37a6a07a2933492f..b64f4c502e21cd437cc1fd934b45accfc125d089 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/getParam.js +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/getParam.js @@ -67,26 +67,31 @@ const stringTest = function() { 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() { - return getIntegerRandom(RANDOM_BEGIN_POSITION, BOOLEAN_RANDOM_LENGTH); + console.log("The booleanTest of this fuzzTest random" ); + return Boolean(getIntegerRandom(RANDOM_BEGIN_POSITION, BOOLEAN_RANDOM_LENGTH)); } -// null +// return null const nullTest = function() { + console.log("The nullTest of this fuzzTest random" ); return null; } -// undefinedTest +// return undefinedTest const undefinedTest = function() { + console.log("The undefinedTest of this fuzzTest random" ); return undefined; } @@ -114,14 +119,17 @@ const arrayTest = function() { 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 = Object.create(null); - var objectB = Object.create("objectTest"); + 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; } @@ -130,67 +138,10 @@ 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; } -// get parameter value from: string, number, bool, null, undefined, object, array, function -const parameterValue = function() { - - var fuzzConfigData = [ - {"name":"string", "paramWeight":25},{"name":"number", "paramWeight":45},{"name":"boolean", "paramWeight":50}, - {"name":"null", "paramWeight":52},{"name":"undefined", "paramWeight":54},{"name":"object", "paramWeight":62}, - {"name":"array", "paramWeight":92},{"name":"function", "paramWeight":100}, - ] - - var weightSum = fuzzConfigData[fuzzConfigData.length - 1].paramWeight; - console.log("The weight sum of this fuzzTest:" + weightSum); - - var paramValue = ''; - var iNumber = getIntegerRandom(RANDOM_BEGIN_POSITION, weightSum); - console.log("The iNumber of this fuzzTest random:" + iNumber); - - for(var iFuzzDataNumber = 0; iFuzzDataNumber < fuzzConfigData.length; iFuzzDataNumber ++) { - - if((iFuzzDataNumber == 0 && iNumber < fuzzConfigData[iFuzzDataNumber].paramWeight) || - (iNumber < fuzzConfigData[iFuzzDataNumber].paramWeight && - iNumber > fuzzConfigData[iFuzzDataNumber - 1].paramWeight) ) { - console.log("The name of this fuzzTest random:" + fuzzConfigData[iFuzzDataNumber].name); - switch(fuzzConfigData[iFuzzDataNumber].name) { - case "string": - paramValue = stringTest(); - break; - case "number": - paramValue = numberTest(); - break; - case "boolean": - paramValue = booleanTest(); - break; - case "null": - paramValue = nullTest(); - break; - case "undefined": - paramValue = undefinedTest(); - break; - case "object": - paramValue = objectTest(); - break; - case "array": - paramValue = arrayTest(); - break; - case "function": - paramValue = functionTest(); - break; - default: - paramValue = ''; - break; - } - } - } - - console.log("The paramValue of this fuzzTest random:" + paramValue); - return paramValue; -} - export { - parameterValue, stringTest, numberTest, booleanTest, nullTest, undefinedTest, objectTest, arrayTest, functionTest + stringTest, numberTest, booleanTest, nullTest, undefinedTest, objectTest, arrayTest, functionTest } \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/BUILD.gn similarity index 93% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/BUILD.gn rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/BUILD.gn index ac4cced06c7b5f7df9c62f464b3af330e24285d7..e17ccc9a1a4267e40e3e84d52758caeb39634409 100644 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/BUILD.gn +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/BUILD.gn @@ -13,14 +13,14 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("GetAllFormsInfo") { +ohos_js_hap_suite("GetAllFormsInfo10") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", ":hjs_demo_resources", ] certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "GetAllFormsInfo" + hap_name = "GetAllFormsInfo10" } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/js/default" diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/Test.json new file mode 100644 index 0000000000000000000000000000000000000000..71dbba6d6c214707612f5a7322ff98af48ff9f5f --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/Test.json @@ -0,0 +1,38 @@ +{ + "description": "Configuration for hjunit demo Tests", + "driver": { + "type": "JSUnitTest", + "test-timeout": "60000", + "package": "com.example.getallformsinfo10", + "shell-timeout": "60000" + }, + "kits": [ + { + "test-file-name": [ + "GetAllFormsInfo10.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + }, + { + "type": "ShellKit", + "run-command": [ + "remount", + "mkdir /system/vendor" + ] + }, + { + "type": "PushKit", + "push": [ + "GetAllFormsInfo10.hap->/data/GetAllFormsInfo10.hap" + ] + + }, + { + "type": "ShellKit", + "run-command": [ + "chmod 644 /system/vendor/*.hap" + ] + } + ] +} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..c55339fa42a8f33a0951fc4eaf51404d24239472 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/config.json @@ -0,0 +1,63 @@ +{ + "app": { + "bundleName": "com.example.getallformsinfo10", + "vendor": "example", + "version": { + "code": 1, + "name": "1.0" + }, + "apiVersion": { + "compatible": 5, + "target": 5, + "releaseType": "Beta1" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.example.getallformsinfo10", + "name": ".MyApplication", + "mainAbility": "com.example.getallformsinfo10.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.getallformsinfo10.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + } + ], + "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/getallformsinfo/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/app.js similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/app.js rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/app.js diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/i18n/en-US.json similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/i18n/en-US.json rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/i18n/en-US.json diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/i18n/zh-CN.json rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/i18n/zh-CN.json diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/pages/index/index.css similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.css rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/pages/index/index.css diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/pages/index/index.hml similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.hml rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/pages/index/index.hml diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/pages/index/index.js similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.js rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/pages/index/index.js diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/test/GetAllFormsInfo10Jsunit.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/test/GetAllFormsInfo10Jsunit.test.js new file mode 100644 index 0000000000000000000000000000000000000000..3ad6411abc6ddfd0f4a08861b05c0a570e925d79 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/test/GetAllFormsInfo10Jsunit.test.js @@ -0,0 +1,70 @@ +/* + * 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, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' + +const TIMEOUT = 3000; +describe('getAllFormsInfoTest', function () { + console.log("system application and has permissions Test"); + + /** + * @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) => { + console.log("FMS_getFormsInfo_0300_callback async::sucess, data json:" + + JSON.stringify(data)); + console.log("FMS_getFormsInfo_0300_callback async::result, result:" + result); + expect(result).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 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) + }) + +}) diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/test/List.test.js similarity index 93% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/test/List.test.js rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/test/List.test.js index 439e7f920efce3a5ad2d365d85045cdc0ac8cc02..0bf02e9ef3590c596c20b20e3b1e4bb530751673 100644 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/test/List.test.js +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/test/List.test.js @@ -13,4 +13,4 @@ * limitations under the License. */ -require('./GetAllFormsInfoJsunit.test.js') \ No newline at end of file +require('./GetAllFormsInfo10Jsunit.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..a8c86be4485c29333ca2222093de261bca558568 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "GetAllFormsInfo10" + }, + { + "name": "mainability_description", + "value": "JS_Empty Ability" + } + ] +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/resources/base/media/icon.png similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/resources/base/media/icon.png rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/resources/base/media/icon.png diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/signature/openharmony_sx.p7b similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/signature/openharmony_sx.p7b rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/signature/openharmony_sx.p7b diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..98b371b18c214af7581767ea2c5622596519224f --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/BUILD.gn @@ -0,0 +1,31 @@ +# 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("GetAllFormsInfo201") { + hap_profile = "./entry/src/main/config.json" + deps = [ + ":hjs_demo_js_assets", + ":hjs_demo_resources", + ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "GetAllFormsInfo201" +} +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/getallformsinfo201/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/Test.json new file mode 100644 index 0000000000000000000000000000000000000000..5ec5cdd14f1284b0dc23943361ac05e186fb339d --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/Test.json @@ -0,0 +1,38 @@ +{ + "description": "Configuration for hjunit demo Tests", + "driver": { + "type": "JSUnitTest", + "test-timeout": "60000", + "package": "com.example.getallformsinfo201", + "shell-timeout": "60000" + }, + "kits": [ + { + "test-file-name": [ + "GetAllFormsInfo201.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + }, + { + "type": "ShellKit", + "run-command": [ + "remount", + "mkdir /system/vendor" + ] + }, + { + "type": "PushKit", + "push": [ + "GetAllFormsInfo201.hap->/data/GetAllFormsInfo201.hap" + ] + + }, + { + "type": "ShellKit", + "run-command": [ + "chmod 644 /system/vendor/*.hap" + ] + } + ] +} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..833d96877b8208b9a892524a5fe4eac28aabeb9e --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/config.json @@ -0,0 +1,63 @@ +{ + "app": { + "bundleName": "com.example.getallformsinfo201", + "vendor": "example", + "version": { + "code": 1, + "name": "1.0" + }, + "apiVersion": { + "compatible": 5, + "target": 5, + "releaseType": "Beta1" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.example.getallformsinfo201", + "name": ".MyApplication", + "mainAbility": "com.example.getallformsinfo201.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.getallformsinfo201.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + } + ], + "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/getallformsinfo201/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/app.js new file mode 100644 index 0000000000000000000000000000000000000000..e423f4bce4698ec1d7dc86c3eea3990a5e7b1085 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/app.js @@ -0,0 +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'); + } +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/i18n/en-US.json similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/i18n/en-US.json rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/i18n/en-US.json diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/i18n/zh-CN.json rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/i18n/zh-CN.json diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.css new file mode 100644 index 0000000000000000000000000000000000000000..0a66102a6f5e70198f774f5fbf658e36c25cc235 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.css @@ -0,0 +1,44 @@ +.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/formmodule001/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.hml similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/pages/index/index.hml rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.hml diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e4832498bfe3f34bb29573e181ce1b298fb7f617 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.js @@ -0,0 +1,51 @@ +/* + * 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/getallformsinfo201/entry/src/main/js/test/GetAllFormsInfo201Jsunit.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/test/GetAllFormsInfo201Jsunit.test.js new file mode 100644 index 0000000000000000000000000000000000000000..a0eea8c99d428fa69b3068461cf594c6c792e28b --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/test/GetAllFormsInfo201Jsunit.test.js @@ -0,0 +1,103 @@ +/* + * 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, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' + +const TIMEOUT = 3000; +describe('getAllFormsInfoTest', function () { + console.log("system application and has permissions Test"); + + /** + * @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 async::sucess, data json:" + + JSON.stringify(data)); + console.log("FMS_getFormsInfo_0400_callback async::result, result:" + result); + expect(result).assertEqual(1); + + expect(data[0].description).assertEqual("form_description"); + expect(data[0].type).assertEqual(1); + expect(data[0].colorMode).assertEqual(-1); + expect(data[0].jsComponentName).assertEqual("card"); + expect(data[0].isDefault).assertEqual(1); + expect(data[0].updateEnabled).assertEqual(1); + expect(data[0].updateDuration).assertEqual(1); + expect(data[0].scheduledUpdateTime).assertEqual("10:30"); + expect(data[0].formVisibleNotify).assertEqual(1); + expect(data[0].defaultDimension).assertEqual(1); + expect(data[0].supportDimensions[0]).assertEqual(1); + expect(data[0].supportDimensions[1]).assertEqual(2); + expect(data[0].metaData.customizeData[0].name).assertEqual("originWidgetName"); + expect(data[0].metaData.customizeData[0].value).assertEqual("myTest"); + + expect(data[0].name).assertEqual("FormB_Js001"); + 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--------111"); + + var promise = formManager.getAllFormsInfo(); + promise.then((data) => { + console.log("FMS_getFormsInfo_0400_promise async::sucess, data json:" + JSON.stringify(data)); + + expect(data[0].description).assertEqual("form_description"); + expect(data[0].type).assertEqual(1); + expect(data[0].colorMode).assertEqual(-1); + expect(data[0].jsComponentName).assertEqual("card"); + expect(data[0].isDefault).assertEqual(1); + expect(data[0].updateEnabled).assertEqual(1); + expect(data[0].updateDuration).assertEqual(1); + expect(data[0].scheduledUpdateTime).assertEqual("10:30"); + expect(data[0].formVisibleNotify).assertEqual(1); + expect(data[0].defaultDimension).assertEqual(1); + expect(data[0].supportDimensions[0]).assertEqual(1); + expect(data[0].supportDimensions[1]).assertEqual(2); + expect(data[0].metaData.customizeData[0].name).assertEqual("originWidgetName"); + expect(data[0].metaData.customizeData[0].value).assertEqual("myTest"); + + expect(data[0].name).assertEqual("FormB_Js001"); + 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/getallformsinfo201/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/test/List.test.js new file mode 100644 index 0000000000000000000000000000000000000000..995113fd45988ecdeb156700f703a2c048121472 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/test/List.test.js @@ -0,0 +1,16 @@ +/* + * 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('./GetAllFormsInfo201Jsunit.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..5627ae9763c36bcd7a1d0de5660d9ae8004e54ed --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "GetAllFormsInfo201" + }, + { + "name": "mainability_description", + "value": "JS_Empty Ability" + } + ] +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/resources/base/media/icon.png similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/resources/base/media/icon.png rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/resources/base/media/icon.png diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/signature/openharmony_sx.p7b differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..a28e366b3de9c133294195a2fb8f8d59e6076748 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/BUILD.gn @@ -0,0 +1,31 @@ +# 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("GetAllFormsInfo211") { + hap_profile = "./entry/src/main/config.json" + deps = [ + ":hjs_demo_js_assets", + ":hjs_demo_resources", + ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "GetAllFormsInfo211" +} +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/getallformsinfo211/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/Test.json new file mode 100644 index 0000000000000000000000000000000000000000..7e578c36e0dffb1396fa7b65f510917771385058 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/Test.json @@ -0,0 +1,38 @@ +{ + "description": "Configuration for hjunit demo Tests", + "driver": { + "type": "JSUnitTest", + "test-timeout": "60000", + "package": "com.example.getallformsinfo211", + "shell-timeout": "60000" + }, + "kits": [ + { + "test-file-name": [ + "GetAllFormsInfo211.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + }, + { + "type": "ShellKit", + "run-command": [ + "remount", + "mkdir /system/vendor" + ] + }, + { + "type": "PushKit", + "push": [ + "GetAllFormsInfo211.hap->/data/GetAllFormsInfo211.hap" + ] + + }, + { + "type": "ShellKit", + "run-command": [ + "chmod 644 /system/vendor/*.hap" + ] + } + ] +} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..70c190cc56d9a8f453a01d4f0244a95b53844321 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/config.json @@ -0,0 +1,63 @@ +{ + "app": { + "bundleName": "com.example.getallformsinfo211", + "vendor": "example", + "version": { + "code": 1, + "name": "1.0" + }, + "apiVersion": { + "compatible": 5, + "target": 5, + "releaseType": "Beta1" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.example.getallformsinfo211", + "name": ".MyApplication", + "mainAbility": "com.example.getallformsinfo211.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.getallformsinfo211.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + } + ], + "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/getallformsinfo211/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/app.js new file mode 100644 index 0000000000000000000000000000000000000000..e423f4bce4698ec1d7dc86c3eea3990a5e7b1085 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/app.js @@ -0,0 +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'); + } +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/i18n/en-US.json new file mode 100644 index 0000000000000000000000000000000000000000..e63c70d978a3a53be988388c87182f81785e170c --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/i18n/en-US.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "Hello", + "world": "World" + } +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/i18n/zh-CN.json new file mode 100644 index 0000000000000000000000000000000000000000..de6ee5748322f44942c1b003319d8e66c837675f --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/i18n/zh-CN.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "您好", + "world": "世界" + } +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.css new file mode 100644 index 0000000000000000000000000000000000000000..0a66102a6f5e70198f774f5fbf658e36c25cc235 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.css @@ -0,0 +1,44 @@ +.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/getallformsinfo211/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..f64b040a5ae394dbaa5e185e1ecd4f4556b92184 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.hml @@ -0,0 +1,5 @@ +
+ + {{ $t('strings.hello') }} {{ title }} + +
diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e4832498bfe3f34bb29573e181ce1b298fb7f617 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.js @@ -0,0 +1,51 @@ +/* + * 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/getallformsinfo211/entry/src/main/js/test/GetAllFormsInfo211Jsunit.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/test/GetAllFormsInfo211Jsunit.test.js new file mode 100644 index 0000000000000000000000000000000000000000..e5be70a3f28265b92ba9d0dcc151d9d422872e64 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/test/GetAllFormsInfo211Jsunit.test.js @@ -0,0 +1,109 @@ +/* + * 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, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' + +const TIMEOUT = 3000; +describe('getAllFormsInfoTest', function () { + console.log("system application and has permissions Test"); + + /** + * @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 async::sucess, data json:" + + JSON.stringify(data)); + console.log("FMS_getFormsInfo_0500_callback async::result, result:" + result); + expect(result).assertEqual(1); + + for(var i = 0; i < data.length; i++) { + 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("FormB_Js001"); + expect(data[1].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--------111"); + + var promise = formManager.getAllFormsInfo(); + promise.then((data) => { + console.log("FMS_getFormsInfo_0500_promise async::sucess, data json:" + JSON.stringify(data)); + + for(var i = 0; i < data.length; i++) { + 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("FormB_Js001"); + expect(data[1].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/getallformsinfo211/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/test/List.test.js new file mode 100644 index 0000000000000000000000000000000000000000..198e15ff01c238bb688c2642f03ff521e0335530 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/test/List.test.js @@ -0,0 +1,16 @@ +/* + * 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('./GetAllFormsInfo211Jsunit.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..d555768dc99181b1f4fbd744ecc0e058c36319f1 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "GetAllFormsInfo211" + }, + { + "name": "mainability_description", + "value": "JS_Empty Ability" + } + ] +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/resources/base/media/icon.png differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/signature/openharmony_sx.p7b differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..5e9f6a25dbba488dd9c3c97f1d3d974b0d25022a --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/BUILD.gn @@ -0,0 +1,31 @@ +# 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("GetAllFormsInfo212") { + hap_profile = "./entry/src/main/config.json" + deps = [ + ":hjs_demo_js_assets", + ":hjs_demo_resources", + ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "GetAllFormsInfo212" +} +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/getallformsinfo/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/Test.json similarity index 83% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/Test.json rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/Test.json index 2f2278f6fa499ab3c66cddb7e7b54fb28e0a20e0..f06b852ae9bd94dcce5f2566efe401ab9c8873d0 100644 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/Test.json +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/Test.json @@ -2,14 +2,14 @@ "description": "Configuration for hjunit demo Tests", "driver": { "type": "JSUnitTest", - "test-timeout": "240000", + "test-timeout": "120000", "package": "com.example.getallformsinfo", "shell-timeout": "60000" }, "kits": [ { "test-file-name": [ - "GetAllFormsInfo.hap" + "GetAllFormsInfo212.hap" ], "type": "AppInstallKit", "cleanup-apps": true @@ -24,7 +24,7 @@ { "type": "PushKit", "push": [ - "GetAllFormsInfo.hap->/data/GetAllFormsInfo.hap" + "GetAllFormsInfo212.hap->/data/GetAllFormsInfo212.hap" ] }, diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/config.json similarity index 62% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/config.json rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/config.json index 0ea4476b31fe7e5a4f8f85edfc0a50194559fbe8..65294c6726c0d9500410aa2ba61293743497477a 100644 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/config.json +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/config.json @@ -47,33 +47,6 @@ "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" - } - } - ], "js": [ { "pages": [ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/app.js new file mode 100644 index 0000000000000000000000000000000000000000..e423f4bce4698ec1d7dc86c3eea3990a5e7b1085 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/app.js @@ -0,0 +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'); + } +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/i18n/en-US.json new file mode 100644 index 0000000000000000000000000000000000000000..e63c70d978a3a53be988388c87182f81785e170c --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/i18n/en-US.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "Hello", + "world": "World" + } +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/i18n/zh-CN.json new file mode 100644 index 0000000000000000000000000000000000000000..de6ee5748322f44942c1b003319d8e66c837675f --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/i18n/zh-CN.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "您好", + "world": "世界" + } +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/pages/index/index.css new file mode 100644 index 0000000000000000000000000000000000000000..0a66102a6f5e70198f774f5fbf658e36c25cc235 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/pages/index/index.css @@ -0,0 +1,44 @@ +.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/getallformsinfo212/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/pages/index/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..f64b040a5ae394dbaa5e185e1ecd4f4556b92184 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/pages/index/index.hml @@ -0,0 +1,5 @@ +
+ + {{ $t('strings.hello') }} {{ title }} + +
diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/pages/index/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e4832498bfe3f34bb29573e181ce1b298fb7f617 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/pages/index/index.js @@ -0,0 +1,51 @@ +/* + * 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/getallformsinfo/entry/src/main/js/test/GetAllFormsInfoJsunit.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/test/GetAllFormsInfo212Jsunit.test.js similarity index 77% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/test/GetAllFormsInfoJsunit.test.js rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/test/GetAllFormsInfo212Jsunit.test.js index 671823092360db1791209951872fa904742966e8..0f25595b3c9205739a1b5481a87b89ef50dd37d2 100644 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/test/GetAllFormsInfoJsunit.test.js +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/test/GetAllFormsInfo212Jsunit.test.js @@ -16,33 +16,35 @@ import formManager from '@ohos.ability.formManager' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' -const TIMEOUT = 1000; +const TIMEOUT = 5000; describe('getAllFormsInfoTest', function () { console.log("system application and has permissions Test"); /** * @tc.name getAllFormsInfo test - * @tc.number FMS_getFormsInfo_0300 + * @tc.number FMS_getFormsInfo_0600 * @tc.desc All form configuration information is queried successfully (by AsyncCallback) */ - it('FMS_getFormsInfo_0300_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_0300_callback begin"); + 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_0300_callback async::sucess, data json:" + console.log("FMS_getFormsInfo_0600_callback async::sucess, data json:" + JSON.stringify(data)); - console.log("FMS_getFormsInfo_0300_callback async::result, result:" + result); + console.log("FMS_getFormsInfo_0600_callback async::result, result:" + result); expect(result).assertEqual(1); 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].jsComponentName).assertEqual("card"); 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); @@ -51,41 +53,41 @@ describe('getAllFormsInfoTest', function () { expect(data[i].metaData.customizeData[0].value).assertEqual("myTest"); } - expect(data[0].scheduledUpdateTime).assertEqual("10:30"); - expect(data[0].name).assertEqual("Form_Js001"); - expect(data[1].name).assertEqual("Form_Js002"); - expect(data[0].updateDuration).assertEqual(0); - expect(data[1].updateDuration).assertEqual(1); - console.log("FMS_getFormsInfo_0300_callback result end"); + expect(data[0].name).assertEqual("FormA_Js001"); + expect(data[1].name).assertEqual("FormA_Js002"); + expect(data[2].name).assertEqual("FormB_Js001"); + console.log("FMS_getFormsInfo_0600_callback result end"); done(); } ); setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0300_callback==================end'); + console.info('=====================FMS_getFormsInfo_0600_callback==================end'); }, TIMEOUT) - console.log("FMS_getFormsInfo_0300_callback end, ret:"+ret); + console.log("FMS_getFormsInfo_0600_callback end, ret:"+ret); }) /** * @tc.name getAllFormsInfo test - * @tc.number FMS_getFormsInfo_0300 + * @tc.number FMS_getFormsInfo_0600 * @tc.desc All form configuration information is queried successfully (by Promise) */ - it('FMS_getFormsInfo_0300_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_0300_promise begin"); + 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_0300_promise async::sucess, data json:" + JSON.stringify(data)); + console.log("FMS_getFormsInfo_0600_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].jsComponentName).assertEqual("card"); 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); @@ -93,147 +95,147 @@ describe('getAllFormsInfoTest', function () { expect(data[i].metaData.customizeData[0].name).assertEqual("originWidgetName"); expect(data[i].metaData.customizeData[0].value).assertEqual("myTest"); } - - expect(data[0].scheduledUpdateTime).assertEqual("10:30"); - expect(data[0].name).assertEqual("Form_Js001"); - expect(data[1].name).assertEqual("Form_Js002"); - expect(data[0].updateDuration).assertEqual(0); - expect(data[1].updateDuration).assertEqual(1); - console.log("FMS_getFormsInfo_0300_promise result end"); + + expect(data[0].name).assertEqual("FormA_Js001"); + expect(data[1].name).assertEqual("FormA_Js002"); + expect(data[2].name).assertEqual("FormB_Js001"); + console.log("FMS_getFormsInfo_0600_promise result end"); done(); } ); setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0300_promise==================end'); + console.info('=====================FMS_getFormsInfo_0600_promise==================end'); }, TIMEOUT) }) /** * @tc.name bundleName is null test - * @tc.number FMS_getFormsInfo_0600 + * @tc.number FMS_getFormsInfo_0900 * @tc.desc When the bundleName is null, the form configuration information query fails * (by AsyncCallback) */ - it('FMS_getFormsInfo_0600_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_0600_callback begin"); + 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_0600_callback getFormsInfo async::sucess, data json:" + console.log("FMS_getFormsInfo_0900_callback getFormsInfo async::sucess, data json:" + JSON.stringify(data)); - console.log("FMS_getFormsInfo_0600_callback async::result, result:" + result); + console.log("FMS_getFormsInfo_0900_callback async::result, result:" + result); expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_0600_callback result end"); + console.log("FMS_getFormsInfo_0900_callback result end"); done(); } ); setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0600_callback==================end'); + console.info('=====================FMS_getFormsInfo_0900_callback==================end'); }, TIMEOUT) - console.log("FMS_getFormsInfo_0600_callback end, ret:"+ret); + console.log("FMS_getFormsInfo_0900_callback end, ret:"+ret); }) /** * @tc.name bundleName is null test - * @tc.number FMS_getFormsInfo_0600 + * @tc.number FMS_getFormsInfo_0900 * @tc.desc When the bundleName is null, the form configuration information query fails (by Promise) */ - it('FMS_getFormsInfo_0600_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_0600_promise begin"); + 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_0600_promise result:" + result); + console.log("FMS_getFormsInfo_0900_promise result:" + result); expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_0600_promise result end"); + console.log("FMS_getFormsInfo_0900_promise result end"); done(); } ); setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0600_promise==================end'); + console.info('=====================FMS_getFormsInfo_0900_promise==================end'); }, TIMEOUT) }) /** * @tc.name bundleName isn't exist test - * @tc.number FMS_getFormsInfo_0700 + * @tc.number FMS_getFormsInfo_1000 * @tc.desc When the bundleName isn't exist, the form configuration information query fails * (by AsyncCallback). */ - it('FMS_getFormsInfo_0700_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_0700_callback begin"); + 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_0700_callback getFormsInfo async::sucess, data json:" + console.log("FMS_getFormsInfo_1000_callback getFormsInfo async::sucess, data json:" + JSON.stringify(data)); - console.log("FMS_getFormsInfo_0700_callback async::result, result:" + result); + console.log("FMS_getFormsInfo_1000_callback async::result, result:" + result); expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_0700_callback result end"); + console.log("FMS_getFormsInfo_1000_callback result end"); done(); } ); setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0700_callback==================end'); + console.info('=====================FMS_getFormsInfo_1000_callback==================end'); }, TIMEOUT) - console.log("FMS_getFormsInfo_0700_callback end, ret:"+ret); + console.log("FMS_getFormsInfo_1000_callback end, ret:"+ret); }) /** * @tc.name bundleName isn't exist test - * @tc.number FMS_getFormsInfo_0700 + * @tc.number FMS_getFormsInfo_1000 * @tc.desc When the bundleName isn't exist, the form configuration information query fails (by Promise) */ - it('FMS_getFormsInfo_0700_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_0700_promise begin"); + 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_0700_promise result:" + result); + console.log("FMS_getFormsInfo_1000_promise result:" + result); expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_0700_promise result end"); + console.log("FMS_getFormsInfo_1000_promise result end"); done(); } ); setTimeout(function () { - console.info('=====================FMS_getFormsInfo_0700_promise==================end'); + console.info('=====================FMS_getFormsInfo_1000_promise==================end'); }, TIMEOUT) }) /** * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_0800 + * @tc.number FMS_getFormsInfo_1100 * @tc.desc When the bundleName exist, the form configuration information is queried successfully * (by AsyncCallback) */ - it('FMS_getFormsInfo_0800_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_0800_callback begin"); + 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_0800_callback getFormsInfo async::sucess, data json:" + console.log("FMS_getFormsInfo_1100_callback getFormsInfo async::sucess, data json:" + JSON.stringify(data)); - console.log("FMS_getFormsInfo_0800_callback async::result, result:" + result); + 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].jsComponentName).assertEqual("card"); 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); @@ -241,45 +243,44 @@ describe('getAllFormsInfoTest', function () { expect(data[i].metaData.customizeData[0].name).assertEqual("originWidgetName"); expect(data[i].metaData.customizeData[0].value).assertEqual("myTest"); } - - expect(data[0].scheduledUpdateTime).assertEqual("10:30"); - expect(data[0].name).assertEqual("Form_Js001"); - expect(data[1].name).assertEqual("Form_Js002"); - expect(data[0].updateDuration).assertEqual(0); - expect(data[1].updateDuration).assertEqual(1); - console.log("FMS_getFormsInfo_0800_callback result end"); + + 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_0800_callback==================end'); + console.info('=====================FMS_getFormsInfo_1100_callback==================end'); }, TIMEOUT) - console.log("FMS_getFormsInfo_0800_callback end, ret:"+ret); + console.log("FMS_getFormsInfo_1100_callback end, ret:"+ret); }) /** * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_0800 + * @tc.number FMS_getFormsInfo_1100 * @tc.desc When the bundleName exist, the form configuration information is queried successfully * (by Promise) */ - it('FMS_getFormsInfo_0800_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_0800_promise begin"); + 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_0300_promise async::sucess, data json:" + JSON.stringify(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].jsComponentName).assertEqual("card"); 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); @@ -287,262 +288,261 @@ describe('getAllFormsInfoTest', function () { expect(data[i].metaData.customizeData[0].name).assertEqual("originWidgetName"); expect(data[i].metaData.customizeData[0].value).assertEqual("myTest"); } - - expect(data[0].scheduledUpdateTime).assertEqual("10:30"); - expect(data[0].name).assertEqual("Form_Js001"); - expect(data[1].name).assertEqual("Form_Js002"); - expect(data[0].updateDuration).assertEqual(0); - expect(data[1].updateDuration).assertEqual(1); - console.log("FMS_getFormsInfo_0800_promise result end"); + + 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_0800_promise==================end'); + console.info('=====================FMS_getFormsInfo_1100_promise==================end'); }, TIMEOUT) }) /** * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1100 + * @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_1100_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_1100_callback begin"); + 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_1100_callback getFormsInfo async::sucess, data json:" + console.log("FMS_getFormsInfo_1400_callback getFormsInfo async::sucess, data json:" + JSON.stringify(data)); - console.log("FMS_getFormsInfo_1100_callback async::result, result:" + result); + console.log("FMS_getFormsInfo_1400_callback async::result, result:" + result); expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1100_callback result end"); + console.log("FMS_getFormsInfo_1400_callback result end"); done(); } ); setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1100_callback==================end'); + console.info('=====================FMS_getFormsInfo_1400_callback==================end'); }, TIMEOUT) - console.log("FMS_getFormsInfo_1100_callback end, ret:"+ret); + console.log("FMS_getFormsInfo_1400_callback end, ret:"+ret); }) /** * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1100 + * @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_1100_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_1100_promise begin"); + 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_1100_promise result:" + result); + console.log("FMS_getFormsInfo_1400_promise result:" + result); expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1100_promise result end"); + console.log("FMS_getFormsInfo_1400_promise result end"); done(); } ); setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1100_promise==================end'); + console.info('=====================FMS_getFormsInfo_1400_promise==================end'); }, TIMEOUT) }) /** * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1200 + * @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_1200_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_1200_callback begin"); + 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_1200_callback getFormsInfo async::sucess, data json:" + console.log("FMS_getFormsInfo_1500_callback getFormsInfo async::sucess, data json:" + JSON.stringify(data)); - console.log("FMS_getFormsInfo_1200_callback async::result, result:" + result); + console.log("FMS_getFormsInfo_1500_callback async::result, result:" + result); expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1200_callback result end"); + console.log("FMS_getFormsInfo_1500_callback result end"); done(); } ); setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1200_callback==================end'); + console.info('=====================FMS_getFormsInfo_1500_callback==================end'); }, TIMEOUT) - console.log("FMS_getFormsInfo_1200_callback end, ret:"+ret); + console.log("FMS_getFormsInfo_1500_callback end, ret:"+ret); }) /** * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1200 + * @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_1200_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_1200_promise begin"); + 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_1200_promise result:" + result); + console.log("FMS_getFormsInfo_1500_promise result:" + result); expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1200_promise result end"); + console.log("FMS_getFormsInfo_1500_promise result end"); done(); } ); setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1200_promise==================end'); + console.info('=====================FMS_getFormsInfo_1500_promise==================end'); }, TIMEOUT) }) /** * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1300 + * @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_1300_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_1300_callback begin"); + 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_1300_callback getFormsInfo async::sucess, data json:" + console.log("FMS_getFormsInfo_1600_callback getFormsInfo async::sucess, data json:" + JSON.stringify(data)); - console.log("FMS_getFormsInfo_1300_callback async::result, result:" + result); + console.log("FMS_getFormsInfo_1600_callback async::result, result:" + result); expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1300_callback result end"); + console.log("FMS_getFormsInfo_1600_callback result end"); done(); } ); setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1300_callback==================end'); + console.info('=====================FMS_getFormsInfo_1600_callback==================end'); }, TIMEOUT) - console.log("FMS_getFormsInfo_1300_callback end, ret:"+ret); + console.log("FMS_getFormsInfo_1600_callback end, ret:"+ret); }) /** * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1300 + * @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_1300_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_1300_promise begin"); + 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_1300_promise result:" + result); + console.log("FMS_getFormsInfo_1600_promise result:" + result); expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1300_promise result end"); + console.log("FMS_getFormsInfo_1600_promise result end"); done(); } ); setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1300_promise==================end'); + console.info('=====================FMS_getFormsInfo_1600_promise==================end'); }, TIMEOUT) }) /** * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1400 + * @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_1400_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_1400_callback begin"); + 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_1400_callback getFormsInfo async::sucess, data json:" + console.log("FMS_getFormsInfo_1700_callback getFormsInfo async::sucess, data json:" + JSON.stringify(data)); - console.log("FMS_getFormsInfo_1400_callback async::result, result:" + result); + console.log("FMS_getFormsInfo_1700_callback async::result, result:" + result); expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1400_callback result end"); + console.log("FMS_getFormsInfo_1700_callback result end"); done(); } ); setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1400_callback==================end'); + console.info('=====================FMS_getFormsInfo_1700_callback==================end'); }, TIMEOUT) - console.log("FMS_getFormsInfo_1400_callback end, ret:"+ret); + console.log("FMS_getFormsInfo_1700_callback end, ret:"+ret); }) /** * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1400 + * @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_1400_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_1400_promise begin"); + 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_1400_promise result:" + result); + console.log("FMS_getFormsInfo_1700_promise result:" + result); expect(result).assertEqual(0); - console.log("FMS_getFormsInfo_1400_promise result end"); + console.log("FMS_getFormsInfo_1700_promise result end"); done(); } ); setTimeout(function () { - console.info('=====================FMS_getFormsInfo_1400_promise==================end'); + console.info('=====================FMS_getFormsInfo_1700_promise==================end'); }, TIMEOUT) }) /** * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1500 + * @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_1500_callback', 0, async function (done) { - console.log("FMS_getFormsInfo_1500_callback begin"); + 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_1500_callback getFormsInfo async::sucess, data json:" + console.log("FMS_getFormsInfo_1800_callback getFormsInfo async::sucess, data json:" + JSON.stringify(data)); - console.log("FMS_getFormsInfo_1500_callback async::result, result:" + result); + 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].jsComponentName).assertEqual("card"); 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); @@ -550,46 +550,45 @@ describe('getAllFormsInfoTest', function () { expect(data[i].metaData.customizeData[0].name).assertEqual("originWidgetName"); expect(data[i].metaData.customizeData[0].value).assertEqual("myTest"); } - - expect(data[0].scheduledUpdateTime).assertEqual("10:30"); - expect(data[0].name).assertEqual("Form_Js001"); - expect(data[1].name).assertEqual("Form_Js002"); - expect(data[0].updateDuration).assertEqual(0); - expect(data[1].updateDuration).assertEqual(1); - console.log("FMS_getFormsInfo_1500_callback result end"); + + 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_1500_callback==================end'); + console.info('=====================FMS_getFormsInfo_1800_callback==================end'); }, TIMEOUT) - console.log("FMS_getFormsInfo_1500_callback end, ret:"+ret); + console.log("FMS_getFormsInfo_1800_callback end, ret:"+ret); }) /** * @tc.name getFormsInfo test - * @tc.number FMS_getFormsInfo_1500 + * @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_1500_promise', 0, async function (done) { - console.log("FMS_getFormsInfo_1500_promise begin"); + 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_1500_promise async::sucess, data json:" + JSON.stringify(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].jsComponentName).assertEqual("card"); 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); @@ -597,18 +596,15 @@ describe('getAllFormsInfoTest', function () { expect(data[i].metaData.customizeData[0].name).assertEqual("originWidgetName"); expect(data[i].metaData.customizeData[0].value).assertEqual("myTest"); } - - expect(data[0].scheduledUpdateTime).assertEqual("10:30"); - expect(data[0].name).assertEqual("Form_Js001"); - expect(data[1].name).assertEqual("Form_Js002"); - expect(data[0].updateDuration).assertEqual(0); - expect(data[1].updateDuration).assertEqual(1); - console.log("FMS_getFormsInfo_1500_promise result end"); + + 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_1500_promise==================end'); + console.info('=====================FMS_getFormsInfo_1800_promise==================end'); }, TIMEOUT) }) diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/test/List.test.js new file mode 100644 index 0000000000000000000000000000000000000000..19587c5de5b0357b91fffdbf34349d8a0bef753f --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/test/List.test.js @@ -0,0 +1,16 @@ +/* + * 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('./GetAllFormsInfo212Jsunit.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..1940d8463c42c611b5c8594f4397d3388d0e63c2 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "GetAllFormsInfo212" + }, + { + "name": "mainability_description", + "value": "JS_Empty Ability" + } + ] +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/resources/base/media/icon.png differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/signature/openharmony_sx.p7b differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/Test.json index 7a88763ed8d2ac31dd30211b9574f47273e84549..4300a64be9af93e37a31f6b5c6fc734e8f1b4563 100644 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/Test.json +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/Test.json @@ -1,3 +1,3 @@ { - "description": "Configuration for hjunit demo Tests", + "description": "Configuration for hjunit demo Tests" } diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/config.json old mode 100755 new mode 100644 index 0c2cfd3dc817eee4372531ef95b5218fceb5deeb..36fd79e40a05b079d8747b216f55f5e39200451f --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/config.json +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/config.json @@ -47,7 +47,7 @@ "srcLanguage": "c++", "forms": [ { - "name": "Form_Js001", + "name": "FormA_Js001", "description": "form_description", "isDefault": true, "type": "JS", @@ -55,6 +55,7 @@ "supportDimensions":[ "1*2", "2*2" ], "defaultDimension": "1*2", "updateEnabled": true, + "updateDuration": 1, "scheduledUpdateTime": "10:30", "jsComponentName": "card", "formVisibleNotify" : true, @@ -68,7 +69,7 @@ } }, { - "name": "Form_Js002", + "name": "FormA_Js002", "description": "form_description", "isDefault": true, "type": "JS", @@ -77,6 +78,7 @@ "defaultDimension": "1*2", "updateEnabled": true, "updateDuration": 1, + "scheduledUpdateTime": "10:30", "jsComponentName": "card", "formVisibleNotify" : true, "metaData": { diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..81242b602c03cc9f9a66b5d9d63435c75052ac9e --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/BUILD.gn @@ -0,0 +1,34 @@ +# 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 new file mode 100644 index 0000000000000000000000000000000000000000..4300a64be9af93e37a31f6b5c6fc734e8f1b4563 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/Test.json @@ -0,0 +1,3 @@ +{ + "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 new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/signature/openharmony_sx.p7b 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 new file mode 100644 index 0000000000000000000000000000000000000000..733fc3e284d2b8f87ad2160ad5b0344ede7cdce2 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/config.json @@ -0,0 +1,86 @@ +{ + "app": { + "bundleName": "com.form.formsystemtestserviceb", + "vendor": "neusoft", + "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": "com.form.formmodule001.FormAbility001", + "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" + } + ] + } + } + ] + } + ], + "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/formsystemtestservicea/formmodule001/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/app.js similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/app.js rename to aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/app.js 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 new file mode 100644 index 0000000000000000000000000000000000000000..e63c70d978a3a53be988388c87182f81785e170c --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/i18n/en-US.json @@ -0,0 +1,6 @@ +{ + "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 new file mode 100644 index 0000000000000000000000000000000000000000..de6ee5748322f44942c1b003319d8e66c837675f --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/i18n/zh-CN.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "您好", + "world": "世界" + } +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/pages/index/index.css similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/pages/index/index.css rename to aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/pages/index/index.css 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 new file mode 100644 index 0000000000000000000000000000000000000000..f64b040a5ae394dbaa5e185e1ecd4f4556b92184 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/pages/index/index.hml @@ -0,0 +1,5 @@ +
+ + {{ $t('strings.hello') }} {{ title }} + +
diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/pages/index/index.js similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/pages/index/index.js rename to aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/pages/index/index.js diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/resources/base/element/string.json similarity index 81% rename from aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/resources/base/element/string.json rename to aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/resources/base/element/string.json index 9afbd847568e1d6c92a318ef611ce8451b7eb309..b0371a68d5d2fc4c401add8ff26331dc6967c848 100644 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/resources/base/element/string.json +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/resources/base/element/string.json @@ -1,12 +1,12 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "A_fms" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - } - ] +{ + "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 new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/resources/base/media/icon.png differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..1cdb5a6e5ca720184dd54e2482e33bf7da73fa24 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/BUILD.gn @@ -0,0 +1,34 @@ +# 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 new file mode 100644 index 0000000000000000000000000000000000000000..4300a64be9af93e37a31f6b5c6fc734e8f1b4563 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/Test.json @@ -0,0 +1,3 @@ +{ + "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 new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/signature/openharmony_sx.p7b differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/config.json similarity index 86% rename from aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/config.json rename to aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/config.json index cc11f8ec9a0cee472de6013205077e1d21b66e78..8ac281f589115bd22ca78af685db5b531a0a5426 100644 --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/config.json +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/config.json @@ -1,107 +1,108 @@ -{ - "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": "Form_Js001", - "description": "form_description", - "isDefault": true, - "type": "JS", - "colorMode": "auto", - "supportDimensions":[ "1*2", "2*2" ], - "defaultDimension": "1*2", - "updateEnabled": true, - "scheduledUpdateTime": "10:30", - "jsComponentName": "card", - "formVisibleNotify" : true, - "metaData": { - "customizeData": [ - { - "name": "originWidgetName", - "value": "myTest" - } - ] - } - }, - { - "name": "Form_Js002", - "description": "form_description", - "isDefault": true, - "type": "JS", - "colorMode": "auto", - "supportDimensions":[ "1*2", "2*2" ], - "defaultDimension": "1*2", - "updateEnabled": true, - "updateDuration": 1, - "jsComponentName": "card", - "formVisibleNotify" : true, - "metaData": { - "customizeData": [ - { - "name": "originWidgetName", - "value": "myTest" - } - ] - } - } - ] - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } +{ + "app": { + "bundleName": "com.form.formsystemtestservicec", + "vendor": "neusoft", + "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": "com.form.formmodule001.FormAbility001", + "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" + } + ] + } + }, + { + "name": "FormC_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" + } + ] + } + } + ] + } + ], + "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 new file mode 100644 index 0000000000000000000000000000000000000000..e3308849253e8b6b63ad1f8aa970a64881a04161 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/app.js @@ -0,0 +1,169 @@ +/* + * 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 new file mode 100644 index 0000000000000000000000000000000000000000..e63c70d978a3a53be988388c87182f81785e170c --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/i18n/en-US.json @@ -0,0 +1,6 @@ +{ + "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 new file mode 100644 index 0000000000000000000000000000000000000000..de6ee5748322f44942c1b003319d8e66c837675f --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/i18n/zh-CN.json @@ -0,0 +1,6 @@ +{ + "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 new file mode 100644 index 0000000000000000000000000000000000000000..2b1965821483f4f8c8b97c86ef07fe87ea767d01 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/pages/index/index.css @@ -0,0 +1,44 @@ +.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 new file mode 100644 index 0000000000000000000000000000000000000000..f64b040a5ae394dbaa5e185e1ecd4f4556b92184 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/pages/index/index.hml @@ -0,0 +1,5 @@ +
+ + {{ $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 new file mode 100644 index 0000000000000000000000000000000000000000..1ced937cf25654b5e91be9753e6b60f21d82569c --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/pages/index/index.js @@ -0,0 +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 { + data: { + title: "" + }, + onInit() { + this.title = this.$t('strings.world'); + } +} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/resources/base/element/string.json similarity index 77% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/resources/base/element/string.json rename to aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/resources/base/element/string.json index bffd4486bdcce866e73a3222b4f350f7277ab404..5579dbb9f6dc489d465611d74d8d696e60375756 100644 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/resources/base/element/string.json +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/resources/base/element/string.json @@ -1,12 +1,12 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "GetAllFormsInfo" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - } - ] +{ + "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 new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/resources/base/media/icon.png differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..e09b98ed7bbab532a404ae836835d2993e11f82c --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/BUILD.gn @@ -0,0 +1,34 @@ +# 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 new file mode 100644 index 0000000000000000000000000000000000000000..4300a64be9af93e37a31f6b5c6fc734e8f1b4563 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/Test.json @@ -0,0 +1,3 @@ +{ + "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 new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/signature/openharmony_sx.p7b 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 new file mode 100644 index 0000000000000000000000000000000000000000..989557e5ee95ccf6c3edb29f107c5a2baf20eea9 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/config.json @@ -0,0 +1,63 @@ +{ + "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": "FormStServiceAbilityA", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:entry_MainAbility", + "type": "service", + "launchType": "standard", + "formsEnabled": true, + "srcLanguage": "c++" + } + ], + "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 new file mode 100644 index 0000000000000000000000000000000000000000..e3308849253e8b6b63ad1f8aa970a64881a04161 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/app.js @@ -0,0 +1,169 @@ +/* + * 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 new file mode 100644 index 0000000000000000000000000000000000000000..e63c70d978a3a53be988388c87182f81785e170c --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/i18n/en-US.json @@ -0,0 +1,6 @@ +{ + "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 new file mode 100644 index 0000000000000000000000000000000000000000..de6ee5748322f44942c1b003319d8e66c837675f --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/i18n/zh-CN.json @@ -0,0 +1,6 @@ +{ + "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 new file mode 100644 index 0000000000000000000000000000000000000000..2b1965821483f4f8c8b97c86ef07fe87ea767d01 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/pages/index/index.css @@ -0,0 +1,44 @@ +.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 new file mode 100644 index 0000000000000000000000000000000000000000..f64b040a5ae394dbaa5e185e1ecd4f4556b92184 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/pages/index/index.hml @@ -0,0 +1,5 @@ +
+ + {{ $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 new file mode 100644 index 0000000000000000000000000000000000000000..1ced937cf25654b5e91be9753e6b60f21d82569c --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/pages/index/index.js @@ -0,0 +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 { + 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 new file mode 100644 index 0000000000000000000000000000000000000000..289df3ea7801326db65e4e0933b6ff8573efde88 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "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 new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/resources/base/media/icon.png differ