From a078bbe3f4b1a960e6c1f0979407f4e2f7a69956 Mon Sep 17 00:00:00 2001 From: zhangdawei40 Date: Sat, 26 Aug 2023 09:29:59 +0000 Subject: [PATCH] fix some ActsFormAcquireTest & ActsFormAcquire2Test Signed-off-by: zhangdawei40 Change-Id: Ibabee8b9b01e1fd5156de0c7d07ad71cf634c3bc --- .../src/main/ets/test/FmsAcquireForm.test.ets | 18 +++++++++--------- .../src/main/ets/test/FmsAcquireForm2.test.ets | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/entry/src/main/ets/test/FmsAcquireForm.test.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/entry/src/main/ets/test/FmsAcquireForm.test.ets index 335bc33a0..beb723152 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/entry/src/main/ets/test/FmsAcquireForm.test.ets +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/entry/src/main/ets/test/FmsAcquireForm.test.ets @@ -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 diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/entry/src/main/ets/test/FmsAcquireForm2.test.ets b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/entry/src/main/ets/test/FmsAcquireForm2.test.ets index 04066271e..40ccc7104 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/entry/src/main/ets/test/FmsAcquireForm2.test.ets +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/entry/src/main/ets/test/FmsAcquireForm2.test.ets @@ -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(); -- GitLab