Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
717ac35c
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
717ac35c
编写于
7月 18, 2022
作者:
O
openharmony_ci
提交者:
Gitee
7月 18, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4361 XTS元能力blocked用例适配
Merge pull request !4361 from chengxingzhen/master
上级
bc2669d9
4377618f
变更
43
隐藏空白更改
内联
并排
Showing
43 changed file
with
273 addition
and
312 deletion
+273
-312
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/BUILD.gn
...ime/formmanager/fa/formhostst_ets/formsystemhost/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/Test.json
...me/formmanager/fa/formhostst_ets/formsystemhost/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/BUILD.gn
...me/formmanager/fa/formhostst_ets/formsystemhostb/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/Test.json
...e/formmanager/fa/formhostst_ets/formsystemhostb/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/BUILD.gn
...me/formmanager/fa/formhostst_ets/formsystemhostc/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/Test.json
...e/formmanager/fa/formhostst_ets/formsystemhostc/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/BUILD.gn
...me/formmanager/fa/formhostst_ets/formsystemhostd/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/Test.json
...e/formmanager/fa/formhostst_ets/formsystemhostd/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/BUILD.gn
...me/formmanager/fa/formhostst_ets/formsystemhoste/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/Test.json
...e/formmanager/fa/formhostst_ets/formsystemhoste/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/BUILD.gn
...me/formmanager/fa/formhostst_ets/formsystemhostf/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/Test.json
...e/formmanager/fa/formhostst_ets/formsystemhostf/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/BUILD.gn
...me/formmanager/fa/formhostst_ets/formsystemhostg/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/Test.json
...e/formmanager/fa/formhostst_ets/formsystemhostg/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/BUILD.gn
...me/formmanager/fa/formhostst_ets/formsystemhosti/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/Test.json
...e/formmanager/fa/formhostst_ets/formsystemhosti/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/BUILD.gn
...me/formmanager/fa/formhostst_ets/formsystemhostj/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/Test.json
...e/formmanager/fa/formhostst_ets/formsystemhostj/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/BUILD.gn
...me/formmanager/fa/formhostst_ets/formsystemhostk/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/Test.json
...e/formmanager/fa/formhostst_ets/formsystemhostk/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/BUILD.gn
...me/formmanager/fa/formhostst_ets/formsystemhostl/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/Test.json
...e/formmanager/fa/formhostst_ets/formsystemhostl/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/BUILD.gn
...me/formmanager/fa/formhostst_ets/formsystemhostn/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/Test.json
...e/formmanager/fa/formhostst_ets/formsystemhostn/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/BUILD.gn
...rmmanager/fa/formhostst_ets/formsystemhostnoperm/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/Test.json
...mmanager/fa/formhostst_ets/formsystemhostnoperm/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/BUILD.gn
...me/formmanager/fa/formhostst_ets/formsystemhosto/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/Test.json
...e/formmanager/fa/formhostst_ets/formsystemhosto/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/BUILD.gn
...me/formmanager/fa/formhostst_ets/formsystemhostp/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/Test.json
...e/formmanager/fa/formhostst_ets/formsystemhostp/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/BUILD.gn
...anager/fa/formproviderst_ets/formsystemprovidera/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/Test.json
...nager/fa/formproviderst_ets/formsystemprovidera/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/BUILD.gn
...anager/fa/formproviderst_ets/formsystemproviderb/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/Test.json
...nager/fa/formproviderst_ets/formsystemproviderb/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/BUILD.gn
...anager/fa/formproviderst_ets/formsystemproviderc/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/Test.json
...nager/fa/formproviderst_ets/formsystemproviderc/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/BUILD.gn
...anager/fa/formproviderst_ets/formsystemproviderd/BUILD.gn
+5
-1
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/Test.json
...nager/fa/formproviderst_ets/formsystemproviderd/Test.json
+0
-3
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/GetFormsInfoFuzz.test.ets
...y/src/main/ets/MainAbility/test/GetFormsInfoFuzz.test.ets
+12
-18
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets
...entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets
+145
-186
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/ets/MainAbility/test/List.test.ets
...onetest/entry/src/main/ets/MainAbility/test/List.test.ets
+0
-9
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/ets/MainAbility/test/GetAllFormsInfo.test.ets
...ry/src/main/ets/MainAbility/test/GetAllFormsInfo.test.ets
+1
-0
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets
...entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets
+20
-23
未找到文件。
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemHost") {
ohos_
hap
("FormSystemHost") {
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHost") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHost") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHost"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhost/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemHostB") {
ohos_
hap
("FormSystemHostB") {
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostB") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostB") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostB"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostb/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemHostC") {
ohos_
hap
("FormSystemHostC") {
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostC") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostC") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostC"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostc/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemHostD") {
ohos_
hap
("FormSystemHostD") {
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostD") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostD") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostD"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostd/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemHostE") {
ohos_
hap
("FormSystemHostE") {
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostE") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostE") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostE"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhoste/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemHostF") {
ohos_
hap
("FormSystemHostF") {
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostF") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostF") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostF"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostf/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemHostG") {
ohos_
hap
("FormSystemHostG") {
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostG") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostG") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostG"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostg/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemHostI") {
ohos_
hap
("FormSystemHostI") {
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostI") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostI") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostI"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosti/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemHostJ") {
ohos_
hap
("FormSystemHostJ") {
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostJ") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostJ") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostJ"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostj/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemHostK") {
ohos_
hap
("FormSystemHostK") {
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostK") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostK") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostK"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostk/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemHostL") {
ohos_
hap
("FormSystemHostL") {
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostL") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostL") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostL"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostl/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemHostN") {
ohos_
hap
("FormSystemHostN") {
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostN") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostN") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostN"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostn/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemHostNoPerm") {
ohos_
hap
("FormSystemHostNoPerm") {
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostNoPerm") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostNoPerm") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostNoPerm"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostnoperm/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemHostO") {
ohos_
hap
("FormSystemHostO") {
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostO") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostO") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostO"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhosto/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemHostP") {
ohos_
hap
("FormSystemHostP") {
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostP") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostP") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostP"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formhostst_ets/formsystemhostp/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemProviderA") {
ohos_
hap
("FormSystemProviderA") {
hap_name = "FormSystemProviderA"
hap_name = "FormSystemProviderA"
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderA") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderA") {
]
]
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemprovidera/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
\ No newline at end of file
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemProviderB") {
ohos_
hap
("FormSystemProviderB") {
hap_name = "FormSystemProviderB"
hap_name = "FormSystemProviderB"
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderB") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderB") {
]
]
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderb/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
\ No newline at end of file
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemProviderC") {
ohos_
hap
("FormSystemProviderC") {
hap_name = "FormSystemProviderC"
hap_name = "FormSystemProviderC"
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderC") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderC") {
]
]
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderc/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
\ No newline at end of file
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/BUILD.gn
浏览文件 @
717ac35c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_
js_hap_suite
("FormSystemProviderD") {
ohos_
hap
("FormSystemProviderD") {
hap_name = "FormSystemProviderD"
hap_name = "FormSystemProviderD"
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
deps = [
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderD") {
...
@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderD") {
]
]
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
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") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
source_dir = "./entry/src/main/ets/MainAbility"
...
...
ability/ability_runtime/formmanager/fa/formproviderst_ets/formsystemproviderd/Test.json
已删除
100644 → 0
浏览文件 @
bc2669d9
{
"description"
:
"Configuration for hjunit demo Tests"
}
\ No newline at end of file
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/GetFormsInfoFuzz.test.ets
浏览文件 @
717ac35c
...
@@ -24,8 +24,8 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
...
@@ -24,8 +24,8 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`;
const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`;
describe(`${describeName}`, () => {
describe(`${describeName}`, () => {
const callbackName = `FMS_fuzzTest_getinfo
bundle
`;
const callbackName = `FMS_fuzzTest_getinfo
module_callback
`;
const promiseName = `FMS_fuzzTest_getinfo
bundl
e`;
const promiseName = `FMS_fuzzTest_getinfo
module_promis
e`;
const length = DATA_TYPE_LIST.length;
const length = DATA_TYPE_LIST.length;
for (let i = 0; i < length; ++i) {
for (let i = 0; i < length; ++i) {
...
@@ -35,13 +35,13 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
...
@@ -35,13 +35,13 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
* @tc.number FMS_fuzzTest_getinfobundle_0100 ~ FMS_fuzzTest_getinfobundle_0800
* @tc.number FMS_fuzzTest_getinfobundle_0100 ~ FMS_fuzzTest_getinfobundle_0800
* @tc.desc Check whether the getFormsInfo interface can pass the fuzzy test (by AsyncCallback)
* @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 dataType = DATA_TYPE_LIST[i];
const bundleName = getFuzzData(dataType);
const bundleName = getFuzzData(dataType);
console.log(`
${callbackName}
${tcNumber} bundleName typeof: ${typeof bundleName}`);
console.log(`
FMS_fuzzTest_getinfobundle
${tcNumber} bundleName typeof: ${typeof bundleName}`);
try {
try {
formHost.getFormsInfo(bundleName, (error, data) => {
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();
expect(data).assertUndefined();
if (`STRING` === dataType) {
if (`STRING` === dataType) {
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
...
@@ -53,8 +53,8 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
...
@@ -53,8 +53,8 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
done();
done();
});
});
} catch (error) {
} catch (error) {
console.log(`
${callbackName}
${tcNumber} exception caught: ${JSON.stringify(error)}`);
console.log(`
FMS_fuzzTest_getinfobundle
${tcNumber} exception caught: ${JSON.stringify(error)}`);
console.log(`
${callbackName}
${tcNumber} should not reach here`);
console.log(`
FMS_fuzzTest_getinfobundle
${tcNumber} should not reach here`);
expect().assertFail();
expect().assertFail();
}
}
});
});
...
@@ -68,17 +68,17 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
...
@@ -68,17 +68,17 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
* @tc.number FMS_fuzzTest_getinfobundle_0900 ~ FMS_fuzzTest_getinfobundle_1600
* @tc.number FMS_fuzzTest_getinfobundle_0900 ~ FMS_fuzzTest_getinfobundle_1600
* @tc.desc Check whether the getFormsInfo interface can pass the fuzzy test (by Promise)
* @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 dataType = DATA_TYPE_LIST[i];
const bundleName = getFuzzData(dataType);
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 {
try {
const data = await formHost.getFormsInfo(bundleName);
const data = await formHost.getFormsInfo(bundleName);
console.log(`
${promiseName}
${tcNumber} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`
FMS_fuzzTest_getinfobundle
${tcNumber} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`
${promiseName}
${tcNumber} should not reach here`);
console.log(`
FMS_fuzzTest_getinfobundle
${tcNumber} should not reach here`);
expect().assertFail();
expect().assertFail();
} catch (error) {
} 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) {
if (`STRING` === dataType) {
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
...
@@ -90,12 +90,6 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
...
@@ -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) {
for (let i = 0; i < length; ++i) {
const tcNumber = `0${(i + 1) * 100}`;
const tcNumber = `0${(i + 1) * 100}`;
...
...
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets
浏览文件 @
717ac35c
...
@@ -29,9 +29,37 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
...
@@ -29,9 +29,37 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
}
}
describe(`${describeName}`, () => {
describe(`${describeName}`, () => {
const callbackName = `FMS_getFormsInfo_
0900 callback
`;
const callbackName = `FMS_getFormsInfo_
Callback_0900
`;
const promiseName = `FMS_getFormsInfo_
0900 promise
`;
const promiseName = `FMS_getFormsInfo_
Promise_0900
`;
const bundleName = ``;
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
* @tc.name: getFormsInfo
...
@@ -77,33 +105,28 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
...
@@ -77,33 +105,28 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
console.log(`==========${promiseName} ${describeName} end==========`);
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.name: getFormsInfo
* @tc.number: FMS_getFormsInfo_1000
* @tc.number: FMS_getFormsInfo_1000
* @tc.desc: Query specific form configuration information by wrong bundle name (by AsyncCallback)
* @tc.desc: Query specific form configuration information by wrong bundle name (by AsyncCallback)
*/
*/
it(`${callbackName}`, filterParameter, async (done) => {
it(`${callbackName
1
}`, filterParameter, async (done) => {
console.log(`==========${callbackName} ${describeName} start==========`);
console.log(`==========${callbackName
1
} ${describeName} start==========`);
try {
try {
formHost.getFormsInfo(bundleName, (error, data) => {
formHost.getFormsInfo(bundleName
1
, (error, data) => {
console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
console.log(`${callbackName
1
} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
done();
done();
console.log(`==========${callbackName} ${describeName} end==========`);
console.log(`==========${callbackName
1
} ${describeName} end==========`);
});
});
} catch (error) {
} catch (error) {
console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName
1
} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName} should not reach here`);
console.log(`${callbackName
1
} should not reach here`);
expect().assertFail();
expect().assertFail();
done()
}
}
});
});
...
@@ -112,48 +135,42 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
...
@@ -112,48 +135,42 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
* @tc.number FMS_getFormsInfo_1000
* @tc.number FMS_getFormsInfo_1000
* @tc.desc: Query specific form configuration information by wrong bundle name (by Promise)
* @tc.desc: Query specific form configuration information by wrong bundle name (by Promise)
*/
*/
it(`${promiseName}`, filterParameter, async (done) => {
it(`${promiseName
1
}`, filterParameter, async (done) => {
console.log(`==========${promiseName} ${describeName} start==========`);
console.log(`==========${promiseName
1
} ${describeName} start==========`);
try {
try {
const data = await formHost.getFormsInfo(bundleName);
const data = await formHost.getFormsInfo(bundleName
1
);
console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName
1
} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName} should not reach here`);
console.log(`${promiseName
1
} should not reach here`);
expect().assertFail();
expect().assertFail();
done()
} catch (error) {
} catch (error) {
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName
1
} exception caught: ${JSON.stringify(error)})`);
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
done();
done();
console.log(`==========${promiseName} ${describeName} end==========`);
console.log(`==========${promiseName
1
} ${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.name: getFormsInfo
* @tc.number: FMS_getFormsInfo_1100
* @tc.number: FMS_getFormsInfo_1100
* @tc.desc: Query specific form configuration information by correct bundle name (by AsyncCallback)
* @tc.desc: Query specific form configuration information by correct bundle name (by AsyncCallback)
*/
*/
it(`${callbackName}`, filterParameter, async (done) => {
it(`${callbackName
2
}`, filterParameter, async (done) => {
console.log(`==========${callbackName} ${describeName} start==========`);
console.log(`==========${callbackName
2
} ${describeName} start==========`);
try {
try {
formHost.getFormsInfo(bundleName, (error, data) => {
formHost.getFormsInfo(bundleName
2
, (error, data) => {
console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
console.log(`${callbackName
2
} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
console.log(`${callbackName} forms amount: ${data.length}`);
console.log(`${callbackName
2
} forms amount: ${data.length}`);
const dataB = data.filter((form) => {
const dataB = data.filter((form) => {
return `com.ohos.st.formsystemproviderb` === form.bundleName;
return `com.ohos.st.formsystemproviderb` === form.bundleName;
});
});
console.log(`${callbackName} form dataB: ${JSON.stringify(dataB)}`);
console.log(`${callbackName
2
} form dataB: ${JSON.stringify(dataB)}`);
console.log(`${callbackName} formB amount: ${dataB.length}`);
console.log(`${callbackName
2
} formB amount: ${dataB.length}`);
expect(data.length).assertEqual(1);
expect(data.length).assertEqual(1);
expect(dataB.length).assertEqual(1);
expect(dataB.length).assertEqual(1);
...
@@ -161,15 +178,16 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
...
@@ -161,15 +178,16 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
expect(error.code).assertEqual(ERR_OK_CODE);
expect(error.code).assertEqual(ERR_OK_CODE);
expect(error.message).assertEqual(ERR_OK);
expect(error.message).assertEqual(ERR_OK);
done();
done();
console.log(`==========${callbackName} ${describeName} end==========`);
console.log(`==========${callbackName
2
} ${describeName} end==========`);
});
});
await sleep(2000)
await sleep(2000)
checkDataB(tempDataB)
checkDataB(tempDataB)
done()
done()
} catch (error) {
} catch (error) {
console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName
2
} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName} should not reach here`);
console.log(`${callbackName
2
} should not reach here`);
expect().assertFail();
expect().assertFail();
done()
}
}
});
});
...
@@ -178,30 +196,31 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
...
@@ -178,30 +196,31 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
* @tc.number FMS_getFormsInfo_1100
* @tc.number FMS_getFormsInfo_1100
* @tc.desc: Query specific form configuration information by correct bundle name (by Promise)
* @tc.desc: Query specific form configuration information by correct bundle name (by Promise)
*/
*/
it(`${promiseName}`, filterParameter, async (done) => {
it(`${promiseName
2
}`, filterParameter, async (done) => {
console.log(`==========${promiseName} ${describeName} start==========`);
console.log(`==========${promiseName
2
} ${describeName} start==========`);
try {
try {
const data = await formHost.getFormsInfo(bundleName);
const data = await formHost.getFormsInfo(bundleName
2
);
console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName
2
} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName} forms amount: ${data.length}`);
console.log(`${promiseName
2
} forms amount: ${data.length}`);
const dataB = data.filter((form) => {
const dataB = data.filter((form) => {
return `com.ohos.st.formsystemproviderb` === form.bundleName;
return `com.ohos.st.formsystemproviderb` === form.bundleName;
});
});
console.log(`${promiseName} form dataB: ${JSON.stringify(dataB)}`);
console.log(`${promiseName
2
} form dataB: ${JSON.stringify(dataB)}`);
console.log(`${promiseName} formB amount: ${dataB.length}`);
console.log(`${promiseName
2
} formB amount: ${dataB.length}`);
expect(data.length).assertEqual(1);
expect(data.length).assertEqual(1);
expect(dataB.length).assertEqual(1);
expect(dataB.length).assertEqual(1);
tempDataB = dataB[0]
tempDataB = dataB[0]
checkDataB(tempDataB)
checkDataB(tempDataB)
done();
done();
console.log(`==========${promiseName} ${describeName} end==========`);
console.log(`==========${promiseName
2
} ${describeName} end==========`);
} catch (error) {
} catch (error) {
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName
2
} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName} should not reach here`);
console.log(`${promiseName
2
} should not reach here`);
expect().assertFail();
expect().assertFail();
done()
}
}
});
});
function checkDataB(formInfo){
function checkDataB(formInfo){
...
@@ -226,34 +245,28 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
...
@@ -226,34 +245,28 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
expect('originWidgetNameB').assertEqual(formInfo.metaData.customizeData[0].name)
expect('originWidgetNameB').assertEqual(formInfo.metaData.customizeData[0].name)
expect('valueB').assertEqual(formInfo.metaData.customizeData[0].value)
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.name: getFormsInfo
* @tc.number: FMS_getFormsInfo_1400
* @tc.number: FMS_getFormsInfo_1400
* @tc.desc: Query specific form configuration information by empty bundle name and correct module name (by AsyncCallback)
* @tc.desc: Query specific form configuration information by empty bundle name and correct module name (by AsyncCallback)
*/
*/
it(`${callbackName}`, filterParameter, async (done) => {
it(`${callbackName
3
}`, filterParameter, async (done) => {
console.log(`==========${callbackName} ${describeName} start==========`);
console.log(`==========${callbackName
3
} ${describeName} start==========`);
try {
try {
formHost.getFormsInfo(bundleName, moduleName, (error, data) => {
formHost.getFormsInfo(bundleName
3
, moduleName, (error, data) => {
console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
console.log(`${callbackName
3
} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE);
expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE);
expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM);
expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM);
done();
done();
console.log(`==========${callbackName} ${describeName} end==========`);
console.log(`==========${callbackName
3
} ${describeName} end==========`);
});
});
} catch (error) {
} catch (error) {
console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName
3
} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName} should not reach here`);
console.log(`${callbackName
3
} should not reach here`);
expect().assertFail();
expect().assertFail();
done()
}
}
});
});
...
@@ -262,49 +275,42 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
...
@@ -262,49 +275,42 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
* @tc.number FMS_getFormsInfo_1400
* @tc.number FMS_getFormsInfo_1400
* @tc.desc: Query specific form configuration information by empty bundle name and correct module name (by Promise)
* @tc.desc: Query specific form configuration information by empty bundle name and correct module name (by Promise)
*/
*/
it(`${promiseName}`, filterParameter, async (done) => {
it(`${promiseName
3
}`, filterParameter, async (done) => {
console.log(`==========${promiseName} ${describeName} start==========`);
console.log(`==========${promiseName
3
} ${describeName} start==========`);
try {
try {
const data = await formHost.getFormsInfo(bundleName, moduleName);
const data = await formHost.getFormsInfo(bundleName
3
, moduleName);
console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName
3
} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName} should not reach here`);
console.log(`${promiseName
3
} should not reach here`);
expect().assertFail();
expect().assertFail();
} catch (error) {
} catch (error) {
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName
3
} exception caught: ${JSON.stringify(error)})`);
expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE);
expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE);
expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM);
expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM);
done();
done();
console.log(`==========${promiseName} ${describeName} end==========`);
console.log(`==========${promiseName
3
} ${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.name: getFormsInfo
* @tc.number: FMS_getFormsInfo_1500
* @tc.number: FMS_getFormsInfo_1500
* @tc.desc: Query specific form configuration information by wrong bundle name and correct module name (by AsyncCallback)
* @tc.desc: Query specific form configuration information by wrong bundle name and correct module name (by AsyncCallback)
*/
*/
it(`${callbackName}`, filterParameter, async (done) => {
it(`${callbackName
4
}`, filterParameter, async (done) => {
console.log(`==========${callbackName} ${describeName} start==========`);
console.log(`==========${callbackName
4
} ${describeName} start==========`);
try {
try {
formHost.getFormsInfo(bundleName
, moduleName
, (error, data) => {
formHost.getFormsInfo(bundleName
4, moduleName1
, (error, data) => {
console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
console.log(`${callbackName
4
} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
done();
done();
console.log(`==========${callbackName} ${describeName} end==========`);
console.log(`==========${callbackName
4
} ${describeName} end==========`);
});
});
} catch (error) {
} catch (error) {
console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName
4
} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName} should not reach here`);
console.log(`${callbackName
4
} should not reach here`);
expect().assertFail();
expect().assertFail();
}
}
});
});
...
@@ -314,49 +320,42 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
...
@@ -314,49 +320,42 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
* @tc.number FMS_getFormsInfo_1500
* @tc.number FMS_getFormsInfo_1500
* @tc.desc: Query specific form configuration information by wrong bundle name and correct module name (by Promise)
* @tc.desc: Query specific form configuration information by wrong bundle name and correct module name (by Promise)
*/
*/
it(`${promiseName}`, filterParameter, async (done) => {
it(`${promiseName
4
}`, filterParameter, async (done) => {
console.log(`==========${promiseName} ${describeName} start==========`);
console.log(`==========${promiseName
4
} ${describeName} start==========`);
try {
try {
const data = await formHost.getFormsInfo(bundleName
, moduleName
);
const data = await formHost.getFormsInfo(bundleName
4, moduleName1
);
console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName
4
} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName} should not reach here`);
console.log(`${promiseName
4
} should not reach here`);
expect().assertFail();
expect().assertFail();
} catch (error) {
} catch (error) {
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName
4
} exception caught: ${JSON.stringify(error)})`);
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
done();
done();
console.log(`==========${promiseName} ${describeName} end==========`);
console.log(`==========${promiseName
4
} ${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.name: getFormsInfo
* @tc.number: FMS_getFormsInfo_1600
* @tc.number: FMS_getFormsInfo_1600
* @tc.desc: Query specific form configuration information by correct bundle name and empty module name (by AsyncCallback)
* @tc.desc: Query specific form configuration information by correct bundle name and empty module name (by AsyncCallback)
*/
*/
it(`${callbackName}`, filterParameter, async (done) => {
it(`${callbackName
5
}`, filterParameter, async (done) => {
console.log(`==========${callbackName} ${describeName} start==========`);
console.log(`==========${callbackName
5
} ${describeName} start==========`);
try {
try {
formHost.getFormsInfo(bundleName
, moduleName
, (error, data) => {
formHost.getFormsInfo(bundleName
5, moduleName2
, (error, data) => {
console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
console.log(`${callbackName
5
} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE);
expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE);
expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM);
expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM);
done();
done();
console.log(`==========${callbackName} ${describeName} end==========`);
console.log(`==========${callbackName
5
} ${describeName} end==========`);
});
});
} catch (error) {
} catch (error) {
console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName
5
} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName} should not reach here`);
console.log(`${callbackName
5
} should not reach here`);
expect().assertFail();
expect().assertFail();
}
}
});
});
...
@@ -366,50 +365,43 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
...
@@ -366,50 +365,43 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
* @tc.number FMS_getFormsInfo_1600
* @tc.number FMS_getFormsInfo_1600
* @tc.desc: Query specific form configuration information by correct bundle name and empty module name (by Promise)
* @tc.desc: Query specific form configuration information by correct bundle name and empty module name (by Promise)
*/
*/
it(`${promiseName}`, filterParameter, async (done) => {
it(`${promiseName
5
}`, filterParameter, async (done) => {
console.log(`==========${promiseName} ${describeName} start==========`);
console.log(`==========${promiseName
5
} ${describeName} start==========`);
try {
try {
const data = await formHost.getFormsInfo(bundleName
, moduleName
);
const data = await formHost.getFormsInfo(bundleName
5, moduleName2
);
console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName
5
} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName} should not reach here`);
console.log(`${promiseName
5
} should not reach here`);
expect().assertFail();
expect().assertFail();
} catch (error) {
} catch (error) {
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName
5
} exception caught: ${JSON.stringify(error)})`);
expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE);
expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE);
expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM);
expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM);
done();
done();
console.log(`==========${promiseName} ${describeName} end==========`);
console.log(`==========${promiseName
5
} ${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.name: getFormsInfo
* @tc.number: FMS_getFormsInfo_1700
* @tc.number: FMS_getFormsInfo_1700
* @tc.desc: Query specific form configuration information by correct bundle name and wrong module name (by AsyncCallback)
* @tc.desc: Query specific form configuration information by correct bundle name and wrong module name (by AsyncCallback)
*/
*/
it(`${callbackName}`, filterParameter, async (done) => {
it(`${callbackName
6
}`, filterParameter, async (done) => {
console.log(`==========${callbackName} ${describeName} start==========`);
console.log(`==========${callbackName
6
} ${describeName} start==========`);
try {
try {
formHost.getFormsInfo(bundleName
, moduleName
, (error, data) => {
formHost.getFormsInfo(bundleName
6, moduleName3
, (error, data) => {
console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
console.log(`${callbackName
6
} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
expect(JSON.stringify(data)).assertEqual(`[]`);
expect(JSON.stringify(data)).assertEqual(`[]`);
expect(error.code).assertEqual(ERR_OK_CODE);
expect(error.code).assertEqual(ERR_OK_CODE);
expect(error.message).assertEqual(ERR_OK);
expect(error.message).assertEqual(ERR_OK);
done();
done();
console.log(`==========${callbackName} ${describeName} end==========`);
console.log(`==========${callbackName
6
} ${describeName} end==========`);
});
});
} catch (error) {
} catch (error) {
console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName
6
} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName} should not reach here`);
console.log(`${callbackName
6
} should not reach here`);
expect().assertFail();
expect().assertFail();
}
}
});
});
...
@@ -419,86 +411,54 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
...
@@ -419,86 +411,54 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
* @tc.number FMS_getFormsInfo_1700
* @tc.number FMS_getFormsInfo_1700
* @tc.desc: Query specific form configuration information by correct bundle name and wrong module name (by Promise)
* @tc.desc: Query specific form configuration information by correct bundle name and wrong module name (by Promise)
*/
*/
it(`${promiseName}`, filterParameter, async (done) => {
it(`${promiseName
6
}`, filterParameter, async (done) => {
console.log(`==========${promiseName} ${describeName} start==========`);
console.log(`==========${promiseName
6
} ${describeName} start==========`);
try {
try {
const data = await formHost.getFormsInfo(bundleName
, moduleName
);
const data = await formHost.getFormsInfo(bundleName
6, moduleName3
);
console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName
6
} getFormsInfo data: ${JSON.stringify(data)}`);
expect(JSON.stringify(data)).assertEqual(`[]`);
expect(JSON.stringify(data)).assertEqual(`[]`);
done();
done();
console.log(`==========${promiseName} ${describeName} end==========`);
console.log(`==========${promiseName
6
} ${describeName} end==========`);
} catch (error) {
} catch (error) {
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName
6
} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName} should not reach here`);
console.log(`${promiseName
6
} should not reach here`);
expect().assertFail();
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.name: getFormsInfo
* @tc.number: FMS_getFormsInfo_1800
* @tc.number: FMS_getFormsInfo_1800
* @tc.desc: Query specific form configuration information by correct bundle name and correct module name (by AsyncCallback)
* @tc.desc: Query specific form configuration information by correct bundle name and correct module name (by AsyncCallback)
*/
*/
it(`${callbackName}`, filterParameter, async (done) => {
it(`${callbackName
7
}`, filterParameter, async (done) => {
console.log(`==========${callbackName} ${describeName} start==========`);
console.log(`==========${callbackName
7
} ${describeName} start==========`);
try {
try {
formHost.getFormsInfo(bundleName
, moduleName
, (error, data) => {
formHost.getFormsInfo(bundleName
7, moduleName4
, (error, data) => {
console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
console.log(`${callbackName
7
} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
console.log(`${callbackName} forms amount: ${data.length}`);
console.log(`${callbackName
7
} forms amount: ${data.length}`);
const dataC = data.filter((form) => {
const dataC = data.filter((form) => {
return `com.ohos.st.formsystemproviderc` === form.bundleName;
return `com.ohos.st.formsystemproviderc` === form.bundleName;
});
});
console.log(`${callbackName} form dataC: ${JSON.stringify(dataC)}`);
console.log(`${callbackName
7
} form dataC: ${JSON.stringify(dataC)}`);
console.log(`${callbackName} formC amount: ${dataC.length}`);
console.log(`${callbackName
7
} formC amount: ${dataC.length}`);
tempDataC = dataC[0];
tempDataC = dataC[0];
expect(data.length).assertEqual(1);
expect(data.length).assertEqual(1);
expect(dataC.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.code).assertEqual(ERR_OK_CODE);
expect(error.message).assertEqual(ERR_OK);
expect(error.message).assertEqual(ERR_OK);
console.log(`==========${callbackName} ${describeName} end==========`);
console.log(`==========${callbackName
7
} ${describeName} end==========`);
});
});
await sleep(2000)
await sleep(2000)
checkDataC(tempDataC)
checkDataC(tempDataC)
tempDataC = undefined;
tempDataC = undefined;
done();
done();
} catch (error) {
} catch (error) {
console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName
7
} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName} should not reach here`);
console.log(`${callbackName
7
} should not reach here`);
expect().assertFail();
expect().assertFail();
}
}
});
});
...
@@ -508,30 +468,29 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
...
@@ -508,30 +468,29 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
* @tc.number FMS_getFormsInfo_1800
* @tc.number FMS_getFormsInfo_1800
* @tc.desc: Query specific form configuration information by correct bundle name and correct module name (by Promise)
* @tc.desc: Query specific form configuration information by correct bundle name and correct module name (by Promise)
*/
*/
it(`${promiseName}`, filterParameter, async (done) => {
it(`${promiseName
7
}`, filterParameter, async (done) => {
console.log(`==========${promiseName} ${describeName} start==========`);
console.log(`==========${promiseName
7
} ${describeName} start==========`);
try {
try {
const data = await formHost.getFormsInfo(bundleName
, moduleName
);
const data = await formHost.getFormsInfo(bundleName
7, moduleName4
);
console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName
7
} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName} forms amount: ${data.length}`);
console.log(`${promiseName
7
} forms amount: ${data.length}`);
const dataC = data.filter((form) => {
const dataC = data.filter((form) => {
return `com.ohos.st.formsystemproviderc` === form.bundleName;
return `com.ohos.st.formsystemproviderc` === form.bundleName;
});
});
console.log(`${promiseName} form dataC: ${JSON.stringify(dataC)}`);
console.log(`${promiseName
7
} form dataC: ${JSON.stringify(dataC)}`);
console.log(`${promiseName} formC amount: ${dataC.length}`);
console.log(`${promiseName
7
} formC amount: ${dataC.length}`);
expect(data.length).assertEqual(1);
expect(data.length).assertEqual(1);
expect(dataC.length).assertEqual(1);
expect(dataC.length).assertEqual(1);
//expect(JSON.stringify(dataC[0])).assertEqual(JSON.stringify(expectDataC));
tempDataC = dataC[0];
tempDataC = dataC[0];
console.log(`==========${promiseName} ${describeName} end==========`);
console.log(`==========${promiseName
7
} ${describeName} end==========`);
checkDataC(tempDataC)
checkDataC(tempDataC)
done()
done()
} catch (error) {
} catch (error) {
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName
7
} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName} should not reach here`);
console.log(`${promiseName
7
} should not reach here`);
expect().assertFail();
expect().assertFail();
}
}
});
});
...
...
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/ets/MainAbility/test/List.test.ets
浏览文件 @
717ac35c
...
@@ -16,15 +16,6 @@ import { getAllFormsInfoTest } from './GetAllFormsInfo.test.ets';
...
@@ -16,15 +16,6 @@ import { getAllFormsInfoTest } from './GetAllFormsInfo.test.ets';
import { getFormsInfoTest } from './GetFormsInfo.test.ets';
import { getFormsInfoTest } from './GetFormsInfo.test.ets';
export default function testsuite() {
export default function testsuite() {
// FMS_getFormsInfo_0500
getAllFormsInfoTest(`GetAllFormsInfoTest`, 0);
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);
getFormsInfoTest(`GetFormsInfoTest`, 0);
}
}
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/ets/MainAbility/test/GetAllFormsInfo.test.ets
浏览文件 @
717ac35c
...
@@ -66,6 +66,7 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
...
@@ -66,6 +66,7 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName} should not reach here`);
console.log(`${promiseName} should not reach here`);
expect().assertFail();
expect().assertFail();
done()
}
}
});
});
});
});
...
...
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formswithoutpermtest/entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets
浏览文件 @
717ac35c
...
@@ -21,9 +21,13 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
...
@@ -21,9 +21,13 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
const ERR_PERMISSION_DENY = `does not have permission to use forms`;
const ERR_PERMISSION_DENY = `does not have permission to use forms`;
describe(`${describeName}`, () => {
describe(`${describeName}`, () => {
const callbackName = `FMS_getFormsInfo_
0800 callback
`;
const callbackName = `FMS_getFormsInfo_
Callback_0800
`;
const promiseName = `FMS_getFormsInfo_
0800 promise
`;
const promiseName = `FMS_getFormsInfo_
Promise_0800
`;
const bundleName = `1`;
const bundleName = `1`;
const callbackName1 = `FMS_getFormsInfo_Callback_1300`;
const promiseName1 = `FMS_getFormsInfo_Promise_1300`;
const bundleName1 = `2`;
const moduleName = `a`;
/**
/**
* @tc.name: getFormsInfo
* @tc.name: getFormsInfo
...
@@ -69,33 +73,26 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
...
@@ -69,33 +73,26 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
console.log(`==========${promiseName} ${describeName} end==========`);
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.name: getFormsInfo
* @tc.number: FMS_getFormsInfo_1300
* @tc.number: FMS_getFormsInfo_1300
* @tc.desc: Query specific form configuration information by bundle name and module name without permission (by AsyncCallback)
* @tc.desc: Query specific form configuration information by bundle name and module name without permission (by AsyncCallback)
*/
*/
it(`${callbackName}`, filterParameter, async (done) => {
it(`${callbackName
1
}`, filterParameter, async (done) => {
console.log(`==========${callbackName} ${describeName} start==========`);
console.log(`==========${callbackName
1
} ${describeName} start==========`);
try {
try {
formHost.getFormsInfo(bundleName, moduleName, (error, data) => {
formHost.getFormsInfo(bundleName
1
, moduleName, (error, data) => {
console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
console.log(`${callbackName
1
} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
expect(error.code).assertEqual(ERR_PERMISSION_DENY_CODE);
expect(error.code).assertEqual(ERR_PERMISSION_DENY_CODE);
expect(error.message).assertEqual(ERR_PERMISSION_DENY);
expect(error.message).assertEqual(ERR_PERMISSION_DENY);
done();
done();
console.log(`==========${callbackName} ${describeName} end==========`);
console.log(`==========${callbackName
1
} ${describeName} end==========`);
});
});
} catch (error) {
} catch (error) {
console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName
1
} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName} should not reach here`);
console.log(`${callbackName
1
} should not reach here`);
expect().assertFail();
expect().assertFail();
}
}
});
});
...
@@ -105,20 +102,20 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
...
@@ -105,20 +102,20 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
* @tc.number FMS_getFormsInfo_1300
* @tc.number FMS_getFormsInfo_1300
* @tc.desc: Query specific form configuration information by bundle name and module name without permission (by Promise)
* @tc.desc: Query specific form configuration information by bundle name and module name without permission (by Promise)
*/
*/
it(`${promiseName}`, filterParameter, async (done) => {
it(`${promiseName
1
}`, filterParameter, async (done) => {
console.log(`==========${promiseName} ${describeName} start==========`);
console.log(`==========${promiseName
1
} ${describeName} start==========`);
try {
try {
const data = await formHost.getFormsInfo(bundleName, moduleName);
const data = await formHost.getFormsInfo(bundleName
1
, moduleName);
console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName
1
} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName} should not reach here`);
console.log(`${promiseName
1
} should not reach here`);
expect().assertFail();
expect().assertFail();
} catch (error) {
} catch (error) {
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName
1
} exception caught: ${JSON.stringify(error)})`);
expect(error.code).assertEqual(ERR_PERMISSION_DENY_CODE);
expect(error.code).assertEqual(ERR_PERMISSION_DENY_CODE);
expect(error.message).assertEqual(ERR_PERMISSION_DENY);
expect(error.message).assertEqual(ERR_PERMISSION_DENY);
done();
done();
console.log(`==========${promiseName} ${describeName} end==========`);
console.log(`==========${promiseName
1
} ${describeName} end==========`);
}
}
});
});
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录