diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/BUILD.gn b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/BUILD.gn index 953593fd6264503b8ee0e4cbe311235ac4710d0f..611f473743c3d768b279b7f9eb3f4d4940090564 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemHost") { +ohos_hap("FormSystemHost") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHost") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "FormSystemHost" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/Test.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/BUILD.gn b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/BUILD.gn index 882910858877b87f38e79f759f603f18b920f1e5..9ea8290fc73be46fc72fe49ea9e55b4331efd879 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemHostB") { +ohos_hap("FormSystemHostB") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostB") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "FormSystemHostB" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/Test.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/BUILD.gn b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/BUILD.gn index 9037fff95ef276129e9368d1dc080cb4d838aba2..b80b51613bb9acbd553eac5859caa09f801adbfc 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemHostC") { +ohos_hap("FormSystemHostC") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostC") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "FormSystemHostC" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/Test.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/BUILD.gn b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/BUILD.gn index 1d59671f6601f2a42e8716cbb034f99bbdd4fd9c..cc8e89d347280e6af57008857ceaa4f3b5511527 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemHostD") { +ohos_hap("FormSystemHostD") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostD") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "FormSystemHostD" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/Test.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/BUILD.gn b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/BUILD.gn index a9f7307f6d22a59872fc100223bd561164cadf11..4560bf2cbd7b236b04d3395cdae8b2d5b2f6e3e4 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemHostE") { +ohos_hap("FormSystemHostE") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostE") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "FormSystemHostE" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/Test.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/BUILD.gn b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/BUILD.gn index 9c7a98142f91bad2c8134254b80c5ab8e5f60ab6..b7d9436d481578465454316c78a1df8afe41e083 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemHostF") { +ohos_hap("FormSystemHostF") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostF") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "FormSystemHostF" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/Test.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/BUILD.gn b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/BUILD.gn index c20baa75ef148f866d217a4b9d80a823eb41f226..1f1072a000ad1b22fb65a8d91ca66c5db8f7b2a5 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemHostG") { +ohos_hap("FormSystemHostG") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostG") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "FormSystemHostG" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/Test.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/BUILD.gn b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/BUILD.gn index 4ac1113eed7d31f499af5ac8a6219a5791acf5c9..a277d3dbd03d92d12c5878ad4c5e18c13ea68ae1 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemHostI") { +ohos_hap("FormSystemHostI") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostI") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "FormSystemHostI" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/Test.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/BUILD.gn b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/BUILD.gn index be156b6d07ea799a3ff32b321fe805346a2238c1..f8ef62db3ea4b7d164dfd942a553d87a324333d9 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemHostJ") { +ohos_hap("FormSystemHostJ") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostJ") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "FormSystemHostJ" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/Test.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/BUILD.gn b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/BUILD.gn index af31e1793fc454307b21a0ae4985b2b0da4b3c8d..4d602e35722dc85dffb2c94eec372f1d74aa3a3a 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemHostK") { +ohos_hap("FormSystemHostK") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostK") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "FormSystemHostK" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/Test.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/BUILD.gn b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/BUILD.gn index 4ffe8d9e81dcb4f95cb218cda89565d944a17d13..6401c872c1c2d1dde40652ff94269f9b55019eda 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemHostL") { +ohos_hap("FormSystemHostL") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostL") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "FormSystemHostL" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/Test.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/BUILD.gn b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/BUILD.gn index 709984dca622557cdcf0ccdae01b8148e5c9a5b9..d7b02548137eb89c896c6479c4942140a758e911 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemHostN") { +ohos_hap("FormSystemHostN") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostN") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "FormSystemHostN" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/Test.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/BUILD.gn b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/BUILD.gn index 723d8885037f291d79ab9902904da6afc56645a9..dd97acaaa601433a4f0c0a797b3df6ddee241bd0 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemHostNoPerm") { +ohos_hap("FormSystemHostNoPerm") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostNoPerm") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "FormSystemHostNoPerm" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/Test.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/BUILD.gn b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/BUILD.gn index c64ff4a56c102fd7b8dfb4b5974824f1c48f19a7..edd31494dd18a95ed227d85171bad85184265f90 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemHostO") { +ohos_hap("FormSystemHostO") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostO") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "FormSystemHostO" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/Test.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/BUILD.gn b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/BUILD.gn index f107578971158d37528f339738e7dfdea5b53c21..8758ce8b3af40cac08a578c535397ee925cb7a74 100644 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemHostP") { +ohos_hap("FormSystemHostP") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostP") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "FormSystemHostP" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/Test.json b/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/Test.json deleted file mode 100644 index 4300a64be9af93e37a31f6b5c6fc734e8f1b4563..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/BUILD.gn b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/BUILD.gn index 272ca9e0c358f338c4c2f3acfd31f27dcc13cdf8..2b5f2d5b8b4bfc8c289583cc6c5eca74f668a81a 100644 --- a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemProviderA") { +ohos_hap("FormSystemProviderA") { hap_name = "FormSystemProviderA" hap_profile = "./entry/src/main/config.json" deps = [ @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderA") { ] ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/Test.json b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/Test.json deleted file mode 100644 index d9fdcb92f81eac53bf51c78a428be0210c192b89..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/BUILD.gn b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/BUILD.gn index 557331b2519ea8e5ae561a14c6c29c111e1cf5d4..ccaf90592ee342957ebe72f64a19fadafd50dffb 100644 --- a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemProviderB") { +ohos_hap("FormSystemProviderB") { hap_name = "FormSystemProviderB" hap_profile = "./entry/src/main/config.json" deps = [ @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderB") { ] ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/Test.json b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/Test.json deleted file mode 100644 index d9fdcb92f81eac53bf51c78a428be0210c192b89..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/BUILD.gn b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/BUILD.gn index 3cf17f2b94562097911f4046751986334f612be2..5b3eab9f203241fa47b3ed2cdd1b74847cae663c 100644 --- a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemProviderC") { +ohos_hap("FormSystemProviderC") { hap_name = "FormSystemProviderC" hap_profile = "./entry/src/main/config.json" deps = [ @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderC") { ] ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/Test.json b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/Test.json deleted file mode 100644 index d9fdcb92f81eac53bf51c78a428be0210c192b89..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/BUILD.gn b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/BUILD.gn index ce843fb51cf39ec87a34f21a08eed06284e7619f..b8354bf6eadf83f17a73af04bc5fd9d9a9cb7066 100644 --- a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/BUILD.gn +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormSystemProviderD") { +ohos_hap("FormSystemProviderD") { hap_name = "FormSystemProviderD" hap_profile = "./entry/src/main/config.json" deps = [ @@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderD") { ] ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" + js_build_mode = "debug" + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/Test.json b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/Test.json deleted file mode 100644 index d9fdcb92f81eac53bf51c78a428be0210c192b89..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests" -} \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/GetFormsInfoFuzz.test.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/GetFormsInfoFuzz.test.ets index 2c380757d3636eff8006211e23efe3f5ecf6dca1..e77d96703dbdc04cd3349ca6fbea9527649acfb6 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/GetFormsInfoFuzz.test.ets +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/GetFormsInfoFuzz.test.ets @@ -24,8 +24,8 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => { const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`; describe(`${describeName}`, () => { - const callbackName = `FMS_fuzzTest_getinfobundle`; - const promiseName = `FMS_fuzzTest_getinfobundle`; + const callbackName = `FMS_fuzzTest_getinfomodule_callback`; + const promiseName = `FMS_fuzzTest_getinfomodule_promise`; const length = DATA_TYPE_LIST.length; for (let i = 0; i < length; ++i) { @@ -35,13 +35,13 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => { * @tc.number FMS_fuzzTest_getinfobundle_0100 ~ FMS_fuzzTest_getinfobundle_0800 * @tc.desc Check whether the getFormsInfo interface can pass the fuzzy test (by AsyncCallback) */ - it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { + it(`FMS_fuzzTest_getinfobundle_${tcNumber}`, filterParameter, async (done) => { const dataType = DATA_TYPE_LIST[i]; const bundleName = getFuzzData(dataType); - console.log(`${callbackName} ${tcNumber} bundleName typeof: ${typeof bundleName}`); + console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} bundleName typeof: ${typeof bundleName}`); try { formHost.getFormsInfo(bundleName, (error, data) => { - console.log(`${callbackName} ${tcNumber} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); expect(data).assertUndefined(); if (`STRING` === dataType) { expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE); @@ -53,8 +53,8 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => { done(); }); } catch (error) { - console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); - console.log(`${callbackName} ${tcNumber} should not reach here`); + console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} should not reach here`); expect().assertFail(); } }); @@ -68,17 +68,17 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => { * @tc.number FMS_fuzzTest_getinfobundle_0900 ~ FMS_fuzzTest_getinfobundle_1600 * @tc.desc Check whether the getFormsInfo interface can pass the fuzzy test (by Promise) */ - it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { + it(`FMS_fuzzTest_getinfobundle_${tcNumber}`, filterParameter, async (done) => { const dataType = DATA_TYPE_LIST[i]; const bundleName = getFuzzData(dataType); - console.log(`${promiseName} ${tcNumber} ${describeName} bundleName typeof: ${typeof bundleName}`); + console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} ${describeName} bundleName typeof: ${typeof bundleName}`); try { const data = await formHost.getFormsInfo(bundleName); - console.log(`${promiseName} ${tcNumber} getFormsInfo data: ${JSON.stringify(data)}`); - console.log(`${promiseName} ${tcNumber} should not reach here`); + console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} getFormsInfo data: ${JSON.stringify(data)}`); + console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} should not reach here`); expect().assertFail(); } catch (error) { - console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); + console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} exception caught: ${JSON.stringify(error)}`); if (`STRING` === dataType) { expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE); expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED); @@ -90,12 +90,6 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => { } }); } - }); - - describe(`${describeName}`, () => { - const callbackName = `FMS_fuzzTest_getinfomodule_callback`; - const promiseName = `FMS_fuzzTest_getinfomodule_promise`; - const length = DATA_TYPE_LIST.length; for (let i = 0; i < length; ++i) { const tcNumber = `0${(i + 1) * 100}`; diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets index eb26beb6127dfbe8f90f951907c099175595f791..9f9d15cf6c88c8bd388025fecf7d244c8fe89df2 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets @@ -29,9 +29,37 @@ export const getFormsInfoTest = (describeName, filterParameter) => { } describe(`${describeName}`, () => { - const callbackName = `FMS_getFormsInfo_0900 callback`; - const promiseName = `FMS_getFormsInfo_0900 promise`; + const callbackName = `FMS_getFormsInfo_Callback_0900`; + const promiseName = `FMS_getFormsInfo_Promise_0900`; const bundleName = ``; + const callbackName1 = `FMS_getFormsInfo_Callback_1000 `; + const promiseName1 = `FMS_getFormsInfo_Promise_1000`; + const bundleName1 = `wrong.bundle.name`; + const callbackName2 = `FMS_getFormsInfo_Callback_1100`; + const promiseName2 = `FMS_getFormsInfo_Promise_1100`; + const bundleName2 = `com.ohos.st.formsystemproviderb`; + const callbackName3 = `FMS_getFormsInfo_Callback_1400`; + const promiseName3 = `FMS_getFormsInfo_Promise_1400`; + const bundleName3 = ``; + const moduleName = `form_module_c`; + const callbackName4 = `FMS_getFormsInfo_Callback_1500`; + const promiseName4 = `FMS_getFormsInfo_Promise_1500`; + const bundleName4 = `wrong.bundle.name`; + const moduleName1 = `form_module_c`; + const callbackName5 = `FMS_getFormsInfo_Callback_1600`; + const promiseName5 = `FMS_getFormsInfo_promise_1600`; + const bundleName5 = `com.ohos.st.formsystemproviderc`; + const moduleName2 = ``; + const callbackName6 = `FMS_getFormsInfo_Callback_1700`; + const promiseName6 = `FMS_getFormsInfo_promise_1700`; + const bundleName6 = `com.ohos.st.formsystemproviderc`; + const moduleName3 = `wrong.module.name`; + const callbackName7 = `FMS_getFormsInfo_Callback_1800`; + const promiseName7 = `FMS_getFormsInfo_Promise_1800`; + const bundleName7 = `com.ohos.st.formsystemproviderc`; + const moduleName4 = `form_module_c`; + var tempDataB = undefined; + var tempDataC = undefined; /** * @tc.name: getFormsInfo @@ -77,33 +105,28 @@ export const getFormsInfoTest = (describeName, filterParameter) => { console.log(`==========${promiseName} ${describeName} end==========`); } }); - }); - - describe(`${describeName}`, () => { - const callbackName = `FMS_getFormsInfo_1000 callback`; - const promiseName = `FMS_getFormsInfo_1000 promise`; - const bundleName = `wrong.bundle.name`; /** * @tc.name: getFormsInfo * @tc.number: FMS_getFormsInfo_1000 * @tc.desc: Query specific form configuration information by wrong bundle name (by AsyncCallback) */ - it(`${callbackName}`, filterParameter, async (done) => { - console.log(`==========${callbackName} ${describeName} start==========`); + it(`${callbackName1}`, filterParameter, async (done) => { + console.log(`==========${callbackName1} ${describeName} start==========`); try { - formHost.getFormsInfo(bundleName, (error, data) => { - console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + formHost.getFormsInfo(bundleName1, (error, data) => { + console.log(`${callbackName1} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE); expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED); done(); - console.log(`==========${callbackName} ${describeName} end==========`); + console.log(`==========${callbackName1} ${describeName} end==========`); }); } catch (error) { - console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`); - console.log(`${callbackName} should not reach here`); + console.log(`${callbackName1} exception caught: ${JSON.stringify(error)})`); + console.log(`${callbackName1} should not reach here`); expect().assertFail(); + done() } }); @@ -112,48 +135,42 @@ export const getFormsInfoTest = (describeName, filterParameter) => { * @tc.number FMS_getFormsInfo_1000 * @tc.desc: Query specific form configuration information by wrong bundle name (by Promise) */ - it(`${promiseName}`, filterParameter, async (done) => { - console.log(`==========${promiseName} ${describeName} start==========`); + it(`${promiseName1}`, filterParameter, async (done) => { + console.log(`==========${promiseName1} ${describeName} start==========`); try { - const data = await formHost.getFormsInfo(bundleName); - console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`); - console.log(`${promiseName} should not reach here`); + const data = await formHost.getFormsInfo(bundleName1); + console.log(`${promiseName1} getFormsInfo data: ${JSON.stringify(data)}`); + console.log(`${promiseName1} should not reach here`); expect().assertFail(); + done() } catch (error) { - console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`); + console.log(`${promiseName1} exception caught: ${JSON.stringify(error)})`); expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE); expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED); done(); - console.log(`==========${promiseName} ${describeName} end==========`); + console.log(`==========${promiseName1} ${describeName} end==========`); } }); - }); - - describe(`${describeName}`, () => { - const callbackName = `FMS_getFormsInfo_1100 callback`; - const promiseName = `FMS_getFormsInfo_1100 promise`; - const bundleName = `com.ohos.st.formsystemproviderb`; - var tempDataB = undefined; /** * @tc.name: getFormsInfo * @tc.number: FMS_getFormsInfo_1100 * @tc.desc: Query specific form configuration information by correct bundle name (by AsyncCallback) */ - it(`${callbackName}`, filterParameter, async (done) => { - console.log(`==========${callbackName} ${describeName} start==========`); + it(`${callbackName2}`, filterParameter, async (done) => { + console.log(`==========${callbackName2} ${describeName} start==========`); try { - formHost.getFormsInfo(bundleName, (error, data) => { - console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); - console.log(`${callbackName} forms amount: ${data.length}`); + formHost.getFormsInfo(bundleName2, (error, data) => { + console.log(`${callbackName2} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + console.log(`${callbackName2} forms amount: ${data.length}`); const dataB = data.filter((form) => { return `com.ohos.st.formsystemproviderb` === form.bundleName; }); - console.log(`${callbackName} form dataB: ${JSON.stringify(dataB)}`); - console.log(`${callbackName} formB amount: ${dataB.length}`); + console.log(`${callbackName2} form dataB: ${JSON.stringify(dataB)}`); + console.log(`${callbackName2} formB amount: ${dataB.length}`); expect(data.length).assertEqual(1); expect(dataB.length).assertEqual(1); @@ -161,15 +178,16 @@ export const getFormsInfoTest = (describeName, filterParameter) => { expect(error.code).assertEqual(ERR_OK_CODE); expect(error.message).assertEqual(ERR_OK); done(); - console.log(`==========${callbackName} ${describeName} end==========`); + console.log(`==========${callbackName2} ${describeName} end==========`); }); await sleep(2000) checkDataB(tempDataB) done() } catch (error) { - console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`); - console.log(`${callbackName} should not reach here`); + console.log(`${callbackName2} exception caught: ${JSON.stringify(error)})`); + console.log(`${callbackName2} should not reach here`); expect().assertFail(); + done() } }); @@ -178,30 +196,31 @@ export const getFormsInfoTest = (describeName, filterParameter) => { * @tc.number FMS_getFormsInfo_1100 * @tc.desc: Query specific form configuration information by correct bundle name (by Promise) */ - it(`${promiseName}`, filterParameter, async (done) => { - console.log(`==========${promiseName} ${describeName} start==========`); + it(`${promiseName2}`, filterParameter, async (done) => { + console.log(`==========${promiseName2} ${describeName} start==========`); try { - const data = await formHost.getFormsInfo(bundleName); - console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`); - console.log(`${promiseName} forms amount: ${data.length}`); + const data = await formHost.getFormsInfo(bundleName2); + console.log(`${promiseName2} getFormsInfo data: ${JSON.stringify(data)}`); + console.log(`${promiseName2} forms amount: ${data.length}`); const dataB = data.filter((form) => { return `com.ohos.st.formsystemproviderb` === form.bundleName; }); - console.log(`${promiseName} form dataB: ${JSON.stringify(dataB)}`); - console.log(`${promiseName} formB amount: ${dataB.length}`); + console.log(`${promiseName2} form dataB: ${JSON.stringify(dataB)}`); + console.log(`${promiseName2} formB amount: ${dataB.length}`); expect(data.length).assertEqual(1); expect(dataB.length).assertEqual(1); tempDataB = dataB[0] checkDataB(tempDataB) done(); - console.log(`==========${promiseName} ${describeName} end==========`); + console.log(`==========${promiseName2} ${describeName} end==========`); } catch (error) { - console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`); - console.log(`${promiseName} should not reach here`); + console.log(`${promiseName2} exception caught: ${JSON.stringify(error)})`); + console.log(`${promiseName2} should not reach here`); expect().assertFail(); + done() } }); function checkDataB(formInfo){ @@ -226,34 +245,28 @@ export const getFormsInfoTest = (describeName, filterParameter) => { expect('originWidgetNameB').assertEqual(formInfo.metaData.customizeData[0].name) expect('valueB').assertEqual(formInfo.metaData.customizeData[0].value) } - }); - - describe(`${describeName}`, () => { - const callbackName = `FMS_getFormsInfo_1400 callback`; - const promiseName = `FMS_getFormsInfo_1400 promise`; - const bundleName = ``; - const moduleName = `form_module_c`; /** * @tc.name: getFormsInfo * @tc.number: FMS_getFormsInfo_1400 * @tc.desc: Query specific form configuration information by empty bundle name and correct module name (by AsyncCallback) */ - it(`${callbackName}`, filterParameter, async (done) => { - console.log(`==========${callbackName} ${describeName} start==========`); + it(`${callbackName3}`, filterParameter, async (done) => { + console.log(`==========${callbackName3} ${describeName} start==========`); try { - formHost.getFormsInfo(bundleName, moduleName, (error, data) => { - console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + formHost.getFormsInfo(bundleName3, moduleName, (error, data) => { + console.log(`${callbackName3} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); done(); - console.log(`==========${callbackName} ${describeName} end==========`); + console.log(`==========${callbackName3} ${describeName} end==========`); }); } catch (error) { - console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`); - console.log(`${callbackName} should not reach here`); + console.log(`${callbackName3} exception caught: ${JSON.stringify(error)})`); + console.log(`${callbackName3} should not reach here`); expect().assertFail(); + done() } }); @@ -262,49 +275,42 @@ export const getFormsInfoTest = (describeName, filterParameter) => { * @tc.number FMS_getFormsInfo_1400 * @tc.desc: Query specific form configuration information by empty bundle name and correct module name (by Promise) */ - it(`${promiseName}`, filterParameter, async (done) => { - console.log(`==========${promiseName} ${describeName} start==========`); + it(`${promiseName3}`, filterParameter, async (done) => { + console.log(`==========${promiseName3} ${describeName} start==========`); try { - const data = await formHost.getFormsInfo(bundleName, moduleName); - console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`); - console.log(`${promiseName} should not reach here`); + const data = await formHost.getFormsInfo(bundleName3, moduleName); + console.log(`${promiseName3} getFormsInfo data: ${JSON.stringify(data)}`); + console.log(`${promiseName3} should not reach here`); expect().assertFail(); } catch (error) { - console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`); + console.log(`${promiseName3} exception caught: ${JSON.stringify(error)})`); expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); done(); - console.log(`==========${promiseName} ${describeName} end==========`); + console.log(`==========${promiseName3} ${describeName} end==========`); } }); - }); - - describe(`${describeName}`, () => { - const callbackName = `FMS_getFormsInfo_1500 callback`; - const promiseName = `FMS_getFormsInfo_1500 promise`; - const bundleName = `wrong.bundle.name`; - const moduleName = `form_module_c`; /** * @tc.name: getFormsInfo * @tc.number: FMS_getFormsInfo_1500 * @tc.desc: Query specific form configuration information by wrong bundle name and correct module name (by AsyncCallback) */ - it(`${callbackName}`, filterParameter, async (done) => { - console.log(`==========${callbackName} ${describeName} start==========`); + it(`${callbackName4}`, filterParameter, async (done) => { + console.log(`==========${callbackName4} ${describeName} start==========`); try { - formHost.getFormsInfo(bundleName, moduleName, (error, data) => { - console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + formHost.getFormsInfo(bundleName4, moduleName1, (error, data) => { + console.log(`${callbackName4} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE); expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED); done(); - console.log(`==========${callbackName} ${describeName} end==========`); + console.log(`==========${callbackName4} ${describeName} end==========`); }); } catch (error) { - console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`); - console.log(`${callbackName} should not reach here`); + console.log(`${callbackName4} exception caught: ${JSON.stringify(error)})`); + console.log(`${callbackName4} should not reach here`); expect().assertFail(); } }); @@ -314,49 +320,42 @@ export const getFormsInfoTest = (describeName, filterParameter) => { * @tc.number FMS_getFormsInfo_1500 * @tc.desc: Query specific form configuration information by wrong bundle name and correct module name (by Promise) */ - it(`${promiseName}`, filterParameter, async (done) => { - console.log(`==========${promiseName} ${describeName} start==========`); + it(`${promiseName4}`, filterParameter, async (done) => { + console.log(`==========${promiseName4} ${describeName} start==========`); try { - const data = await formHost.getFormsInfo(bundleName, moduleName); - console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`); - console.log(`${promiseName} should not reach here`); + const data = await formHost.getFormsInfo(bundleName4, moduleName1); + console.log(`${promiseName4} getFormsInfo data: ${JSON.stringify(data)}`); + console.log(`${promiseName4} should not reach here`); expect().assertFail(); } catch (error) { - console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`); + console.log(`${promiseName4} exception caught: ${JSON.stringify(error)})`); expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE); expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED); done(); - console.log(`==========${promiseName} ${describeName} end==========`); + console.log(`==========${promiseName4} ${describeName} end==========`); } }); - }); - - describe(`${describeName}`, () => { - const callbackName = `FMS_getFormsInfo_1600 callback`; - const promiseName = `FMS_getFormsInfo_1600 promise`; - const bundleName = `com.ohos.st.formsystemproviderc`; - const moduleName = ``; /** * @tc.name: getFormsInfo * @tc.number: FMS_getFormsInfo_1600 * @tc.desc: Query specific form configuration information by correct bundle name and empty module name (by AsyncCallback) */ - it(`${callbackName}`, filterParameter, async (done) => { - console.log(`==========${callbackName} ${describeName} start==========`); + it(`${callbackName5}`, filterParameter, async (done) => { + console.log(`==========${callbackName5} ${describeName} start==========`); try { - formHost.getFormsInfo(bundleName, moduleName, (error, data) => { - console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + formHost.getFormsInfo(bundleName5, moduleName2, (error, data) => { + console.log(`${callbackName5} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); done(); - console.log(`==========${callbackName} ${describeName} end==========`); + console.log(`==========${callbackName5} ${describeName} end==========`); }); } catch (error) { - console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`); - console.log(`${callbackName} should not reach here`); + console.log(`${callbackName5} exception caught: ${JSON.stringify(error)})`); + console.log(`${callbackName5} should not reach here`); expect().assertFail(); } }); @@ -366,50 +365,43 @@ export const getFormsInfoTest = (describeName, filterParameter) => { * @tc.number FMS_getFormsInfo_1600 * @tc.desc: Query specific form configuration information by correct bundle name and empty module name (by Promise) */ - it(`${promiseName}`, filterParameter, async (done) => { - console.log(`==========${promiseName} ${describeName} start==========`); + it(`${promiseName5}`, filterParameter, async (done) => { + console.log(`==========${promiseName5} ${describeName} start==========`); try { - const data = await formHost.getFormsInfo(bundleName, moduleName); - console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`); - console.log(`${promiseName} should not reach here`); + const data = await formHost.getFormsInfo(bundleName5, moduleName2); + console.log(`${promiseName5} getFormsInfo data: ${JSON.stringify(data)}`); + console.log(`${promiseName5} should not reach here`); expect().assertFail(); } catch (error) { - console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`); + console.log(`${promiseName5} exception caught: ${JSON.stringify(error)})`); expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE); expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM); done(); - console.log(`==========${promiseName} ${describeName} end==========`); + console.log(`==========${promiseName5} ${describeName} end==========`); } }); - }); - - describe(`${describeName}`, () => { - const callbackName = `FMS_getFormsInfo_1700 callback`; - const promiseName = `FMS_getFormsInfo_1700 promise`; - const bundleName = `com.ohos.st.formsystemproviderc`; - const moduleName = `wrong.module.name`; /** * @tc.name: getFormsInfo * @tc.number: FMS_getFormsInfo_1700 * @tc.desc: Query specific form configuration information by correct bundle name and wrong module name (by AsyncCallback) */ - it(`${callbackName}`, filterParameter, async (done) => { - console.log(`==========${callbackName} ${describeName} start==========`); + it(`${callbackName6}`, filterParameter, async (done) => { + console.log(`==========${callbackName6} ${describeName} start==========`); try { - formHost.getFormsInfo(bundleName, moduleName, (error, data) => { - console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + formHost.getFormsInfo(bundleName6, moduleName3, (error, data) => { + console.log(`${callbackName6} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); expect(JSON.stringify(data)).assertEqual(`[]`); expect(error.code).assertEqual(ERR_OK_CODE); expect(error.message).assertEqual(ERR_OK); done(); - console.log(`==========${callbackName} ${describeName} end==========`); + console.log(`==========${callbackName6} ${describeName} end==========`); }); } catch (error) { - console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`); - console.log(`${callbackName} should not reach here`); + console.log(`${callbackName6} exception caught: ${JSON.stringify(error)})`); + console.log(`${callbackName6} should not reach here`); expect().assertFail(); } }); @@ -419,86 +411,54 @@ export const getFormsInfoTest = (describeName, filterParameter) => { * @tc.number FMS_getFormsInfo_1700 * @tc.desc: Query specific form configuration information by correct bundle name and wrong module name (by Promise) */ - it(`${promiseName}`, filterParameter, async (done) => { - console.log(`==========${promiseName} ${describeName} start==========`); + it(`${promiseName6}`, filterParameter, async (done) => { + console.log(`==========${promiseName6} ${describeName} start==========`); try { - const data = await formHost.getFormsInfo(bundleName, moduleName); - console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`); + const data = await formHost.getFormsInfo(bundleName6, moduleName3); + console.log(`${promiseName6} getFormsInfo data: ${JSON.stringify(data)}`); expect(JSON.stringify(data)).assertEqual(`[]`); done(); - console.log(`==========${promiseName} ${describeName} end==========`); + console.log(`==========${promiseName6} ${describeName} end==========`); } catch (error) { - console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`); - console.log(`${promiseName} should not reach here`); + console.log(`${promiseName6} exception caught: ${JSON.stringify(error)})`); + console.log(`${promiseName6} should not reach here`); expect().assertFail(); } }); - }); - - describe(`${describeName}`, () => { - const callbackName = `FMS_getFormsInfo_1800 callback`; - const promiseName = `FMS_getFormsInfo_1800 promise`; - const bundleName = `com.ohos.st.formsystemproviderc`; - const moduleName = `form_module_c`; - var tempDataC = undefined; - - const expectDataC = { - bundleName: 'com.ohos.st.formsystemproviderc', - moduleName: 'form_module_c', - abilityName: 'com.ohos.st.formsystemproviderc.MainAbility', - name: 'FormC_Js001', - description: 'form_description_FormC_Js001', - descriptionId: 30, - type: 1, - jsComponentName: 'card_c', - colorMode: 1, - isDefault: 1, - updateEnabled: 1, - isStatic:true, - window:{"autoDesignWidth":false,"designWidth":720}, - formVisibleNotify: 1, - formConfigAbility: 'abilityc', - updateDuration: 4, - scheduledUpdateTime: '15:30', - defaultDimension: 3, - supportDimensions: [3, 4], - metaData: { customizeData: [{ name: 'originWidgetNameC', value: 'valueC' }] }, - }; /** * @tc.name: getFormsInfo * @tc.number: FMS_getFormsInfo_1800 * @tc.desc: Query specific form configuration information by correct bundle name and correct module name (by AsyncCallback) */ - it(`${callbackName}`, filterParameter, async (done) => { - console.log(`==========${callbackName} ${describeName} start==========`); + it(`${callbackName7}`, filterParameter, async (done) => { + console.log(`==========${callbackName7} ${describeName} start==========`); try { - formHost.getFormsInfo(bundleName, moduleName, (error, data) => { - console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); - console.log(`${callbackName} forms amount: ${data.length}`); + formHost.getFormsInfo(bundleName7, moduleName4, (error, data) => { + console.log(`${callbackName7} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + console.log(`${callbackName7} forms amount: ${data.length}`); const dataC = data.filter((form) => { return `com.ohos.st.formsystemproviderc` === form.bundleName; }); - console.log(`${callbackName} form dataC: ${JSON.stringify(dataC)}`); - console.log(`${callbackName} formC amount: ${dataC.length}`); + console.log(`${callbackName7} form dataC: ${JSON.stringify(dataC)}`); + console.log(`${callbackName7} formC amount: ${dataC.length}`); tempDataC = dataC[0]; expect(data.length).assertEqual(1); expect(dataC.length).assertEqual(1); - //expect(JSON.stringify(dataC[0])).assertEqual(JSON.stringify(expectDataC)); expect(error.code).assertEqual(ERR_OK_CODE); expect(error.message).assertEqual(ERR_OK); - console.log(`==========${callbackName} ${describeName} end==========`); + console.log(`==========${callbackName7} ${describeName} end==========`); }); await sleep(2000) checkDataC(tempDataC) tempDataC = undefined; done(); } catch (error) { - console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`); - console.log(`${callbackName} should not reach here`); + console.log(`${callbackName7} exception caught: ${JSON.stringify(error)})`); + console.log(`${callbackName7} should not reach here`); expect().assertFail(); } }); @@ -508,30 +468,29 @@ export const getFormsInfoTest = (describeName, filterParameter) => { * @tc.number FMS_getFormsInfo_1800 * @tc.desc: Query specific form configuration information by correct bundle name and correct module name (by Promise) */ - it(`${promiseName}`, filterParameter, async (done) => { - console.log(`==========${promiseName} ${describeName} start==========`); + it(`${promiseName7}`, filterParameter, async (done) => { + console.log(`==========${promiseName7} ${describeName} start==========`); try { - const data = await formHost.getFormsInfo(bundleName, moduleName); - console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`); - console.log(`${promiseName} forms amount: ${data.length}`); + const data = await formHost.getFormsInfo(bundleName7, moduleName4); + console.log(`${promiseName7} getFormsInfo data: ${JSON.stringify(data)}`); + console.log(`${promiseName7} forms amount: ${data.length}`); const dataC = data.filter((form) => { return `com.ohos.st.formsystemproviderc` === form.bundleName; }); - console.log(`${promiseName} form dataC: ${JSON.stringify(dataC)}`); - console.log(`${promiseName} formC amount: ${dataC.length}`); + console.log(`${promiseName7} form dataC: ${JSON.stringify(dataC)}`); + console.log(`${promiseName7} formC amount: ${dataC.length}`); expect(data.length).assertEqual(1); expect(dataC.length).assertEqual(1); - //expect(JSON.stringify(dataC[0])).assertEqual(JSON.stringify(expectDataC)); tempDataC = dataC[0]; - console.log(`==========${promiseName} ${describeName} end==========`); + console.log(`==========${promiseName7} ${describeName} end==========`); checkDataC(tempDataC) done() } catch (error) { - console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`); - console.log(`${promiseName} should not reach here`); + console.log(`${promiseName7} exception caught: ${JSON.stringify(error)})`); + console.log(`${promiseName7} should not reach here`); expect().assertFail(); } }); diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/ets/MainAbility/test/List.test.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/ets/MainAbility/test/List.test.ets index 60eb766854deb0998cf820ea670bbbb39d0e7769..8da11d932e4bac650e08e9fb10c0feda64c4f4fd 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/ets/MainAbility/test/List.test.ets +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/ets/MainAbility/test/List.test.ets @@ -16,15 +16,6 @@ import { getAllFormsInfoTest } from './GetAllFormsInfo.test.ets'; import { getFormsInfoTest } from './GetFormsInfo.test.ets'; export default function testsuite() { - // FMS_getFormsInfo_0500 getAllFormsInfoTest(`GetAllFormsInfoTest`, 0); - // FMS_getFormsInfo_0900 - // FMS_getFormsInfo_1000 - // FMS_getFormsInfo_1100 - // FMS_getFormsInfo_1400 - // FMS_getFormsInfo_1500 - // FMS_getFormsInfo_1600 - // FMS_getFormsInfo_1700 fail - // FMS_getFormsInfo_1800 getFormsInfoTest(`GetFormsInfoTest`, 0); } diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/ets/MainAbility/test/GetAllFormsInfo.test.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/ets/MainAbility/test/GetAllFormsInfo.test.ets index 665295b6e660b6cec88eaafda932f7fe0bb57bd3..86ab2a9d690e138e69a5ae9a7ca82effde87be08 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/ets/MainAbility/test/GetAllFormsInfo.test.ets +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/ets/MainAbility/test/GetAllFormsInfo.test.ets @@ -66,6 +66,7 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => { console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`); console.log(`${promiseName} should not reach here`); expect().assertFail(); + done() } }); }); diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets index 9430b2008746ef922513aaaff9d4c76ec69ab72d..b21a6691837bf38add3998e16062c326b2be792b 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets @@ -21,9 +21,13 @@ export const getFormsInfoTest = (describeName, filterParameter) => { const ERR_PERMISSION_DENY = `does not have permission to use forms`; describe(`${describeName}`, () => { - const callbackName = `FMS_getFormsInfo_0800 callback`; - const promiseName = `FMS_getFormsInfo_0800 promise`; + const callbackName = `FMS_getFormsInfo_Callback_0800`; + const promiseName = `FMS_getFormsInfo_Promise_0800`; const bundleName = `1`; + const callbackName1 = `FMS_getFormsInfo_Callback_1300`; + const promiseName1 = `FMS_getFormsInfo_Promise_1300`; + const bundleName1 = `2`; + const moduleName = `a`; /** * @tc.name: getFormsInfo @@ -69,33 +73,26 @@ export const getFormsInfoTest = (describeName, filterParameter) => { console.log(`==========${promiseName} ${describeName} end==========`); } }); - }); - - describe(`${describeName}`, () => { - const callbackName = `FMS_getFormsInfo_1300 callback`; - const promiseName = `FMS_getFormsInfo_1300 promise`; - const bundleName = `2`; - const moduleName = `a`; /** * @tc.name: getFormsInfo * @tc.number: FMS_getFormsInfo_1300 * @tc.desc: Query specific form configuration information by bundle name and module name without permission (by AsyncCallback) */ - it(`${callbackName}`, filterParameter, async (done) => { - console.log(`==========${callbackName} ${describeName} start==========`); + it(`${callbackName1}`, filterParameter, async (done) => { + console.log(`==========${callbackName1} ${describeName} start==========`); try { - formHost.getFormsInfo(bundleName, moduleName, (error, data) => { - console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); + formHost.getFormsInfo(bundleName1, moduleName, (error, data) => { + console.log(`${callbackName1} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); expect(error.code).assertEqual(ERR_PERMISSION_DENY_CODE); expect(error.message).assertEqual(ERR_PERMISSION_DENY); done(); - console.log(`==========${callbackName} ${describeName} end==========`); + console.log(`==========${callbackName1} ${describeName} end==========`); }); } catch (error) { - console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`); - console.log(`${callbackName} should not reach here`); + console.log(`${callbackName1} exception caught: ${JSON.stringify(error)})`); + console.log(`${callbackName1} should not reach here`); expect().assertFail(); } }); @@ -105,20 +102,20 @@ export const getFormsInfoTest = (describeName, filterParameter) => { * @tc.number FMS_getFormsInfo_1300 * @tc.desc: Query specific form configuration information by bundle name and module name without permission (by Promise) */ - it(`${promiseName}`, filterParameter, async (done) => { - console.log(`==========${promiseName} ${describeName} start==========`); + it(`${promiseName1}`, filterParameter, async (done) => { + console.log(`==========${promiseName1} ${describeName} start==========`); try { - const data = await formHost.getFormsInfo(bundleName, moduleName); - console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`); - console.log(`${promiseName} should not reach here`); + const data = await formHost.getFormsInfo(bundleName1, moduleName); + console.log(`${promiseName1} getFormsInfo data: ${JSON.stringify(data)}`); + console.log(`${promiseName1} should not reach here`); expect().assertFail(); } catch (error) { - console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`); + console.log(`${promiseName1} exception caught: ${JSON.stringify(error)})`); expect(error.code).assertEqual(ERR_PERMISSION_DENY_CODE); expect(error.message).assertEqual(ERR_PERMISSION_DENY); done(); - console.log(`==========${promiseName} ${describeName} end==========`); + console.log(`==========${promiseName1} ${describeName} end==========`); } }); });