Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
31f9eb99
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看板
未验证
提交
31f9eb99
编写于
8月 28, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 28, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9894 同步修改涉及FormComponent的onError接口返回外部错误码和错误信息的XTS案例
Merge pull request !9894 from zhangdw521/fix_form_acts_error
上级
18fd4c1c
a078bbe3
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
13 addition
and
13 deletion
+13
-13
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/entry/src/main/ets/test/FmsAcquireForm.test.ets
...quiretest/entry/src/main/ets/test/FmsAcquireForm.test.ets
+9
-9
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/entry/src/main/ets/test/FmsAcquireForm2.test.ets
...iretest2/entry/src/main/ets/test/FmsAcquireForm2.test.ets
+4
-4
未找到文件。
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/entry/src/main/ets/test/FmsAcquireForm.test.ets
浏览文件 @
31f9eb99
...
...
@@ -82,7 +82,7 @@ export default function test() {
function
onErrorCallBack
(
_
,
data
)
{
console
.
info
(
"!!!====>FMS_acquireForm_0200 onErrorCallBack data:====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnError_commonEvent"
);
expect
(
data
.
data
)
.
assertEqual
(
"
check permission deny, need to request ohos.permission.REQUIRE_FORM or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
."
);
expect
(
data
.
data
)
.
assertEqual
(
"
Permissions denied
."
);
commonEvent
.
unsubscribe
(
subscriberOnError
,
()
=>
unsubscribeOnErrorCallback
(
"FMS_acquireForm_0200"
));
console
.
info
(
`FMS_acquireForm_0200 end`
);
done
();
...
...
@@ -123,7 +123,7 @@ export default function test() {
function
onErrorCallBack
(
_
,
data
)
{
console
.
info
(
"!!!====>FMS_acquireForm_0300 onErrorCallBack data:====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnError_commonEvent"
);
expect
(
data
.
data
)
.
assertEqual
(
"
invalid params received on operating form
."
);
expect
(
data
.
data
)
.
assertEqual
(
"
Parameter error
."
);
commonEvent
.
unsubscribe
(
subscriberOnError
,
()
=>
unsubscribeOnErrorCallback
(
"FMS_acquireForm_0300"
));
console
.
info
(
`FMS_acquireForm_0300 end`
);
done
();
...
...
@@ -164,7 +164,7 @@ export default function test() {
function
onErrorCallBack
(
_
,
data
)
{
console
.
info
(
"!!!====>FMS_acquireForm_0400 onErrorCallBack data:====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnError_commonEvent"
);
expect
(
data
.
data
)
.
assertEqual
(
"
invalid params received on operating form
."
);
expect
(
data
.
data
)
.
assertEqual
(
"
Parameter error
."
);
commonEvent
.
unsubscribe
(
subscriberOnError
,
()
=>
unsubscribeOnErrorCallback
(
"FMS_acquireForm_0400"
));
console
.
info
(
`FMS_acquireForm_0400 end`
);
done
();
...
...
@@ -205,7 +205,7 @@ export default function test() {
function
onErrorCallBack
(
_
,
data
)
{
console
.
info
(
"!!!====>FMS_acquireForm_0500 onErrorCallBack data:====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnError_commonEvent"
);
expect
(
data
.
data
)
.
assertEqual
(
"
invalid params received on operating form
."
);
expect
(
data
.
data
)
.
assertEqual
(
"
Parameter error
."
);
commonEvent
.
unsubscribe
(
subscriberOnError
,
()
=>
unsubscribeOnErrorCallback
(
"FMS_acquireForm_0500"
));
console
.
info
(
`FMS_acquireForm_0500 end`
);
done
();
...
...
@@ -246,7 +246,7 @@ export default function test() {
function
onErrorCallBack
(
_
,
data
)
{
console
.
info
(
"!!!====>FMS_acquireForm_0600 onErrorCallBack data:====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnError_commonEvent"
);
expect
(
data
.
data
)
.
assertEqual
(
"
invalid params received on operating form
."
);
expect
(
data
.
data
)
.
assertEqual
(
"
Parameter error
."
);
commonEvent
.
unsubscribe
(
subscriberOnError
,
()
=>
unsubscribeOnErrorCallback
(
"FMS_acquireForm_0600"
));
console
.
info
(
`FMS_acquireForm_0600 end`
);
done
();
...
...
@@ -287,7 +287,7 @@ export default function test() {
function
onErrorCallBack
(
_
,
data
)
{
console
.
info
(
"!!!====>FMS_acquireForm_0700 onErrorCallBack data:====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnError_commonEvent"
);
expect
(
data
.
data
)
.
assertEqual
(
"
invalid params received on operating form
."
);
expect
(
data
.
data
)
.
assertEqual
(
"
Parameter error
."
);
commonEvent
.
unsubscribe
(
subscriberOnError
,
()
=>
unsubscribeOnErrorCallback
(
"FMS_acquireForm_0700"
));
console
.
info
(
`FMS_acquireForm_0700 end`
);
done
();
...
...
@@ -328,7 +328,7 @@ export default function test() {
function
onErrorCallBack
(
_
,
data
)
{
console
.
info
(
"!!!====>FMS_acquireForm_1000 onErrorCallBack data:====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnError_commonEvent"
);
expect
(
data
.
data
)
.
assertEqual
(
"
invalid params received on operating form
."
);
expect
(
data
.
data
)
.
assertEqual
(
"
Parameter error
."
);
commonEvent
.
unsubscribe
(
subscriberOnError
,
()
=>
unsubscribeOnErrorCallback
(
"FMS_acquireForm_1000"
));
console
.
info
(
`FMS_acquireForm_1000 end`
);
done
();
...
...
@@ -547,7 +547,7 @@ export default function test() {
function
onErrorCallBack
(
_
,
data
)
{
console
.
info
(
"!!!====>FMS_acquireForm_1400 onErrorCallBack data:====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnError_commonEvent"
);
expect
(
data
.
data
)
.
assertEqual
(
"
the requested form id is not existed on fms.
"
);
expect
(
data
.
data
)
.
assertEqual
(
"
The ID of the form to be operated does not exist
"
);
commonEvent
.
unsubscribe
(
subscriberOnError
,
()
=>
unsubscribeOnErrorCallBackCache
(
"FMS_acquireForm_1400"
));
var
commonEventPublishData
=
{
data
:
formId
...
...
@@ -1259,7 +1259,7 @@ export default function test() {
function
onErrorCallBack
(
_
,
data
)
{
console
.
info
(
"!!!====>FMS_acquireForm_2100 onErrorCallBack data:====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnError_commonEvent"
);
expect
(
data
.
data
)
.
assertEqual
(
"
invalid params received on operating form
."
);
expect
(
data
.
data
)
.
assertEqual
(
"
Parameter error
."
);
commonEvent
.
unsubscribe
(
subscriberOnError
,
()
=>
unsubscribeOnErrorCallBackCache
(
"FMS_acquireForm_2100"
));
var
commonEventPublishData
=
{
data
:
formId
...
...
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/entry/src/main/ets/test/FmsAcquireForm2.test.ets
浏览文件 @
31f9eb99
...
...
@@ -85,7 +85,7 @@ export default function test() {
function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_3800 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent");
expect(data.data).assertEqual("
invalid params received on operating form
.");
expect(data.data).assertEqual("
Parameter error
.");
commonEvent.unsubscribe(subscriberOnError, () => {
console.info(`FMS_acquireForm_3800 unsubscribe callback`);
done();
...
...
@@ -127,7 +127,7 @@ export default function test() {
function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_3900 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent");
expect(data.data).assertEqual("
invalid params received on operating form
.");
expect(data.data).assertEqual("
Parameter error
.");
commonEvent.unsubscribe(subscriberOnError, () => {
console.info(`FMS_acquireForm_3900 unsubscribe callback`);
done();
...
...
@@ -172,7 +172,7 @@ export default function test() {
console.info("!!!====>FMS_acquireForm_4000 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent");
commonEvent.unsubscribe(subscriberOnError, () => unsubscribeOnErrorCallback("FMS_acquireForm_4000"));
expect(data.data).assertEqual("
the form id and form config are not matched.
");
expect(data.data).assertEqual("
The ID of the form to be operated does not exist
");
console.info(`FMS_acquireForm_4000 end`);
var commonEventPublishData = {
...
...
@@ -371,7 +371,7 @@ export default function test() {
function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_4400 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent");
expect(data.data).assertEqual("
the dimension not exist in the form
.");
expect(data.data).assertEqual("
Parameter error
.");
commonEvent.unsubscribe(subscriberOnError, () => {
console.info(`FMS_acquireForm_4400 unsubscribe callback`);
done();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录