diff --git a/notification/ans_standard/actsNotificationDistributedTest/src/main/js/test/ActsNotificationDistributedTest.js b/notification/ans_standard/actsNotificationDistributedTest/src/main/js/test/ActsNotificationDistributedTest.js index c0c258d11fa7c856cf1da0d1a5e239c9bd642a47..96d65df73d5a771996441502d5c163affa20ec41 100644 --- a/notification/ans_standard/actsNotificationDistributedTest/src/main/js/test/ActsNotificationDistributedTest.js +++ b/notification/ans_standard/actsNotificationDistributedTest/src/main/js/test/ActsNotificationDistributedTest.js @@ -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): 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 + * @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}`)