提交 003121a1 编写于 作者: Z zhangdawei40 提交者: zhangdw521

fixed a078bbe3 from https://gitee.com/zhangdw521/xts_acts/pulls/9894

fix some ActsFormAcquireTest & ActsFormAcquire2Test
Signed-off-by: Nzhangdawei40 <zhangdawei40@huawei.com>
Change-Id: Ibabee8b9b01e1fd5156de0c7d07ad71cf634c3bc
上级 29995ca9
...@@ -82,7 +82,7 @@ export default function test() { ...@@ -82,7 +82,7 @@ export default function test() {
function onErrorCallBack(_, data) { function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_0200 onErrorCallBack data:====>" + JSON.stringify(data)); console.info("!!!====>FMS_acquireForm_0200 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent"); 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")); commonEvent.unsubscribe(subscriberOnError, () => unsubscribeOnErrorCallback("FMS_acquireForm_0200"));
console.info(`FMS_acquireForm_0200 end`); console.info(`FMS_acquireForm_0200 end`);
done(); done();
...@@ -123,7 +123,7 @@ export default function test() { ...@@ -123,7 +123,7 @@ export default function test() {
function onErrorCallBack(_, data) { function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_0300 onErrorCallBack data:====>" + JSON.stringify(data)); console.info("!!!====>FMS_acquireForm_0300 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent"); 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")); commonEvent.unsubscribe(subscriberOnError, () => unsubscribeOnErrorCallback("FMS_acquireForm_0300"));
console.info(`FMS_acquireForm_0300 end`); console.info(`FMS_acquireForm_0300 end`);
done(); done();
...@@ -164,7 +164,7 @@ export default function test() { ...@@ -164,7 +164,7 @@ export default function test() {
function onErrorCallBack(_, data) { function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_0400 onErrorCallBack data:====>" + JSON.stringify(data)); console.info("!!!====>FMS_acquireForm_0400 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent"); 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")); commonEvent.unsubscribe(subscriberOnError, () => unsubscribeOnErrorCallback("FMS_acquireForm_0400"));
console.info(`FMS_acquireForm_0400 end`); console.info(`FMS_acquireForm_0400 end`);
done(); done();
...@@ -205,7 +205,7 @@ export default function test() { ...@@ -205,7 +205,7 @@ export default function test() {
function onErrorCallBack(_, data) { function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_0500 onErrorCallBack data:====>" + JSON.stringify(data)); console.info("!!!====>FMS_acquireForm_0500 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent"); 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")); commonEvent.unsubscribe(subscriberOnError, () => unsubscribeOnErrorCallback("FMS_acquireForm_0500"));
console.info(`FMS_acquireForm_0500 end`); console.info(`FMS_acquireForm_0500 end`);
done(); done();
...@@ -246,7 +246,7 @@ export default function test() { ...@@ -246,7 +246,7 @@ export default function test() {
function onErrorCallBack(_, data) { function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_0600 onErrorCallBack data:====>" + JSON.stringify(data)); console.info("!!!====>FMS_acquireForm_0600 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent"); 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")); commonEvent.unsubscribe(subscriberOnError, () => unsubscribeOnErrorCallback("FMS_acquireForm_0600"));
console.info(`FMS_acquireForm_0600 end`); console.info(`FMS_acquireForm_0600 end`);
done(); done();
...@@ -287,7 +287,7 @@ export default function test() { ...@@ -287,7 +287,7 @@ export default function test() {
function onErrorCallBack(_, data) { function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_0700 onErrorCallBack data:====>" + JSON.stringify(data)); console.info("!!!====>FMS_acquireForm_0700 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent"); 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")); commonEvent.unsubscribe(subscriberOnError, () => unsubscribeOnErrorCallback("FMS_acquireForm_0700"));
console.info(`FMS_acquireForm_0700 end`); console.info(`FMS_acquireForm_0700 end`);
done(); done();
...@@ -328,7 +328,7 @@ export default function test() { ...@@ -328,7 +328,7 @@ export default function test() {
function onErrorCallBack(_, data) { function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_1000 onErrorCallBack data:====>" + JSON.stringify(data)); console.info("!!!====>FMS_acquireForm_1000 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent"); 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")); commonEvent.unsubscribe(subscriberOnError, () => unsubscribeOnErrorCallback("FMS_acquireForm_1000"));
console.info(`FMS_acquireForm_1000 end`); console.info(`FMS_acquireForm_1000 end`);
done(); done();
...@@ -547,7 +547,7 @@ export default function test() { ...@@ -547,7 +547,7 @@ export default function test() {
function onErrorCallBack(_, data) { function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_1400 onErrorCallBack data:====>" + JSON.stringify(data)); console.info("!!!====>FMS_acquireForm_1400 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent"); 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")); commonEvent.unsubscribe(subscriberOnError, () => unsubscribeOnErrorCallBackCache("FMS_acquireForm_1400"));
var commonEventPublishData = { var commonEventPublishData = {
data: formId data: formId
...@@ -1259,7 +1259,7 @@ export default function test() { ...@@ -1259,7 +1259,7 @@ export default function test() {
function onErrorCallBack(_, data) { function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_2100 onErrorCallBack data:====>" + JSON.stringify(data)); console.info("!!!====>FMS_acquireForm_2100 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent"); 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")); commonEvent.unsubscribe(subscriberOnError, () => unsubscribeOnErrorCallBackCache("FMS_acquireForm_2100"));
var commonEventPublishData = { var commonEventPublishData = {
data: formId data: formId
......
...@@ -85,7 +85,7 @@ export default function test() { ...@@ -85,7 +85,7 @@ export default function test() {
function onErrorCallBack(_, data) { function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_3800 onErrorCallBack data:====>" + JSON.stringify(data)); console.info("!!!====>FMS_acquireForm_3800 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent"); 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, () => { commonEvent.unsubscribe(subscriberOnError, () => {
console.info(`FMS_acquireForm_3800 unsubscribe callback`); console.info(`FMS_acquireForm_3800 unsubscribe callback`);
done(); done();
...@@ -127,7 +127,7 @@ export default function test() { ...@@ -127,7 +127,7 @@ export default function test() {
function onErrorCallBack(_, data) { function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_3900 onErrorCallBack data:====>" + JSON.stringify(data)); console.info("!!!====>FMS_acquireForm_3900 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent"); 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, () => { commonEvent.unsubscribe(subscriberOnError, () => {
console.info(`FMS_acquireForm_3900 unsubscribe callback`); console.info(`FMS_acquireForm_3900 unsubscribe callback`);
done(); done();
...@@ -172,7 +172,7 @@ export default function test() { ...@@ -172,7 +172,7 @@ export default function test() {
console.info("!!!====>FMS_acquireForm_4000 onErrorCallBack data:====>" + JSON.stringify(data)); console.info("!!!====>FMS_acquireForm_4000 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent"); expect(data.event).assertEqual("FMS_FormOnError_commonEvent");
commonEvent.unsubscribe(subscriberOnError, () => unsubscribeOnErrorCallback("FMS_acquireForm_4000")); 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`); console.info(`FMS_acquireForm_4000 end`);
var commonEventPublishData = { var commonEventPublishData = {
...@@ -371,7 +371,7 @@ export default function test() { ...@@ -371,7 +371,7 @@ export default function test() {
function onErrorCallBack(_, data) { function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_4400 onErrorCallBack data:====>" + JSON.stringify(data)); console.info("!!!====>FMS_acquireForm_4400 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent"); 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, () => { commonEvent.unsubscribe(subscriberOnError, () => {
console.info(`FMS_acquireForm_4400 unsubscribe callback`); console.info(`FMS_acquireForm_4400 unsubscribe callback`);
done(); done();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册