From 415cee2abfcdb59074fad20e00cda86a4c1ecac5 Mon Sep 17 00:00:00 2001 From: "zhaoyuan17@huawei.com" Date: Wed, 10 Nov 2021 15:44:14 +0800 Subject: [PATCH] fms st Signed-off-by: zhaoyuan17@huawei.com --- aafwk/aafwk_standard/formmanager/BUILD.gn | 12 +- .../formsystemtesthost/FormFuzzTest/Test.json | 2 +- .../src/main/js/test/FormFuzzTest.test.js | 634 ------- .../main/js/test/FormFuzzTestArray.test.js | 1414 +++++++++++++++ .../src/main/js/test/FormFuzzTestBool.test.js | 1414 +++++++++++++++ .../main/js/test/FormFuzzTestFunction.test.js | 1414 +++++++++++++++ .../src/main/js/test/FormFuzzTestNull.test.js | 1414 +++++++++++++++ .../src/main/js/test/FormFuzzTestNum.test.js | 1414 +++++++++++++++ .../main/js/test/FormFuzzTestObject.test.js | 1414 +++++++++++++++ .../main/js/test/FormFuzzTestString.test.js | 1566 +++++++++++++++++ .../js/test/FormFuzzTestUndefined.test.js | 1414 +++++++++++++++ .../entry/src/main/js/test/List.test.js | 9 +- .../entry/src/main/js/test/getParam.js | 79 +- .../BUILD.gn | 4 +- .../getallformsinfo10/Test.json | 38 + .../entry/src/main/config.json | 63 + .../entry/src/main/js/default/app.js | 0 .../entry/src/main/js/default/i18n/en-US.json | 0 .../entry/src/main/js/default/i18n/zh-CN.json | 0 .../src/main/js/default/pages/index/index.css | 0 .../src/main/js/default/pages/index/index.hml | 0 .../src/main/js/default/pages/index/index.js | 0 .../js/test/GetAllFormsInfo10Jsunit.test.js | 70 + .../entry/src/main/js/test/List.test.js | 2 +- .../main/resources/base/element/string.json | 12 + .../src/main/resources/base/media/icon.png | Bin .../signature/openharmony_sx.p7b | Bin .../getallformsinfo201/BUILD.gn | 31 + .../getallformsinfo201/Test.json | 38 + .../entry/src/main/config.json | 63 + .../entry/src/main/js/default/app.js | 23 + .../src/main/js/default/i18n/en-US.json | 0 .../src/main/js/default/i18n/zh-CN.json | 0 .../src/main/js/default/pages/index/index.css | 44 + .../src/main/js/default/pages/index/index.hml | 0 .../src/main/js/default/pages/index/index.js | 51 + .../js/test/GetAllFormsInfo201Jsunit.test.js | 103 ++ .../entry/src/main/js/test/List.test.js | 16 + .../main/resources/base/element/string.json | 12 + .../src/main/resources/base/media/icon.png | Bin .../signature/openharmony_sx.p7b | Bin 0 -> 3437 bytes .../getallformsinfo211/BUILD.gn | 31 + .../getallformsinfo211/Test.json | 38 + .../entry/src/main/config.json | 63 + .../entry/src/main/js/default/app.js | 23 + .../entry/src/main/js/default/i18n/en-US.json | 6 + .../entry/src/main/js/default/i18n/zh-CN.json | 6 + .../src/main/js/default/pages/index/index.css | 44 + .../src/main/js/default/pages/index/index.hml | 5 + .../src/main/js/default/pages/index/index.js | 51 + .../js/test/GetAllFormsInfo211Jsunit.test.js | 109 ++ .../entry/src/main/js/test/List.test.js | 16 + .../main/resources/base/element/string.json | 12 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../signature/openharmony_sx.p7b | Bin 0 -> 3437 bytes .../getallformsinfo212/BUILD.gn | 31 + .../Test.json | 6 +- .../entry/src/main/config.json | 27 - .../entry/src/main/js/default/app.js | 23 + .../entry/src/main/js/default/i18n/en-US.json | 6 + .../entry/src/main/js/default/i18n/zh-CN.json | 6 + .../src/main/js/default/pages/index/index.css | 44 + .../src/main/js/default/pages/index/index.hml | 5 + .../src/main/js/default/pages/index/index.js | 51 + .../js/test/GetAllFormsInfo212Jsunit.test.js} | 332 ++-- .../entry/src/main/js/test/List.test.js | 16 + .../main/resources/base/element/string.json | 12 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../signature/openharmony_sx.p7b | Bin 0 -> 3437 bytes .../formsystemtestservicea/Test.json | 2 +- .../src/main/config.json | 6 +- .../formsystemtestserviceb/BUILD.gn | 34 + .../formsystemtestserviceb/Test.json | 3 + .../signature/openharmony_sx.p7b | Bin 0 -> 3437 bytes .../src/main/config.json | 86 + .../src/main/js/default/app.js | 0 .../src/main/js/default/i18n/en-US.json | 6 + .../src/main/js/default/i18n/zh-CN.json | 6 + .../src/main/js/default/pages/index/index.css | 0 .../src/main/js/default/pages/index/index.hml | 5 + .../src/main/js/default/pages/index/index.js | 0 .../js}/resources/base/element/string.json | 22 +- .../src/main/js/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../formsystemtestservicec/BUILD.gn | 34 + .../formsystemtestservicec/Test.json | 3 + .../signature/openharmony_sx.p7b | Bin 0 -> 3437 bytes .../src/main/config.json | 213 +-- .../src/main/js/default/app.js | 169 ++ .../src/main/js/default/i18n/en-US.json | 6 + .../src/main/js/default/i18n/zh-CN.json | 6 + .../src/main/js/default/pages/index/index.css | 44 + .../src/main/js/default/pages/index/index.hml | 5 + .../src/main/js/default/pages/index/index.js | 23 + .../js}/resources/base/element/string.json | 22 +- .../src/main/js/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../formsystemtestserviced/BUILD.gn | 34 + .../formsystemtestserviced/Test.json | 3 + .../signature/openharmony_sx.p7b | Bin 0 -> 3437 bytes .../src/main/config.json | 63 + .../src/main/js/default/app.js | 169 ++ .../src/main/js/default/i18n/en-US.json | 6 + .../src/main/js/default/i18n/zh-CN.json | 6 + .../src/main/js/default/pages/index/index.css | 44 + .../src/main/js/default/pages/index/index.hml | 5 + .../src/main/js/default/pages/index/index.js | 23 + .../js/resources/base/element/string.json | 12 + .../src/main/js/resources/base/media/icon.png | Bin 0 -> 6790 bytes 107 files changed, 13758 insertions(+), 1035 deletions(-) delete mode 100755 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTest.test.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestArray.test.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestBool.test.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestFunction.test.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNull.test.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNum.test.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestObject.test.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestString.test.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestUndefined.test.js mode change 100755 => 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/List.test.js mode change 100755 => 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/getParam.js rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{getallformsinfo => getallformsinfo10}/BUILD.gn (93%) create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/Test.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/config.json rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{getallformsinfo => getallformsinfo10}/entry/src/main/js/default/app.js (100%) rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{getallformsinfo => getallformsinfo10}/entry/src/main/js/default/i18n/en-US.json (100%) rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{getallformsinfo => getallformsinfo10}/entry/src/main/js/default/i18n/zh-CN.json (100%) rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{getallformsinfo => getallformsinfo10}/entry/src/main/js/default/pages/index/index.css (100%) rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{getallformsinfo => getallformsinfo10}/entry/src/main/js/default/pages/index/index.hml (100%) rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{getallformsinfo => getallformsinfo10}/entry/src/main/js/default/pages/index/index.js (100%) create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/test/GetAllFormsInfo10Jsunit.test.js rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{getallformsinfo => getallformsinfo10}/entry/src/main/js/test/List.test.js (93%) create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/resources/base/element/string.json rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{getallformsinfo => getallformsinfo10}/entry/src/main/resources/base/media/icon.png (100%) rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{getallformsinfo => getallformsinfo10}/signature/openharmony_sx.p7b (100%) create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/BUILD.gn create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/Test.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/config.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/app.js rename aafwk/aafwk_standard/formmanager/{formsystemtestservice/formsystemtestservicea/formmodule001 => formsystemtesthost/getallformsinfo201/entry}/src/main/js/default/i18n/en-US.json (100%) rename aafwk/aafwk_standard/formmanager/{formsystemtestservice/formsystemtestservicea/formmodule001 => formsystemtesthost/getallformsinfo201/entry}/src/main/js/default/i18n/zh-CN.json (100%) create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.css rename aafwk/aafwk_standard/formmanager/{formsystemtestservice/formsystemtestservicea/formmodule001 => formsystemtesthost/getallformsinfo201/entry}/src/main/js/default/pages/index/index.hml (100%) create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/test/GetAllFormsInfo201Jsunit.test.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/test/List.test.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/resources/base/element/string.json rename aafwk/aafwk_standard/formmanager/{formsystemtestservice/formsystemtestservicea/formmodule001 => formsystemtesthost/getallformsinfo201/entry}/src/main/resources/base/media/icon.png (100%) create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/signature/openharmony_sx.p7b create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/BUILD.gn create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/Test.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/config.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/app.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/i18n/en-US.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/i18n/zh-CN.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.css create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.hml create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/test/GetAllFormsInfo211Jsunit.test.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/test/List.test.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/resources/base/element/string.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/resources/base/media/icon.png create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/signature/openharmony_sx.p7b create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/BUILD.gn rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{getallformsinfo => getallformsinfo212}/Test.json (83%) rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{getallformsinfo => getallformsinfo212}/entry/src/main/config.json (62%) create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/app.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/i18n/en-US.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/i18n/zh-CN.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/pages/index/index.css create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/pages/index/index.hml create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/default/pages/index/index.js rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{getallformsinfo/entry/src/main/js/test/GetAllFormsInfoJsunit.test.js => getallformsinfo212/entry/src/main/js/test/GetAllFormsInfo212Jsunit.test.js} (77%) create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/js/test/List.test.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/resources/base/element/string.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/entry/src/main/resources/base/media/icon.png create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo212/signature/openharmony_sx.p7b mode change 100755 => 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/src/main/config.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/BUILD.gn create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/Test.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/signature/openharmony_sx.p7b create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/config.json rename aafwk/aafwk_standard/formmanager/formsystemtestservice/{formsystemtestservicea/formmodule001 => formsystemtestserviceb}/src/main/js/default/app.js (100%) create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/i18n/en-US.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/i18n/zh-CN.json rename aafwk/aafwk_standard/formmanager/formsystemtestservice/{formsystemtestservicea/formmodule001 => formsystemtestserviceb}/src/main/js/default/pages/index/index.css (100%) create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/default/pages/index/index.hml rename aafwk/aafwk_standard/formmanager/formsystemtestservice/{formsystemtestservicea/formmodule001 => formsystemtestserviceb}/src/main/js/default/pages/index/index.js (100%) rename aafwk/aafwk_standard/formmanager/formsystemtestservice/{formsystemtestservicea/formmodule001/src/main => formsystemtestserviceb/src/main/js}/resources/base/element/string.json (81%) create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviceb/src/main/js/resources/base/media/icon.png create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/BUILD.gn create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/Test.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/signature/openharmony_sx.p7b rename aafwk/aafwk_standard/formmanager/formsystemtestservice/{formsystemtestservicea/formmodule001 => formsystemtestservicec}/src/main/config.json (86%) create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/app.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/i18n/en-US.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/i18n/zh-CN.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/pages/index/index.css create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/pages/index/index.hml create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/default/pages/index/index.js rename aafwk/aafwk_standard/formmanager/{formsystemtesthost/getallformsinfo/entry/src/main => formsystemtestservice/formsystemtestservicec/src/main/js}/resources/base/element/string.json (77%) create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/js/resources/base/media/icon.png create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/BUILD.gn create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/Test.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/signature/openharmony_sx.p7b create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/config.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/app.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/i18n/en-US.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/i18n/zh-CN.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/pages/index/index.css create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/pages/index/index.hml create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/default/pages/index/index.js create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/resources/base/element/string.json create mode 100644 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestserviced/src/main/js/resources/base/media/icon.png diff --git a/aafwk/aafwk_standard/formmanager/BUILD.gn b/aafwk/aafwk_standard/formmanager/BUILD.gn index 8aefe399d..7f477896e 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 49e7fd17e..7e05f9f85 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 b6d1b992d..000000000 --- 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 000000000..9670c1bf9 --- /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 000000000..879a0b718 --- /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 000000000..1cbfa2ee1 --- /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 000000000..906ac7ade --- /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 000000000..84517b79b --- /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 000000000..0e2fe6c5e --- /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 000000000..164108a7a --- /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 000000000..da62078b3 --- /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 ae0ba3f51..182052736 --- 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 69e4f8396..b64f4c502 --- 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 ac4cced06..e17ccc9a1 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 000000000..71dbba6d6 --- /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 000000000..c55339fa4 --- /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 000000000..3ad6411ab --- /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 439e7f920..0bf02e9ef 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 000000000..a8c86be44 --- /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 000000000..98b371b18 --- /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 000000000..5ec5cdd14 --- /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 000000000..833d96877 --- /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 000000000..e423f4bce --- /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 000000000..0a66102a6 --- /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 000000000..e4832498b --- /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 000000000..a0eea8c99 --- /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 000000000..995113fd4 --- /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 000000000..5627ae976 --- /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 GIT binary patch literal 3437 zcmcgvX>b$g8MY4FF(5FQyMT=#m||qU)nQ9cId-MBB-<-lvSdq&snM}IENNF>t+bK| zgowuF2vC|SxSZxNN5eHhV%(WPpbeB9Fc3;JDMtzMBv1-XAc2N~c2_tCXW&OCGw6qQ z-s9VS-tT?h=bI0tMS+~WDXqHJyCPmLzdbE-fV8Nd&*MRZfG8(#POFZG3xs@Lb{0ry z=R8j3wWo!5g=yjKx#BoZMFS)uA)H}cTp@-^K`9VV?RC3J59@}eik*>n|pRKOLZ zxdn7G!Yv@9O#y<&eUy{)vMXb;fQR)ffVAADQsEMXm;IBMDLfLD0w^U;6%HVo-0Q_5 zCHEa?DBuauNpZzoF+tK27w#n~?u%toS-DhR4k@Q*{7x^8Q=D6&kd^_~J#VVG2LXkL zaAy=}U*?Jto)9hx5MGjdp9hcQAu@tfk_;l!PeyxPY<8b&+&D!CyaBh9=8BSVKLpk4 z4Ml3yY|&Th)vyK4cpC{!uU8v2YBlVV`d~(nz&<@{G1oe*DHub1z7~J5*;s2bX<)_* zV_GbsPQg`(&rpxRb_*Od7}++3+liSw-$!1 zs5*g}EHWhI3i|!-FcfzYL0`SL-rq>LENC;PMl)G(0(1U2%Va|smp0UFx0xd@soZA* zD5LYc4OlbE7@ARt#h}rr3>K@bf%B#^-c+xz8Hr)0D5ExIFltezN@Hn8>o5d~bSfYtkc+_Z&kI#-N5_GhCg*V-^TSO=!G~ z(fXy{n2XV+k}6w_W`dTOP2a4u0ly;ANZ>4OxSKAzFB!yBzdo`gX zO?o|H@WiAw$y6l?=^3jA_Hy0S)nTYs12;4hKE&ekQ|>?|ZLJ}#F`2BczC7kdE4@xV zZBD_)Otwjhz+NSaz?d45!;FsGSu-#qh#hStD%B}f!mCT!KqzSo>I`NGH_9Dea$1Qi zg29Ydt!~lQVR99_T7#Hije~(12drl-P)SV?QR*9sus`8th-8^OQ7@xI$(Yp|^;bL1 zR50O$mDXw6P>i7B(TJ)ciPzTE>XY%X6HAa)b#OBRXv&~%Bw|J#Y><i4=e%95bjtw|cJp=#P#Pf#*luqI_wR;fISDCJhAqSG6R%xItn%~QtZ@m%&u zjGGLX;t6Ls62eQvNmf@v+}J%54^CygxRZ`?8X#r|wkev7(s;Ou4T#y1XNNf)h;o7z z8a^Lfq<1uH`E{G9E z*(=)Css_LSk=>E9jr)s5^2-!+MN=Ds}>1hRma4`uCIz9%p3O77839E{xf z4c_I?**|1`K2tg4!Hvyrou4BsJQuv*UfF)<%CelYIS>D^o?X)3+MK%la6kooW8&G@BU)Y0hT`+mOm$Z_%rB=a%o>I z!2c6lHyKQN)VjiFwa!eE^p8jc$sy$vB+8i25lI~6KPFFh$!o$avA~rj#L6xvR|Z83 z*WD6T9e+5Pyy=F+)pNTf{ny3cy>7Rkd3o*TS?TZJ`NS^NF2%HMkyS{?uJ$`!P4_L^ z1`NFDUbNyg_qREifgktnp1_v{Jbb`7m}2PTyUdOmtJj~m z9bB=ecw4_^rw1IW=of+>nrW5=d3k`3qHCxsIN_F{T1A545};;+fsyC&qChi+YV zr~M63H8ZLCPYmsjY>ls9cL%I)F|JIW-#+48$+lD4k*(P*kDM%zx_fvu4u5ZYUnI}5 zdrycFq>xFU)&X3p@pP2u%$o}}YcRn(MhJ&B2o?KS@cIVz>Ye%o^xV?CB{_Qhu z;}_q1bvO^g{8<3!gYbo4Di{8qzV+(9 zdlmksohQmRTs@qB;(Wo?dER_ux6XQb@q$tQPW?CMu6GVQd;R=iR;-S{Kr%Zks7>b1 zNs{|-+jhObYE}NR&`TGGr^h^4bjh%c>R#@=8nM&Md>_a+zVulsl;){flFekV1t9ob z+SqfV_Pv3$2f)bQ8%Ul2>fdYR^1zs0BQF~olsOj5AodC&Q_7SMFzsz2 z9newxE&jodk~tNHwl%LBMMDbrk=(^b literal 0 HcmV?d00001 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 000000000..a28e366b3 --- /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 000000000..7e578c36e --- /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 000000000..70c190cc5 --- /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 000000000..e423f4bce --- /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 000000000..e63c70d97 --- /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 000000000..de6ee5748 --- /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 000000000..0a66102a6 --- /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 000000000..f64b040a5 --- /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 000000000..e4832498b --- /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 000000000..e5be70a3f --- /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 000000000..198e15ff0 --- /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 000000000..d555768dc --- /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 GIT binary patch literal 6790 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 literal 0 HcmV?d00001 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 000000000..5e9f6a25d --- /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 2f2278f6f..f06b852ae 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 0ea4476b3..65294c672 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 000000000..e423f4bce --- /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 000000000..e63c70d97 --- /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 000000000..de6ee5748 --- /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 000000000..0a66102a6 --- /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 000000000..f64b040a5 --- /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 000000000..e4832498b --- /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 671823092..0f25595b3 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 000000000..19587c5de --- /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 000000000..1940d8463 --- /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 GIT binary patch literal 6790 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 literal 0 HcmV?d00001 diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/Test.json index 7a88763ed..4300a64be 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 0c2cfd3dc..36fd79e40 --- 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 000000000..81242b602 --- /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 000000000..4300a64be --- /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 GIT binary patch literal 3437 zcmcgvX>b$g8MY4FF(5FQyMT=#m||qU)nQ9cId-MBB-<-lvSdq&snM}IENNF>t+bK| zgowuF2vC|SxSZxNN5eHhV%(WPpbeB9Fc3;JDMtzMBv1-XAc2N~c2_tCXW&OCGw6qQ z-s9VS-tT?h=bI0tMS+~WDXqHJyCPmLzdbE-fV8Nd&*MRZfG8(#POFZG3xs@Lb{0ry z=R8j3wWo!5g=yjKx#BoZMFS)uA)H}cTp@-^K`9VV?RC3J59@}eik*>n|pRKOLZ zxdn7G!Yv@9O#y<&eUy{)vMXb;fQR)ffVAADQsEMXm;IBMDLfLD0w^U;6%HVo-0Q_5 zCHEa?DBuauNpZzoF+tK27w#n~?u%toS-DhR4k@Q*{7x^8Q=D6&kd^_~J#VVG2LXkL zaAy=}U*?Jto)9hx5MGjdp9hcQAu@tfk_;l!PeyxPY<8b&+&D!CyaBh9=8BSVKLpk4 z4Ml3yY|&Th)vyK4cpC{!uU8v2YBlVV`d~(nz&<@{G1oe*DHub1z7~J5*;s2bX<)_* zV_GbsPQg`(&rpxRb_*Od7}++3+liSw-$!1 zs5*g}EHWhI3i|!-FcfzYL0`SL-rq>LENC;PMl)G(0(1U2%Va|smp0UFx0xd@soZA* zD5LYc4OlbE7@ARt#h}rr3>K@bf%B#^-c+xz8Hr)0D5ExIFltezN@Hn8>o5d~bSfYtkc+_Z&kI#-N5_GhCg*V-^TSO=!G~ z(fXy{n2XV+k}6w_W`dTOP2a4u0ly;ANZ>4OxSKAzFB!yBzdo`gX zO?o|H@WiAw$y6l?=^3jA_Hy0S)nTYs12;4hKE&ekQ|>?|ZLJ}#F`2BczC7kdE4@xV zZBD_)Otwjhz+NSaz?d45!;FsGSu-#qh#hStD%B}f!mCT!KqzSo>I`NGH_9Dea$1Qi zg29Ydt!~lQVR99_T7#Hije~(12drl-P)SV?QR*9sus`8th-8^OQ7@xI$(Yp|^;bL1 zR50O$mDXw6P>i7B(TJ)ciPzTE>XY%X6HAa)b#OBRXv&~%Bw|J#Y><i4=e%95bjtw|cJp=#P#Pf#*luqI_wR;fISDCJhAqSG6R%xItn%~QtZ@m%&u zjGGLX;t6Ls62eQvNmf@v+}J%54^CygxRZ`?8X#r|wkev7(s;Ou4T#y1XNNf)h;o7z z8a^Lfq<1uH`E{G9E z*(=)Css_LSk=>E9jr)s5^2-!+MN=Ds}>1hRma4`uCIz9%p3O77839E{xf z4c_I?**|1`K2tg4!Hvyrou4BsJQuv*UfF)<%CelYIS>D^o?X)3+MK%la6kooW8&G@BU)Y0hT`+mOm$Z_%rB=a%o>I z!2c6lHyKQN)VjiFwa!eE^p8jc$sy$vB+8i25lI~6KPFFh$!o$avA~rj#L6xvR|Z83 z*WD6T9e+5Pyy=F+)pNTf{ny3cy>7Rkd3o*TS?TZJ`NS^NF2%HMkyS{?uJ$`!P4_L^ z1`NFDUbNyg_qREifgktnp1_v{Jbb`7m}2PTyUdOmtJj~m z9bB=ecw4_^rw1IW=of+>nrW5=d3k`3qHCxsIN_F{T1A545};;+fsyC&qChi+YV zr~M63H8ZLCPYmsjY>ls9cL%I)F|JIW-#+48$+lD4k*(P*kDM%zx_fvu4u5ZYUnI}5 zdrycFq>xFU)&X3p@pP2u%$o}}YcRn(MhJ&B2o?KS@cIVz>Ye%o^xV?CB{_Qhu z;}_q1bvO^g{8<3!gYbo4Di{8qzV+(9 zdlmksohQmRTs@qB;(Wo?dER_ux6XQb@q$tQPW?CMu6GVQd;R=iR;-S{Kr%Zks7>b1 zNs{|-+jhObYE}NR&`TGGr^h^4bjh%c>R#@=8nM&Md>_a+zVulsl;){flFekV1t9ob z+SqfV_Pv3$2f)bQ8%Ul2>fdYR^1zs0BQF~olsOj5AodC&Q_7SMFzsz2 z9newxE&jodk~tNHwl%LBMMDbrk=(^b literal 0 HcmV?d00001 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 000000000..733fc3e28 --- /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 000000000..e63c70d97 --- /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 000000000..de6ee5748 --- /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 000000000..f64b040a5 --- /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 9afbd8475..b0371a68d 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 GIT binary patch literal 6790 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 literal 0 HcmV?d00001 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 cc11f8ec9..8ac281f58 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 000000000..e33088492 --- /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 000000000..e63c70d97 --- /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 000000000..de6ee5748 --- /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 000000000..2b1965821 --- /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 000000000..f64b040a5 --- /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 000000000..1ced937cf --- /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 bffd4486b..5579dbb9f 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 GIT binary patch literal 6790 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 literal 0 HcmV?d00001 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 000000000..989557e5e --- /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 000000000..e33088492 --- /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 000000000..e63c70d97 --- /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 000000000..de6ee5748 --- /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 000000000..2b1965821 --- /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 000000000..f64b040a5 --- /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 000000000..1ced937cf --- /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 000000000..289df3ea7 --- /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 GIT binary patch literal 6790 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