Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
3170b87c
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看板
未验证
提交
3170b87c
编写于
7月 06, 2022
作者:
O
openharmony_ci
提交者:
Gitee
7月 06, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4154 元能力失败用例整改和编译预警修改
Merge pull request !4154 from chengxingzhen/master
上级
5def29c8
899e659b
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
343 addition
and
112 deletion
+343
-112
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/VerificationTest.ets
...coverhaptest/entry/src/main/ets/test/VerificationTest.ets
+3
-2
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/entry/src/main/ets/MainAbility/test/FmsAcquireForm.test.ets
...try/src/main/ets/MainAbility/test/FmsAcquireForm.test.ets
+85
-35
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/entry/src/main/ets/MainAbility/test/FmsAcquireForm2.test.ets
...ry/src/main/ets/MainAbility/test/FmsAcquireForm2.test.ets
+36
-11
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/entry/src/main/ets/MainAbility/test/FmsDeleteForm.test.ets
...ntry/src/main/ets/MainAbility/test/FmsDeleteForm.test.ets
+40
-5
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
+2
-2
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandzerotest/entry/src/main/ets/MainAbility/test/GetAllFormsInfo.test.ets
...ry/src/main/ets/MainAbility/test/GetAllFormsInfo.test.ets
+6
-2
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formreleasetest/entry/src/main/ets/MainAbility/test/FmsReleaseForm.test.ets
...try/src/main/ets/MainAbility/test/FmsReleaseForm.test.ets
+30
-4
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_disable/entry/src/main/ets/MainAbility/test/FmsFormStateDisable.test.ets
...rc/main/ets/MainAbility/test/FmsFormStateDisable.test.ets
+46
-18
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/entry/src/main/ets/MainAbility/test/FmsFormStateEnable.test.ets
...src/main/ets/MainAbility/test/FmsFormStateEnable.test.ets
+58
-28
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible/entry/src/main/ets/MainAbility/test/FmsFormStateNotifyInvisible.test.ets
...ets/MainAbility/test/FmsFormStateNotifyInvisible.test.ets
+9
-3
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible2/entry/src/main/ets/MainAbility/test/FmsFormStateNotifyInvisible2.test.ets
...ts/MainAbility/test/FmsFormStateNotifyInvisible2.test.ets
+28
-2
未找到文件。
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/VerificationTest.ets
浏览文件 @
3170b87c
...
...
@@ -183,7 +183,8 @@ export default function verificationTest(abilityContext){
screenDensity = data.parameters.screenDensity
}
if (data.event == "Stage_MainAbility4_onDestroy") {
expect(screenDensity).assertEqual(240);
expect(typeof screenDensity).assertEqual("number");
expect(screenDensity).assertLarger(0);
commonEvent.unsubscribe(subscriber, UnSubscribeInfoCallback)
}
}
...
...
@@ -571,4 +572,4 @@ export default function verificationTest(abilityContext){
}
})
})
}
\ No newline at end of file
}
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest/entry/src/main/ets/MainAbility/test/FmsAcquireForm.test.ets
浏览文件 @
3170b87c
此差异已折叠。
点击以展开。
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formacquiretest2/entry/src/main/ets/MainAbility/test/FmsAcquireForm2.test.ets
浏览文件 @
3170b87c
...
...
@@ -58,9 +58,11 @@ export default function test() {
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.");
commonEvent.unsubscribe(subscriberOnError, () => unsubscribeOnErrorCallback("FMS_acquireForm_3800"));
console.info(`FMS_acquireForm_3800 end`);
done();
commonEvent.unsubscribe(subscriberOnError, () => {
console.info(`FMS_acquireForm_3800 unsubscribe callback`);
done();
});
}
commonEvent.subscribe(subscriberOnError, onErrorCallBack);
console.info(`FMS_acquireForm_3800 featureAbility.startAbility start`);
...
...
@@ -82,6 +84,8 @@ export default function test() {
console.info(`FMS_acquireForm_3800 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`);
}).catch((err: any) => {
console.info(`FMS_acquireForm_3800 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`);
expect().assertFail();
done();
});
console.info(`FMS_acquireForm_3800 featureAbility.startAbility end`);
});
...
...
@@ -96,9 +100,10 @@ export default function test() {
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.");
commonEvent.unsubscribe(subscriberOnError, () => unsubscribeOnErrorCallback("FMS_acquireForm_3900"));
console.info(`FMS_acquireForm_3900 end`);
done();
commonEvent.unsubscribe(subscriberOnError, () => {
console.info(`FMS_acquireForm_3900 unsubscribe callback`);
done();
});
}
commonEvent.subscribe(subscriberOnError, onErrorCallBack);
console.info(`FMS_acquireForm_3900 featureAbility.startAbility start`);
...
...
@@ -120,6 +125,8 @@ export default function test() {
console.info(`FMS_acquireForm_3900 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`);
}).catch((err: any) => {
console.info(`FMS_acquireForm_3900 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`);
expect().assertFail();
done();
});
console.info(`FMS_acquireForm_3900 featureAbility.startAbility end`);
});
...
...
@@ -144,7 +151,8 @@ export default function test() {
data: formId
};
commonEvent.publish(deleteForm_Event, commonEventPublishData, (err) => {
console.info('FMS_acquireForm_4000 publish' + JSON.stringify(err));
console.info('FMS_acquireForm_4000 publish' + JSON.stringify(err));
done()
});
}
function onAcquiredCallBack(_, data) {
...
...
@@ -174,6 +182,8 @@ export default function test() {
console.info(`FMS_acquireForm_4000 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`);
}).catch((err: any) => {
console.info(`FMS_acquireForm_4000 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`);
expect().assertFail();
done();
});
console.info(`FMS_acquireForm_4000 featureAbility.startAbility again end`);
}
...
...
@@ -202,6 +212,8 @@ export default function test() {
console.info(`FMS_acquireForm_4000 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`);
}).catch((err: any) => {
console.info(`FMS_acquireForm_4000 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`);
expect().assertFail();
done();
});
console.info(`FMS_acquireForm_4000 featureAbility.startAbility end`);
});
...
...
@@ -273,6 +285,8 @@ export default function test() {
console.info(`FMS_acquireForm_4200 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`);
}).catch((err: any) => {
console.info(`FMS_acquireForm_4200 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`);
expect().assertFail();
done();
});
console.info(`FMS_acquireForm_4200 featureAbility.startAbility end`);
...
...
@@ -313,6 +327,8 @@ export default function test() {
console.info(`FMS_acquireForm_4300 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`);
}).catch((err: any) => {
console.info(`FMS_acquireForm_4300 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`);
expect().assertFail();
done();
});
console.info(`FMS_acquireForm_4300 featureAbility.startAbility end`);
});
...
...
@@ -327,10 +343,12 @@ export default function test() {
function onErrorCallBack(_, data) {
console.info("!!!====>FMS_acquireForm_4400 onErrorCallBack data:====>" + JSON.stringify(data));
expect(data.event).assertEqual("FMS_FormOnError_commonEvent");
commonEvent.unsubscribe(subscriberOnError, () => unsubscribeOnErrorCallback("FMS_acquireForm_4400"));
expect(data.data).assertEqual("the dimension not exist in the form.");
console.info(`FMS_acquireForm_4400 end`);
done();
commonEvent.unsubscribe(subscriberOnError, () => {
console.info(`FMS_acquireForm_4400 unsubscribe callback`);
done();
});
}
commonEvent.subscribe(subscriberOnError, onErrorCallBack);
console.info(`FMS_acquireForm_4400 featureAbility.startAbility start`);
...
...
@@ -353,6 +371,8 @@ export default function test() {
console.info(`FMS_acquireForm_4400 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`);
}).catch((err: any) => {
console.info(`FMS_acquireForm_4400 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`);
expect().assertFail();
done();
});
console.info(`FMS_acquireForm_4400 featureAbility.startAbility end`);
});
...
...
@@ -374,7 +394,8 @@ export default function test() {
data: data.parameters.formId
};
commonEvent.publish(deleteForm_Event, commonEventPublishData,(err) => {
console.info('FMS_acquireForm_4900 publish' + JSON.stringify(err));
console.info('FMS_acquireForm_4900 publish' + JSON.stringify(err));
done()
});
}
function onAcquiredCallBack(_, data) {
...
...
@@ -404,6 +425,8 @@ export default function test() {
console.info(`FMS_acquireForm_4900 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`);
}).catch((err: any) => {
console.info(`FMS_acquireForm_4900 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`);
expect().assertFail();
done();
});
console.info(`FMS_acquireForm_4900 featureAbility.startAbility again end`);
}
...
...
@@ -428,6 +451,8 @@ export default function test() {
console.info(`FMS_acquireForm_4900 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`);
}).catch((err: any) => {
console.info(`FMS_acquireForm_4900 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`);
expect().assertFail();
done();
});
console.info(`FMS_acquireForm_4900 featureAbility.startAbility end`);
});
...
...
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/entry/src/main/ets/MainAbility/test/FmsDeleteForm.test.ets
浏览文件 @
3170b87c
...
...
@@ -68,7 +68,8 @@ export default function test() {
data
:
formId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_deleteForm_0200 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_deleteForm_0200 publish'
+
JSON
.
stringify
(
err
));
done
()
});
};
commonEvent
.
subscribe
(
subscriberOnDeleted
,
onDeletedCallback
);
...
...
@@ -100,6 +101,8 @@ export default function test() {
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
info
(
`${tcNumber} featureAbility.startAbility again end`
);
};
...
...
@@ -146,7 +149,8 @@ export default function test() {
data
:
data
.
parameters
.
formId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_deleteForm_0300 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_deleteForm_0300 publish'
+
JSON
.
stringify
(
err
));
done
()
});
};
commonEvent
.
subscribe
(
subscriberOnDeleted
,
onDeletedCallback
);
...
...
@@ -172,6 +176,8 @@ export default function test() {
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
info
(
`${tcNumber} featureAbility.startAbility end`
);
});
...
...
@@ -194,7 +200,8 @@ export default function test() {
data
:
data
.
parameters
.
formId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_deleteForm_0400 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_deleteForm_0400 publish'
+
JSON
.
stringify
(
err
));
done
()
});
};
commonEvent
.
subscribe
(
subscriberOnDeleted
,
onDeletedCallback
);
...
...
@@ -220,6 +227,8 @@ export default function test() {
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
info
(
`${tcNumber} featureAbility.startAbility end`
);
});
...
...
@@ -244,7 +253,8 @@ export default function test() {
data
:
formId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_deleteForm_0500 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_deleteForm_0500 publish'
+
JSON
.
stringify
(
err
));
done
()
});
};
commonEvent
.
subscribe
(
subscriberOnDeleted
,
onDeletedCallback
);
...
...
@@ -276,6 +286,8 @@ export default function test() {
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
info
(
`${tcNumber} featureAbility.startAbility again end`
);
};
...
...
@@ -300,6 +312,8 @@ export default function test() {
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
info
(
`${tcNumber} featureAbility.startAbility end`
);
});
...
...
@@ -419,6 +433,8 @@ export default function test() {
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
info
(
`${tcNumber} featureAbility.startAbility end`
);
});
...
...
@@ -507,6 +523,8 @@ export default function test() {
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
info
(
`${tcNumber} featureAbility.startAbility again end`
);
};
...
...
@@ -540,6 +558,8 @@ export default function test() {
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
info
(
`${tcNumber} featureAbility.startAbility end`
);
});
...
...
@@ -640,6 +660,8 @@ export default function test() {
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
info
(
`${tcNumber} featureAbility.startAbility again end`
);
};
...
...
@@ -680,6 +702,8 @@ export default function test() {
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
info
(
`${tcNumber} featureAbility.startAbility end`
);
});
...
...
@@ -706,7 +730,8 @@ export default function test() {
data
:
formId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_deleteForm_0900 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_deleteForm_0900 publish'
+
JSON
.
stringify
(
err
));
done
()
});
}
...
...
@@ -741,6 +766,8 @@ export default function test() {
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
info
(
`${tcNumber} featureAbility.startAbility again end`
);
};
...
...
@@ -767,6 +794,8 @@ export default function test() {
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
info
(
`${tcNumber} featureAbility.startAbility end`
);
});
...
...
@@ -810,6 +839,8 @@ export default function test() {
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
info
(
`${tcNumber} featureAbility.startAbility again end`
);
}
...
...
@@ -936,6 +967,8 @@ export default function test() {
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
info
(
`${tcNumber} featureAbility.startAbility again end`
);
};
...
...
@@ -969,6 +1002,8 @@ export default function test() {
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
info
(
`${tcNumber} featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
info
(
`${tcNumber} featureAbility.startAbility end`
);
});
...
...
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formfuzztest/entry/src/main/ets/MainAbility/test/GetFormsInfoFuzz.test.ets
浏览文件 @
3170b87c
...
...
@@ -93,8 +93,8 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
});
describe(`${describeName}`, () => {
const callbackName = `FMS_fuzzTest_getinfomodule`;
const promiseName = `FMS_fuzzTest_getinfomodule`;
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) {
...
...
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandzerotest/entry/src/main/ets/MainAbility/test/GetAllFormsInfo.test.ets
浏览文件 @
3170b87c
...
...
@@ -17,13 +17,16 @@ import formHost from '@ohos.application.formHost';
import { describe, expect, it } from 'deccjsunit/index';
import FormInfo from '@ohos.application.formInfo';
function sleep(time) {
return new Promise((resolve)=>setTimeout(resolve,time));
}
export const getAllFormsInfoTest = (describeName, filterParameter) => {
const ERR_OK_CODE = 0;
const ERR_OK = `success`;
describe(`${describeName}`, () => {
const callbackName = `FMS_getFormsInfo_0400
callback`;
const promiseName = `FMS_getFormsInfo_0400
promise`;
const callbackName = `FMS_getFormsInfo_0400
_
callback`;
const promiseName = `FMS_getFormsInfo_0400
_
promise`;
var tempDataB = undefined;
/**
...
...
@@ -103,6 +106,7 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName} should not reach here`);
expect().assertFail();
done()
}
});
function checkDataB(formInfo){
...
...
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formreleasetest/entry/src/main/ets/MainAbility/test/FmsReleaseForm.test.ets
浏览文件 @
3170b87c
...
...
@@ -64,7 +64,8 @@ export default function test() {
data
:
formId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_releaseForm_0200 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_releaseForm_0200 publish'
+
JSON
.
stringify
(
err
));
done
()
});
}
...
...
@@ -120,6 +121,8 @@ export default function test() {
console
.
log
(
`FMS_releaseForm_0200 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_releaseForm_0200 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_releaseForm_0200 featureAbility.startAbility end`
);
});
...
...
@@ -166,6 +169,8 @@ export default function test() {
console
.
log
(
`FMS_releaseForm_0300 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_releaseForm_0300 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_releaseForm_0300 featureAbility.startAbility end`
);
});
...
...
@@ -211,6 +216,8 @@ export default function test() {
console
.
log
(
`FMS_releaseForm_0400 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_releaseForm_0400 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_releaseForm_0400 featureAbility.startAbility end`
);
});
...
...
@@ -234,7 +241,8 @@ export default function test() {
data
:
formId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_releaseForm_0500 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_releaseForm_0500 publish'
+
JSON
.
stringify
(
err
));
done
()
});
}
function
onAcquiredCallBack
(
_
,
data
)
{
...
...
@@ -264,6 +272,8 @@ export default function test() {
console
.
log
(
`FMS_releaseForm_0500 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_releaseForm_0500 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_releaseForm_0500 featureAbility.startAbility again end`
);
}
...
...
@@ -287,6 +297,8 @@ export default function test() {
console
.
log
(
`FMS_releaseForm_0500 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_releaseForm_0500 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_releaseForm_0500 featureAbility.startAbility end`
);
});
...
...
@@ -311,7 +323,8 @@ export default function test() {
data
:
formId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_releaseForm_0600 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_releaseForm_0600 publish'
+
JSON
.
stringify
(
err
));
done
()
});
}
function
onDeletedCallBack
(
_
,
data
)
{
...
...
@@ -343,6 +356,8 @@ export default function test() {
console
.
log
(
`FMS_releaseForm_0600 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_releaseForm_0600 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_releaseForm_0600 featureAbility.startAbility again end`
);
}
...
...
@@ -371,6 +386,8 @@ export default function test() {
console
.
log
(
`FMS_releaseForm_0600 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_releaseForm_0600 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_releaseForm_0600 featureAbility.startAbility end`
);
});
...
...
@@ -445,6 +462,8 @@ export default function test() {
console
.
log
(
`FMS_releaseForm_1300 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_releaseForm_1300 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_releaseForm_1300 featureAbility.startAbility end`
);
}
...
...
@@ -485,6 +504,8 @@ export default function test() {
console
.
log
(
`FMS_releaseForm_1300 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_releaseForm_1300 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_releaseForm_1300 featureAbility.startAbility end`
);
}
...
...
@@ -509,6 +530,8 @@ export default function test() {
console
.
log
(
`FMS_releaseForm_1300 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_releaseForm_1300 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_releaseForm_1300 featureAbility.startAbility end`
);
});
...
...
@@ -531,7 +554,8 @@ export default function test() {
data
:
data
.
parameters
.
formId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_releaseForm_1400 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_releaseForm_1400 publish'
+
JSON
.
stringify
(
err
));
done
()
});
}
commonEvent
.
subscribe
(
subscriberOnReleased
,
onReleasedCallBack
);
...
...
@@ -557,6 +581,8 @@ export default function test() {
console
.
log
(
`FMS_releaseForm_1400 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_releaseForm_1400 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_releaseForm_1400 featureAbility.startAbility end`
);
});
...
...
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_disable/entry/src/main/ets/MainAbility/test/FmsFormStateDisable.test.ets
浏览文件 @
3170b87c
...
...
@@ -97,6 +97,8 @@ export default function test() {
console
.
log
(
`FMS_disableFormsUpdate_0200 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_disableFormsUpdate_0200 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
()
done
()
});
console
.
log
(
`FMS_disableFormsUpdate_0200 featureAbility.startAbility again end`
);
});
...
...
@@ -144,6 +146,8 @@ export default function test() {
console
.
log
(
`FMS_disableFormsUpdate_0300 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_disableFormsUpdate_0300 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
()
done
()
});
console
.
log
(
`FMS_disableFormsUpdate _0300 featureAbility.startAbility end`
);
});
...
...
@@ -161,12 +165,8 @@ export default function test() {
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnState_commonEvent"
);
expect
(
data
.
data
)
.
assertEqual
(
"13"
);
commonEvent
.
unsubscribe
(
subscriberOnState
,
()
=>
unsubscribeOnStateCallback
(
"FMS_disableFormsUpdate_0400"
))
setTimeout
(
function
()
{
console
.
info
(
'FMS_disableFormsUpdate_0400 delPublishCallBack end'
);
console
.
log
(
`FMS_disableFormsUpdate_0400 end`
);
done
();
},
100
)
console
.
log
(
`FMS_disableFormsUpdate_0400 end`
);
done
();
}
commonEvent
.
subscribe
(
subscriberOnState
,
onStateCallBack
);
console
.
log
(
`FMS_disableFormsUpdate_0400 featureAbility.startAbility start`
);
...
...
@@ -190,6 +190,8 @@ export default function test() {
console
.
log
(
`FMS_disableFormsUpdate_0400 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_disableFormsUpdate_0400 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
()
done
()
});
console
.
log
(
`FMS_disableFormsUpdate _0400 featureAbility.startAbility end`
);
});
...
...
@@ -207,12 +209,9 @@ export default function test() {
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnState_commonEvent"
);
expect
(
data
.
data
)
.
assertEqual
(
"13"
);
commonEvent
.
unsubscribe
(
subscriberOnState
,
()
=>
unsubscribeOnStateCallback
(
"FMS_disableFormsUpdate_0500"
))
setTimeout
(
function
()
{
console
.
info
(
'FMS_disableFormsUpdate_0500 delPublishCallBack end'
);
console
.
log
(
`FMS_disableFormsUpdate_0500 end`
);
done
();
},
100
)
console
.
log
(
`FMS_disableFormsUpdate_0500 end`
);
done
();
}
commonEvent
.
subscribe
(
subscriberOnState
,
onStateCallBack
);
console
.
log
(
`FMS_disableFormsUpdate_0500 featureAbility.startAbility start`
);
...
...
@@ -236,6 +235,8 @@ export default function test() {
console
.
log
(
`FMS_disableFormsUpdate_0500 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_disableFormsUpdate_0500 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
()
done
()
});
console
.
log
(
`FMS_disableFormsUpdate_0500 featureAbility.startAbility end`
);
});
...
...
@@ -262,7 +263,8 @@ export default function test() {
data
:
hostFormId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_disableFormsUpdate_0600 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_disableFormsUpdate_0600 publish'
+
JSON
.
stringify
(
err
));
done
()
});
}
...
...
@@ -290,6 +292,8 @@ export default function test() {
console
.
debug
(
`FMS_disableFormsUpdate_0600 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
debug
(
`FMS_disableFormsUpdate_0600 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
commonEvent
.
unsubscribe
(
subscriberOnAcquired
,
()
=>
unsubscribeOnAcquiredCallback
(
"FMS_disableFormsUpdate_0600"
));
}
...
...
@@ -315,6 +319,8 @@ export default function test() {
console
.
debug
(
`FMS_disableFormsUpdate_0600 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
debug
(
`FMS_disableFormsUpdate_0600 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
()
done
()
});
});
/**
...
...
@@ -336,8 +342,8 @@ export default function test() {
expect
(
data
.
data
)
.
assertEqual
(
"13"
);
commonEvent
.
unsubscribe
(
subscriberOnState
,
()
=>
{
console
.
info
(
"====>FMS_disableFormsUpdate_0700 unSubscribeOnDisableCallback====>"
);
done
()
});
done
();
}
const
onDeleteCallback
=
async
(
_
,
data
)
=>
{
...
...
@@ -364,6 +370,8 @@ export default function test() {
console
.
debug
(
`FMS_disableFormsUpdate_0700 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
debug
(
`FMS_disableFormsUpdate_0700 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
()
done
()
});
commonEvent
.
unsubscribe
(
subscriberDel
,
()
=>
{
...
...
@@ -394,6 +402,8 @@ export default function test() {
console
.
debug
(
`FMS_disableFormsUpdate_0700 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
debug
(
`FMS_disableFormsUpdate_0700 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
()
done
()
});
});
/**
...
...
@@ -416,7 +426,8 @@ export default function test() {
data
:
formId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_disableFormsUpdate_0800 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_disableFormsUpdate_0800 publish'
+
JSON
.
stringify
(
err
));
done
()
});
}
...
...
@@ -442,6 +453,8 @@ export default function test() {
console
.
log
(
`FMS_disableFormsUpdate_0800 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_disableFormsUpdate_0800 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
()
done
()
});
console
.
log
(
`FMS_disableFormsUpdate_0800 featureAbility.startAbility end`
);
});
...
...
@@ -466,7 +479,8 @@ export default function test() {
data
:
formId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_disableFormsUpdate_0900 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_disableFormsUpdate_0900 publish'
+
JSON
.
stringify
(
err
));
done
()
});
}
async
function
OnEnableCallBack
(
_
,
data
)
{
...
...
@@ -497,6 +511,8 @@ export default function test() {
console
.
log
(
`FMS_disableFormsUpdate_0900 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_disableFormsUpdate_0900 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_disableFormsUpdate_0900 featureAbility.startAbility end`
);
}
...
...
@@ -523,6 +539,8 @@ export default function test() {
console
.
log
(
`FMS_disableFormsUpdate_0900 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_disableFormsUpdate_0900 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_disableFormsUpdate_0900 featureAbility.startAbility end`
);
});
...
...
@@ -574,7 +592,8 @@ export default function test() {
data
:
formId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_disableFormsUpdate_1000 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_disableFormsUpdate_1000 publish'
+
JSON
.
stringify
(
err
));
done
()
});
},
10000
);
}
...
...
@@ -610,6 +629,8 @@ export default function test() {
console
.
log
(
`FMS_disableFormsUpdate_1000 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_disableFormsUpdate_1000 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
()
done
()
});
console
.
log
(
`FMS_disableFormsUpdate_1000 featureAbility.startAbility notify disable end`
);
}
...
...
@@ -636,6 +657,8 @@ export default function test() {
console
.
log
(
`FMS_disableFormsUpdate_1000 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_disableFormsUpdate_1000 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
()
done
()
});
console
.
log
(
`FMS_disableFormsUpdate_1000 featureAbility.startAbility servicea end`
);
});
...
...
@@ -688,7 +711,8 @@ export default function test() {
data
:
formId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_disableFormsUpdate_1100 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_disableFormsUpdate_1100 publish'
+
JSON
.
stringify
(
err
));
done
()
});
},
10000
);
}
...
...
@@ -724,6 +748,8 @@ export default function test() {
console
.
log
(
`FMS_disableFormsUpdate_1100 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_disableFormsUpdate_1100 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
()
done
()
});
console
.
log
(
`FMS_disableFormsUpdate_1100 featureAbility.startAbility notify disable end`
);
}
...
...
@@ -750,6 +776,8 @@ export default function test() {
console
.
log
(
`FMS_disableFormsUpdate_1100 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_disableFormsUpdate_1100 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
()
done
()
});
console
.
log
(
`FMS_disableFormsUpdate_1100 featureAbility.startAbility servicea end`
);
});
...
...
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/entry/src/main/ets/MainAbility/test/FmsFormStateEnable.test.ets
浏览文件 @
3170b87c
...
...
@@ -68,12 +68,12 @@ export default function test() {
console
.
info
(
"!!!====>FMS_enableFormsUpdate_0200 onStateCallBack data:====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnState_commonEvent"
);
expect
(
data
.
data
)
.
assertEqual
(
"2"
);
co
mmonEvent
.
unsubscribe
(
subscriberOnState
,
()
=>
unsubscribeOnStateCallback
(
"FMS_enableFormsUpdate_0200"
)
);
setTimeout
(
function
()
{
console
.
info
(
'FMS_enableFormsUpdate_0200 onStateCallBack end'
);
console
.
log
(
`FMS_enableFormsUpdate_0200 end`
);
co
nsole
.
info
(
'FMS_enableFormsUpdate_0200 onStateCallBack end'
);
console
.
log
(
`FMS_enableFormsUpdate_0200 end`
);
commonEvent
.
unsubscribe
(
subscriberOnState
,
()
=>
{
console
.
info
(
'FMS_enableFormsUpdate_0200 unsubscribe callback'
);
done
();
}
,
1000
);
}
)
}
commonEvent
.
subscribe
(
subscriberOnState
,
onStateCallBack
);
...
...
@@ -98,6 +98,8 @@ export default function test() {
console
.
log
(
`FMS_enableFormsUpdate_0200 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_enableFormsUpdate_0200 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_enableFormsUpdate_0200 featureAbility.startAbility again end`
);
});
...
...
@@ -114,13 +116,10 @@ export default function test() {
console
.
info
(
"!!!====>FMS_enableFormsUpdate_0300 onStateCallBack data:====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnState_commonEvent"
);
expect
(
data
.
data
)
.
assertEqual
(
"7"
);
commonEvent
.
unsubscribe
(
subscriberOnState
,
()
=>
unsubscribeOnStateCallback
(
"FMS_enableFormsUpdate_0300"
))
setTimeout
(
function
()
{
console
.
info
(
'FMS_enableFormsUpdate_0300 delPublishCallBack end'
);
console
.
log
(
`FMS_enableFormsUpdate_0300 end`
);
commonEvent
.
unsubscribe
(
subscriberOnState
,
()
=>
{
console
.
info
(
'FMS_enableFormsUpdate_0300 unsubscribe callback'
);
done
();
}
,
100
)
})
}
commonEvent
.
subscribe
(
subscriberOnState
,
onStateCallBack
);
...
...
@@ -145,6 +144,8 @@ export default function test() {
console
.
log
(
`FMS_enableFormsUpdate_0300 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_enableFormsUpdate_0300 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_enableFormsUpdate_0300 featureAbility.startAbility end`
);
});
...
...
@@ -161,13 +162,10 @@ export default function test() {
console
.
info
(
"!!!====>FMS_enableFormsUpdate_0400 onStateCallBack data:====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnState_commonEvent"
);
expect
(
data
.
data
)
.
assertEqual
(
"13"
);
commonEvent
.
unsubscribe
(
subscriberOnState
,
()
=>
unsubscribeOnStateCallback
(
"FMS_enableFormsUpdate_0400"
))
setTimeout
(
function
()
{
console
.
info
(
'FMS_enableFormsUpdate_0400 delPublishCallBack end'
);
console
.
log
(
`FMS_enableFormsUpdate_0400 end`
);
commonEvent
.
unsubscribe
(
subscriberOnState
,
()
=>
{
console
.
info
(
'FMS_enableFormsUpdate_0400 unsubscribe callback'
);
done
();
}
,
100
)
})
}
commonEvent
.
subscribe
(
subscriberOnState
,
onStateCallBack
);
...
...
@@ -192,6 +190,8 @@ export default function test() {
console
.
log
(
`FMS_enableFormsUpdate_0400 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_enableFormsUpdate_0400 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_enableFormsUpdate_0400 featureAbility.startAbility end`
);
});
...
...
@@ -208,13 +208,10 @@ export default function test() {
console
.
info
(
"!!!====>FMS_enableFormsUpdate_0500 onStateCallBack data:====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnState_commonEvent"
);
expect
(
data
.
data
)
.
assertEqual
(
"13"
);
commonEvent
.
unsubscribe
(
subscriberOnState
,
()
=>
unsubscribeOnStateCallback
(
"FMS_enableFormsUpdate_0500"
))
setTimeout
(
function
()
{
console
.
info
(
'FMS_enableFormsUpdate_0500 delPublishCallBack end'
);
console
.
log
(
`FMS_enableFormsUpdate_0500 end`
);
commonEvent
.
unsubscribe
(
subscriberOnState
,
()
=>
{
console
.
info
(
'FMS_enableFormsUpdate_0500 unsubscribe callback'
);
done
();
}
,
100
)
})
}
commonEvent
.
subscribe
(
subscriberOnState
,
onStateCallBack
);
...
...
@@ -239,6 +236,8 @@ export default function test() {
console
.
log
(
`FMS_enableFormsUpdate_0500 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_enableFormsUpdate_0500 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_enableFormsUpdate_0500 featureAbility.startAbility end`
);
});
...
...
@@ -264,7 +263,8 @@ export default function test() {
data
:
hostFormId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_enableFormsUpdate_0600 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_enableFormsUpdate_0600 publish'
+
JSON
.
stringify
(
err
));
done
()
});
}
...
...
@@ -292,6 +292,8 @@ export default function test() {
console
.
debug
(
`FMS_enableFormsUpdate_0600 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
debug
(
`FMS_enableFormsUpdate_0600 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
commonEvent
.
unsubscribe
(
subscriberOnAcquired
,
()
=>
unsubscribeOnAcquiredCallback
(
"FMS_enableFormsUpdate_0600"
));
}
...
...
@@ -317,6 +319,8 @@ export default function test() {
console
.
debug
(
`FMS_enableFormsUpdate_0600 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
debug
(
`FMS_enableFormsUpdate_0600 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
});
/**
...
...
@@ -338,8 +342,8 @@ export default function test() {
expect
(
data
.
data
)
.
assertEqual
(
"13"
);
commonEvent
.
unsubscribe
(
subscriberOnState
,
()
=>
{
console
.
info
(
"====>FMS_enableFormsUpdate_0700 unSubscribeOnEnableCallback====>"
);
done
();
});
done
();
}
const
onDeleteCallback
=
async
(
_
,
data
)
=>
{
...
...
@@ -366,6 +370,8 @@ export default function test() {
console
.
debug
(
`FMS_enableFormsUpdate_0700 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
debug
(
`FMS_enableFormsUpdate_0700 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
commonEvent
.
unsubscribe
(
subscriberDel
,
()
=>
{
...
...
@@ -396,6 +402,8 @@ export default function test() {
console
.
debug
(
`FMS_enableFormsUpdate_0700 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
debug
(
`FMS_enableFormsUpdate_0700 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
});
...
...
@@ -431,7 +439,8 @@ export default function test() {
data
:
formIds
[
0
]
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_enableFormsUpdate_0900 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_enableFormsUpdate_0900 publish'
+
JSON
.
stringify
(
err
));
done
()
});
},
2000
);
}
...
...
@@ -478,6 +487,8 @@ export default function test() {
console
.
log
(
`FMS_enableFormsUpdate_0900 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_enableFormsUpdate_0900 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_enableFormsUpdate_0900 featureAbility.startAbility notifyVisible end`
);
},
10000
);
...
...
@@ -511,6 +522,8 @@ export default function test() {
console
.
log
(
`FMS_enableFormsUpdate_0900 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_enableFormsUpdate_0900 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_enableFormsUpdate_0900 featureAbility.startAbility notify disable end`
);
}
...
...
@@ -535,6 +548,8 @@ export default function test() {
console
.
log
(
`FMS_enableFormsUpdate_0900 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_enableFormsUpdate_0900 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_enableFormsUpdate_0900 featureAbility.startAbility servicea end`
);
});
...
...
@@ -571,7 +586,8 @@ export default function test() {
data
:
formIds
[
0
]
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_enableFormsUpdate_1000 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_enableFormsUpdate_1000 publish'
+
JSON
.
stringify
(
err
));
done
()
});
},
2000
);
}
...
...
@@ -619,6 +635,8 @@ export default function test() {
console
.
log
(
`FMS_enableFormsUpdate_1000 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_enableFormsUpdate_1000 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_enableFormsUpdate_1000 featureAbility.startAbility notifyVisible end`
);
},
10000
);
...
...
@@ -651,6 +669,8 @@ export default function test() {
console
.
log
(
`FMS_enableFormsUpdate_1000 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_enableFormsUpdate_1000 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_enableFormsUpdate_1000 featureAbility.startAbility notify disable end`
);
}
...
...
@@ -675,6 +695,8 @@ export default function test() {
console
.
log
(
`FMS_enableFormsUpdate_1000 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_enableFormsUpdate_1000 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_enableFormsUpdate_1000 featureAbility.startAbility servicea end`
);
});
...
...
@@ -707,7 +729,7 @@ export default function test() {
setTimeout
(
function
()
{
console
.
info
(
'FMS_enableFormsUpdate_1200 delPublishCallBack2 end'
);
console
.
log
(
`FMS_enableFormsUpdate_1200 end`
);
done
()
;
done
()
},
1000
);
}
...
...
@@ -778,6 +800,8 @@ export default function test() {
console
.
log
(
`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_enableFormsUpdate_1200 featureAbility.startAbility notifyVisible end`
);
},
10000
);
...
...
@@ -813,6 +837,8 @@ export default function test() {
console
.
log
(
`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_enableFormsUpdate_1200 featureAbility.startAbility notify disable end`
);
}
...
...
@@ -845,6 +871,8 @@ export default function test() {
console
.
log
(
`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_enableFormsUpdate_1200 featureAbility.startAbility serviceb end`
);
}
...
...
@@ -869,6 +897,8 @@ export default function test() {
console
.
log
(
`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_enableFormsUpdate_1200 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_enableFormsUpdate_1200 featureAbility.startAbility servicea end`
);
});
...
...
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible/entry/src/main/ets/MainAbility/test/FmsFormStateNotifyInvisible.test.ets
浏览文件 @
3170b87c
...
...
@@ -257,7 +257,8 @@ export default function test() {
data
:
formId
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_notifyInvisibleForms_0600 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_notifyInvisibleForms_0600 publish'
+
JSON
.
stringify
(
err
));
done
()
});
}
...
...
@@ -288,6 +289,7 @@ export default function test() {
console
.
log
(
`FMS_notifyInvisibleForms_0600 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_notifyInvisibleForms_0600 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
});
console
.
log
(
`FMS_notifyInvisibleForms_0600 featureAbility.startAbility again end`
);
}
...
...
@@ -312,6 +314,8 @@ export default function test() {
console
.
log
(
`FMS_notifyInvisibleForms_0600 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_notifyInvisibleForms_0600 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_notifyInvisibleForms_0600 featureAbility.startAbility end`
);
});
...
...
@@ -431,7 +435,8 @@ export default function test() {
data
:
formIdInvisible
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_notifyInvisibleForms_0800 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_notifyInvisibleForms_0800 publish'
+
JSON
.
stringify
(
err
));
done
()
});
}
}
...
...
@@ -448,7 +453,8 @@ export default function test() {
data
:
formIdInvisible
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_notifyInvisibleForms_0600 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_notifyInvisibleForms_0800 publish'
+
JSON
.
stringify
(
err
));
done
()
});
}
}
...
...
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible2/entry/src/main/ets/MainAbility/test/FmsFormStateNotifyInvisible2.test.ets
浏览文件 @
3170b87c
...
...
@@ -72,7 +72,8 @@ export default function test() {
data
:
formIdInvisible
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_notifyInvisibleForms_0900 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_notifyInvisibleForms_0900 publish'
+
JSON
.
stringify
(
err
));
done
()
});
}
}
...
...
@@ -89,7 +90,8 @@ export default function test() {
data
:
formIdInvisible
};
commonEvent
.
publish
(
deleteForm_Event
,
commonEventPublishData
,
(
err
)
=>
{
console
.
info
(
'FMS_notifyInvisibleForms_0900 publish'
+
JSON
.
stringify
(
err
));
console
.
info
(
'FMS_notifyInvisibleForms_0900 publish'
+
JSON
.
stringify
(
err
));
done
()
});
}
}
...
...
@@ -123,6 +125,8 @@ export default function test() {
console
.
log
(
`FMS_notifyInvisibleForms_0900 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_notifyInvisibleForms_0900 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_notifyInvisibleForms_0900 featureAbility.startAbility again end`
);
}
...
...
@@ -150,6 +154,8 @@ export default function test() {
console
.
log
(
`FMS_notifyInvisibleForms_0900 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_notifyInvisibleForms_0900 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_notifyInvisibleForms_0900 featureAbility.startAbility end`
);
});
...
...
@@ -214,6 +220,8 @@ export default function test() {
console
.
log
(
`FMS_notifyInvisibleForms_1000 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_notifyInvisibleForms_1000 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_notifyInvisibleForms_1000 featureAbility.startAbility end`
);
});
...
...
@@ -303,6 +311,8 @@ export default function test() {
console
.
log
(
`FMS_notifyInvisibleForms_1100 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_notifyInvisibleForms_1100 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_notifyInvisibleForms_1100 featureAbility.startAbility again end`
);
}
...
...
@@ -330,6 +340,8 @@ export default function test() {
console
.
log
(
`FMS_notifyInvisibleForms_1100 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_notifyInvisibleForms_1100 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_notifyInvisibleForms_1100 featureAbility.startAbility end`
);
});
...
...
@@ -395,6 +407,8 @@ export default function test() {
console
.
log
(
`FMS_notifyInvisibleForms_1200_normal1 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_notifyInvisibleForms_1200_normal1 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_notifyInvisibleForms_1200_normal1 featureAbility.startAbility end`
);
...
...
@@ -477,6 +491,8 @@ export default function test() {
console
.
log
(
`FMS_notifyInvisibleForms_1200_normal2 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_notifyInvisibleForms_1200_normal2 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_notifyInvisibleForms_1200_normal2 featureAbility.startAbility end`
);
...
...
@@ -598,6 +614,8 @@ export default function test() {
console
.
debug
(
`FMS_notifyInvisibleForms_1300 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
debug
(
`FMS_notifyInvisibleForms_1300 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
});
...
...
@@ -686,6 +704,8 @@ export default function test() {
console
.
log
(
`FMS_notifyInvisibleForms_1400 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_notifyInvisibleForms_1400 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_notifyInvisibleForms_1400 featureAbility.startAbility notifyInVisible end`
);
}
...
...
@@ -717,6 +737,8 @@ export default function test() {
console
.
log
(
`FMS_notifyInvisibleForms_1400 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_notifyInvisibleForms_1400 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_notifyInvisibleForms_1400 featureAbility.startAbility serviceb end`
);
}
...
...
@@ -741,6 +763,8 @@ export default function test() {
console
.
log
(
`FMS_notifyInvisibleForms_1400 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_notifyInvisibleForms_1400 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_notifyInvisibleForms_1400 featureAbility.startAbility servicea end`
);
});
...
...
@@ -790,6 +814,8 @@ export default function test() {
console
.
log
(
`FMS_notifyInvisibleForms_1500 featureAbility.startAbilityhost res: ${JSON.stringify(res)}`
);
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`FMS_notifyInvisibleForms_1500 featureAbility.startAbilityhost error: ${JSON.stringify(err)}`
);
expect
()
.
assertFail
();
done
();
});
console
.
log
(
`FMS_notifyInvisibleForms_1500 featureAbility.startAbility end`
);
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录