未验证 提交 405e3891 编写于 作者: O openharmony_ci 提交者: Gitee

!5910 【XTS】【事件通知子系统】修改 ActsNotificationDistributedTest_master

Merge pull request !5910 from zhijianwen/master
......@@ -19,7 +19,12 @@ export default function ActsNotificationDistributedTest() {
describe('SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST', function () {
let TAG = 'SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST ===>'
console.info(TAG + 'SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST START')
/*
* @tc.number : SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST_0100
* @tc.name : function isDistributedEnabled(callback: AsyncCallback<boolean>): void
* @tc.desc : Obtains whether the device supports distributed notification
*/
it('SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST_0100', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST_0100 START`)
notification.isDistributedEnabled((err, data) => {
......@@ -29,18 +34,23 @@ export default function ActsNotificationDistributedTest() {
done()
} else {
console.info(`${TAG} isDistributedEnabled AsyncCallback success: ${data}`)
expect(data).assertTrue()
expect(data).assertFalse()
done()
}
})
console.info(`${TAG} SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST_0100 END`)
})
/*
* @tc.number : SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST_0200
* @tc.name : function isDistributedEnabled(): Promise<boolean>
* @tc.desc : Obtains whether the device supports distributed notification
*/
it('SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST_0200', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_ANS_IS_DISTRIBUTED_ENABLED_TEST_0200 START`)
notification.isDistributedEnabled().then((data) => {
console.info(`${TAG} isDistributedEnabled Promise success: ${data}`)
expect(data).assertTrue()
expect(data).assertFalse()
done()
}).catch((err) => {
console.info(`${TAG} isDistributedEnabled Promise err: ${err.code}`)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册