From 4de9965de74e68b64926371f000bf7eaf52a4a9f Mon Sep 17 00:00:00 2001 From: zhijianwen Date: Tue, 22 Mar 2022 10:49:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E8=8C=83=E6=80=A7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhijianwen --- .../js/test/ActsAnsNotificationCancel.test.js | 118 ++++----- .../js/test/ActsAnsNotificationRemove.test.js | 233 +++++++++--------- .../entry/src/main/js/test/ActiveButton.js | 4 +- .../src/main/js/default/pages/index/index.css | 15 ++ .../src/main/js/default/pages/index/index.hml | 15 ++ .../src/main/js/default/pages/index/index.hml | 2 +- .../src/main/js/default/pages/index/index.css | 15 ++ .../src/main/js/default/pages/index/index.hml | 17 +- .../src/main/js/default/pages/index/index.css | 15 ++ .../src/main/js/default/pages/index/index.hml | 17 +- .../src/main/js/default/pages/index/index.hml | 2 +- .../src/main/js/default/pages/index/index.hml | 2 +- .../src/main/js/default/pages/index/index.hml | 2 +- .../src/main/js/default/pages/index/index.hml | 2 +- .../src/main/js/default/pages/index/index.hml | 2 +- .../src/main/js/default/pages/index/index.hml | 4 +- .../src/main/js/default/pages/index/index.hml | 2 +- .../src/main/js/default/pages/index/index.hml | 2 +- .../src/main/js/default/pages/index/index.css | 15 ++ .../src/main/js/default/pages/index/index.hml | 17 +- .../src/main/js/default/pages/index/index.hml | 2 +- .../js/test/ActsSubscriber_test_ordered.js | 60 ++--- .../src/main/js/default/pages/index/index.hml | 2 +- .../js/test/ActsSubscriber_test_unorder.js | 24 +- .../src/main/js/default/pages/index/index.hml | 2 +- .../src/main/js/default/pages/index/index.css | 17 +- .../src/main/js/default/pages/index/index.hml | 17 +- 27 files changed, 387 insertions(+), 238 deletions(-) diff --git a/notification/ans_standard/actsansnotificationcancel/entry/src/main/js/test/ActsAnsNotificationCancel.test.js b/notification/ans_standard/actsansnotificationcancel/entry/src/main/js/test/ActsAnsNotificationCancel.test.js index 22013ad8c..00e12ac95 100644 --- a/notification/ans_standard/actsansnotificationcancel/entry/src/main/js/test/ActsAnsNotificationCancel.test.js +++ b/notification/ans_standard/actsansnotificationcancel/entry/src/main/js/test/ActsAnsNotificationCancel.test.js @@ -15,10 +15,10 @@ import notify from '@ohos.notification' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' -var timeout = 500; +let timeout = 500; describe('ActsAnsNotificationCancel', function () { console.info("===========ActsAnsNotificationCancel start====================>"); - var timesOfOnConsume + let timesOfOnConsume function onConsumeCancelAll(data) { console.info("================ANS_Cancel_0100 onConsume start=======================>"); console.info("================ANS_Cancel_0100 onConsume data:=================>" + JSON.stringify(data)); @@ -29,7 +29,7 @@ describe('ActsAnsNotificationCancel', function () { } console.info("================ANS_Cancel_0100 onConsume end=======================>"); } - var timesOfOnCancel + let timesOfOnCancel function onCancelCancelAll(data) { console.info("================ANS_Cancel_0100 onCancel start===============>"); console.info("================ANS_Cancel_0100 onCancel data:===============>" + JSON.stringify(data)); @@ -58,11 +58,11 @@ describe('ActsAnsNotificationCancel', function () { console.info("==================ANS_Cancel_0100 start==================>"); timesOfOnConsume = 0 timesOfOnCancel = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelAll, onCancel:onCancelCancelAll, } - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -92,7 +92,7 @@ describe('ActsAnsNotificationCancel', function () { badgeIconStyle: 1, showDeliveryTime: true, } - var notificationRequest1 = { + let notificationRequest1 = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -170,13 +170,13 @@ describe('ActsAnsNotificationCancel', function () { console.info("===============ANS_Cancel_0200 start==========================>"); timesOfOnConsume = 0 timesOfOnCancel = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelAllPromise, onCancel:onCancelCancelAllPromise, } await notify.subscribe(subscriber); console.info("==================ANS_Cancel_0200 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -206,7 +206,7 @@ describe('ActsAnsNotificationCancel', function () { badgeIconStyle: 1, showDeliveryTime: true, } - var notificationRequest1 = { + let notificationRequest1 = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -277,7 +277,7 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_0300', 0, async function (done) { console.info("===============ANS_Cancel_0300 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelAllNoNotify, onCancel:onCancelCancelAllNoNotify, } @@ -316,7 +316,7 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_0400', 0, async function (done) { console.info("===============ANS_Cancel_0400 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelAllNoNotifyPromise, onCancel:onCancelCancelAllNoNotifyPromise, } @@ -374,13 +374,13 @@ describe('ActsAnsNotificationCancel', function () { it('ANS_Cancel_0500', 0, async function (done) { console.info("============ANS_Cancel_0500 start==================>"); timesOfOnCancel = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelAll2Times, onCancel:onCancelCancelAll2Times, } await notify.subscribe(subscriber); console.info("============ANS_Cancel_0500 subscribe promise======>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -449,13 +449,13 @@ describe('ActsAnsNotificationCancel', function () { it('ANS_Cancel_0600', 0, async function (done) { console.info("===============ANS_Cancel_0600 start==========================>"); timesOfOnCancel = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelAll2TimesPromise, onCancel:onCancelCancelAll2TimesPromise, } await notify.subscribe(subscriber); console.info("==================ANS_Cancel_0600 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -523,13 +523,13 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_0700', 0, async function (done) { console.info("===============ANS_Cancel_0700 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelAllIsUnremovable, onCancel:onCancelCancelAllIsUnremovable, } await notify.subscribe(subscriber); console.info("========ANS_Cancel_0700 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -591,13 +591,13 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_0800', 0, async function (done) { console.info("===============ANS_Cancel_0800 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelAllIsUnremovablPromise, onCancel:onCancelCancelAllIsUnremovablePromise, } await notify.subscribe(subscriber); console.info("==================ANS_Cancel_0800 subscribe promsie==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -663,13 +663,13 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_0900', 0, async function (done) { console.info("===============ANS_Cancel_0900 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancel, onCancel:onCancelCancel, } await notify.subscribe(subscriber); console.info("==================ANS_Cancel_0900 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -737,13 +737,13 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_1000', 0, async function (done) { console.info("===============ANS_Cancel_1000 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelWrongId, onCancel:onCancelCancelWrongId, } await notify.subscribe(subscriber); console.info("================ANS_Cancel_1000 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -812,13 +812,13 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_1100', 0, async function (done) { console.info("===============ANS_Cancel_1100 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelIsUnremovable, onCancel:onCancelCancelIsUnremovable, } await notify.subscribe(subscriber); console.info("===============ANS_Cancel_1100 subscribe promise=============>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -856,7 +856,7 @@ describe('ActsAnsNotificationCancel', function () { }),timeout); }) - var id1200 + let id1200 function onConsumeCancel2Times(data) { console.info("=========ANS_Cancel_1200 onConsume start=====================>"); console.info("=========ANS_Cancel_1200 onConsume data:=====================>" + JSON.stringify(data)); @@ -904,13 +904,13 @@ describe('ActsAnsNotificationCancel', function () { it('ANS_Cancel_1200', 0, async function (done) { console.info("=============ANS_Cancel_1200 start==========================>"); timesOfOnCancel = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancel2Times, onCancel:onCancelCancel2Times, } await notify.subscribe(subscriber); console.info("=============ANS_Cancel_1200 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -978,7 +978,7 @@ describe('ActsAnsNotificationCancel', function () { * @tc.desc: Verify that the cancel notification is successful by calling the cancel(id: number, label: string, callback: AsyncCallback): void; interface */ - var subscriber + let subscriber it('ANS_Cancel_1300', 0, async function (done) { console.info("===============ANS_Cancel_1300 start==========================>"); subscriber ={ @@ -987,7 +987,7 @@ describe('ActsAnsNotificationCancel', function () { } await notify.subscribe(subscriber); console.info("================ANS_Cancel_1300 subscribe promise==============>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1059,7 +1059,7 @@ describe('ActsAnsNotificationCancel', function () { } await notify.subscribe(subscriber); console.info("==========ANS_Cancel_1400 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1130,13 +1130,13 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_1500', 0, async function (done) { console.info("===============ANS_Cancel_1500 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelLabelIsUnremoveable, onCancel:onCancelCancelLabelIsUnremoveable, } await notify.subscribe(subscriber); console.info("=======ANS_Cancel_1500 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1202,13 +1202,13 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_1600', 0, async function (done) { console.info("===============ANS_Cancel_1600 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelLabelIsUnremoveablePromise, onCancel:onCancelCancelLabelIsUnremoveablePromise, } await notify.subscribe(subscriber); console.info("==============ANS_Cancel_1600 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1276,13 +1276,13 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_1700', 0, async function (done) { console.info("===============ANS_Cancel_1700 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelWrongLabel, onCancel:onCancelCancelWrongLabel, } await notify.subscribe(subscriber); console.info("==============ANS_Cancel_1700 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1349,13 +1349,13 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_1800', 0, async function (done) { console.info("===============ANS_Cancel_1800 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelWrongLabelPromise, onCancel:onCancelCancelWrongLabelPromise, } await notify.subscribe(subscriber); console.info("==============ANS_Cancel_1800 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1424,13 +1424,13 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_1900', 0, async function (done) { console.info("===============ANS_Cancel_1900 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelLabelNullCharacter, onCancel:onCancelCancelLabelNullCharacter, } await notify.subscribe(subscriber); console.info("=============ANS_Cancel_1900 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1498,13 +1498,13 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_2000', 0, async function (done) { console.info("===============ANS_Cancel_2000 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelNullCharacter, onCancel:onCancelCancelNullCharacter, } await notify.subscribe(subscriber); console.info("=========ANS_Cancel_2000 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1543,8 +1543,8 @@ describe('ActsAnsNotificationCancel', function () { }),timeout); }) - var id2100 - var label2100 + let id2100 + let label2100 function onConsumeCancelLabel2Times(data) { console.info("=========ANS_Cancel_2100 onConsume start==================>"); console.info("=========ANS_Cancel_2100 onConsume data:==================>" + JSON.stringify(data)); @@ -1592,13 +1592,13 @@ describe('ActsAnsNotificationCancel', function () { it('ANS_Cancel_2100', 0, async function (done) { console.info("===============ANS_Cancel_2100 start==========================>"); timesOfOnCancel = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelLabel2Times, onCancel:onCancelCancelLabel2Times, } await notify.subscribe(subscriber); console.info("=============ANS_Cancel_2100 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1637,8 +1637,8 @@ describe('ActsAnsNotificationCancel', function () { }),timeout); }) - var id2200 - var label2200 + let id2200 + let label2200 function onConsumeCancelLabelPromise2Times(data) { console.info("===========ANS_Cancel_2200 onConsume start=======================>"); console.info("===========ANS_Cancel_2200 onConsume data:=========>" + JSON.stringify(data)); @@ -1679,13 +1679,13 @@ describe('ActsAnsNotificationCancel', function () { it('ANS_Cancel_2200', 0, async function (done) { console.info("===============ANS_Cancel_2200 start==========================>"); timesOfOnCancel = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelLabelPromise2Times, onCancel:onCancelCancelLabelPromise2Times, } await notify.subscribe(subscriber); console.info("================ANS_Cancel_2200 subscribe_2200_promise=============>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1754,13 +1754,13 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_2300', 0, async function (done) { console.info("===============ANS_Cancel_2300 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelRightLabelWrongId, onCancel:onCancelCancelRightLabelWrongId, } await notify.subscribe(subscriber); console.info("================ANS_Cancel_2300 promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1828,13 +1828,13 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_2400', 0, async function (done) { console.info("===============ANS_Cancel_2400 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelRightLabelWrongIdPromise, onCancel:onCancelCancelRightLabelWrongIdPromise, } await notify.subscribe(subscriber); console.info("============ANS_Cancel_2400 subscribe promise========>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1903,13 +1903,13 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_2500', 0, async function (done) { console.info("===============ANS_Cancel_2500 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelWrongLabelWrongId, onCancel:onCancelCancelWrongLabelWrongId, } await notify.subscribe(subscriber); console.info("================ANS_Cancel_2500 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1977,13 +1977,13 @@ describe('ActsAnsNotificationCancel', function () { */ it('ANS_Cancel_2600', 0, async function (done) { console.info("===============ANS_Cancel_2600 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeCancelWrongLabelWrongIdPromise, onCancel:onCancelCancelWrongLabelWrongIdPromise, } await notify.subscribe(subscriber); console.info("===============ANS_Cancel_2600 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { diff --git a/notification/ans_standard/actsansnotificationremove/entry/src/main/js/test/ActsAnsNotificationRemove.test.js b/notification/ans_standard/actsansnotificationremove/entry/src/main/js/test/ActsAnsNotificationRemove.test.js index badc703ea..35dfa07a1 100644 --- a/notification/ans_standard/actsansnotificationremove/entry/src/main/js/test/ActsAnsNotificationRemove.test.js +++ b/notification/ans_standard/actsansnotificationremove/entry/src/main/js/test/ActsAnsNotificationRemove.test.js @@ -15,14 +15,14 @@ import notify from '@ohos.notification' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' -var timeout = 300; +let timeout = 300; describe('ActsAnsNotificationRemove', function () { console.info("===========ActsAnsNotificationRemove start====================>"); - var subscriber; + let subscriber; function publishCallback(err) { console.info("==========================publishCallback=======================>"); } - var hashCode; + let hashCode; function onConsumeRemove(data) { console.info("=============ANS_Remove_0100 onConsume start=======================>"); console.info("=============ANS_Remove_0100 onConsume data:==================>" + JSON.stringify(data)); @@ -64,13 +64,13 @@ describe('ActsAnsNotificationRemove', function () { it('ANS_Remove_0100', 0, async function (done) { console.info("===============ANS_Remove_0100==========================>"); hashCode = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemove, onCancel:onCancelRemove, } await notify.subscribe(subscriber); console.info("==================ANS_Remove_0100 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -140,13 +140,13 @@ describe('ActsAnsNotificationRemove', function () { it('ANS_Remove_0200', 0, async function (done) { console.info("===============ANS_Remove_0200==========================>"); hashCode = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemovePromise, onCancel:onCancelRemovePromise, } await notify.subscribe(subscriber); console.info("===============ANS_Remove_0200 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -214,13 +214,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_0300', 0, async function (done) { console.info("===============ANS_Remove_0300==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveErrHashCode, onCancel:onCancelRemoveErrHashCode, } await notify.subscribe(subscriber); console.info("==================ANS_Remove_0300 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -287,13 +287,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_0400', 0, async function (done) { console.info("===============ANS_Remove_0400==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveErrHashCodePromise, onCancel:onCancelRemoveErrHashCodePromise, } await notify.subscribe(subscriber); console.info("===============ANS_Remove_0400 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -365,13 +365,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_0500', 0, async function (done) { console.info("===============ANS_Remove_0500==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveUseEmptyCharacter, onCancel:onCancelRemoveUseEmptyCharacter, } await notify.subscribe(subscriber); console.info("==================ANS_Remove_0500 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -440,13 +440,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_0600', 0, async function (done) { console.info("===============ANS_Remove_0600 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:OnConsumeRemoveUseEmptyCharacterPromise, onCancel:OnCancelRemoveUseEmptyCharacterPromise, } await notify.subscribe(subscriber); console.info("==================ANS_Remove_0600 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -518,13 +518,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_0700', 0, async function (done) { console.info("===============ANS_Remove_0700==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveNotExistHashCode, onCancel:onCancelRemoveNotExistHashCode, } await notify.subscribe(subscriber); console.info("================ANS_Remove_0700 subscribe promise=======>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -593,13 +593,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_0800', 0, async function (done) { console.info("===============ANS_Remove_0800==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveNotExistHashCodePromise, onCancel:onCancelRemoveNotExistHashCodePromise, } await notify.subscribe(subscriber); console.info("================ANS_Remove_0800 subscribe promise=======>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -671,13 +671,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_0900', 0, async function (done) { console.info("===============ANS_Remove_0900==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveNonComplianceHashCode, onCancel:onCancelRemoveNonComplianceHashCode, } await notify.subscribe(subscriber); console.info("============ANS_Remove_0900 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -745,13 +745,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_1000', 0, async function (done) { console.info("===============ANS_Remove_1000==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveNonComplianceHashCodePromise, onCancel:onCancelRemoveNonComplianceHashCodePromise, } await notify.subscribe(subscriber); console.info("================ANS_Remove_1000 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -805,7 +805,7 @@ describe('ActsAnsNotificationRemove', function () { notify.remove(hashCode1100,removeCallBack2TimesOf2); console.info("=====ANS_Remove_1100 removeCallBack2TimesOf1 end============>"); } - var hashCode1100; + let hashCode1100; function onConsumeCallbackRemove2Times(data) { console.info("=====ANS_Remove_1100 onConsume start=================>"); console.info("=====ANS_Remove_1100 onConsume data: ================>" + JSON.stringify(data)); @@ -814,7 +814,7 @@ describe('ActsAnsNotificationRemove', function () { console.info("=====ANS_Remove_1100 onConsume remove================>"); console.info("=====ANS_Remove_1100 onConsume end===================>"); } - var timesOfOnCancelCallbackRemove2Times + let timesOfOnCancelCallbackRemove2Times function onCancelCallbackRemove2Times(data) { timesOfOnCancelCallbackRemove2Times = timesOfOnCancelCallbackRemove2Times + 1 console.info("=====ANS_Remove_1100 onCancel start=======================>"); @@ -837,13 +837,13 @@ describe('ActsAnsNotificationRemove', function () { console.info("===============ANS_Remove_1100==========================>"); hashCode1100 = 0; timesOfOnCancelCallbackRemove2Times = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeCallbackRemove2Times, onCancel:onCancelCallbackRemove2Times, } await notify.subscribe(subscriber); console.info("===============ANS_Remove_1100 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -901,7 +901,7 @@ describe('ActsAnsNotificationRemove', function () { console.info("================ANS_Remove_1200 onConsume end=================>"); }); } - var timesOfOnCancelCallbackRemove2TimesPromise + let timesOfOnCancelCallbackRemove2TimesPromise function onCancelCallbackRemove2TimesPromise(data) { timesOfOnCancelCallbackRemove2TimesPromise = timesOfOnCancelCallbackRemove2TimesPromise + 1 console.info("================ANS_Remove_1200 onCancel start=========>"); @@ -924,13 +924,13 @@ describe('ActsAnsNotificationRemove', function () { it('ANS_Remove_1200', 0, async function (done) { console.info("===============ANS_Remove_1200 start========================>"); timesOfOnCancelCallbackRemove2TimesPromise = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeCallbackRemove2TimesPromise, onCancel:onCancelCallbackRemove2TimesPromise, } await notify.subscribe(subscriber); console.info("===============ANS_Remove_1200 subscribe promise=============>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1000,13 +1000,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_1300', 0, async function (done) { console.info("===============ANS_Remove_1300==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveIsUnremovable, onCancel:onCancelRemoveIsUnremovable, } await notify.subscribe(subscriber); console.info("================ANS_Remove_1300 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1073,13 +1073,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_1400', 0, async function (done) { console.info("===============ANS_Remove_1400 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:OnConsumeRemoveIsUnremovablePromise, onCancel:OnCancelRemoveIsUnremovablePromise, } await notify.subscribe(subscriber); console.info("===============ANS_Remove_1400 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1120,12 +1120,12 @@ describe('ActsAnsNotificationRemove', function () { }),timeout); }) - var timesOfOnConsumeRemoveAllByBundleOption + let timesOfOnConsumeRemoveAllByBundleOption function onConsumeRemoveAllByBundleOption(data) { timesOfOnConsumeRemoveAllByBundleOption = timesOfOnConsumeRemoveAllByBundleOption + 1 console.info("==========ANS_Remove_1500 onConsume start=======>"); console.info("==========ANS_Remove_1500 onConsume data:=======>" + JSON.stringify(data)); - var bundleOption = { + let bundleOption = { bundle:data.request.creatorBundleName, uid:data.request.creatorUid, } @@ -1135,7 +1135,7 @@ describe('ActsAnsNotificationRemove', function () { } console.info("===========ANS_Remove_1500 onConsume end===========>"); } - var timesOfOnCancelRemoveAllByBundleOption + let timesOfOnCancelRemoveAllByBundleOption function onCancelRemoveAllByBundleOption(data) { timesOfOnCancelRemoveAllByBundleOption = timesOfOnCancelRemoveAllByBundleOption + 1 console.info("===========ANS_Remove_1500 onCancel start====================>"); @@ -1163,13 +1163,13 @@ describe('ActsAnsNotificationRemove', function () { console.info("===============ANS_Remove_1500 start==========================>"); timesOfOnCancelRemoveAllByBundleOption = 0 timesOfOnConsumeRemoveAllByBundleOption = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveAllByBundleOption, onCancel:onCancelRemoveAllByBundleOption, } await notify.subscribe(subscriber); console.info("===============ANS_Remove_1500 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1199,7 +1199,7 @@ describe('ActsAnsNotificationRemove', function () { badgeIconStyle: 1, showDeliveryTime: true, } - var notificationRequest1 = { + let notificationRequest1 = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1242,11 +1242,11 @@ describe('ActsAnsNotificationRemove', function () { }),timeout); }) - var timesOfOnConsumeRemoveAllByBundleOptionNullUid + let timesOfOnConsumeRemoveAllByBundleOptionNullUid function onConsumeRemoveAllByBundleOptionNullUid(data) { console.info("===============ANS_Remove_1600 onConsume start================>"); console.info("===============ANS_Remove_1600 onConsume data:========>" + JSON.stringify(data)); - var bundleOption = { + let bundleOption = { bundle:data.request.creatorBundleName, uid:0, } @@ -1278,13 +1278,13 @@ describe('ActsAnsNotificationRemove', function () { it('ANS_Remove_1600', 0, async function (done) { console.info("===============ANS_Remove_1600==========================>"); timesOfOnConsumeRemoveAllByBundleOptionNullUid = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveAllByBundleOptionNullUid, onCancel:onCancelRemoveAllByBundleOptionNullUid, } await notify.subscribe(subscriber); console.info("==================ANS_Remove_1600 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1314,7 +1314,7 @@ describe('ActsAnsNotificationRemove', function () { badgeIconStyle: 1, showDeliveryTime: true, } - var notificationRequest1 = { + let notificationRequest1 = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1360,7 +1360,7 @@ describe('ActsAnsNotificationRemove', function () { function onConsumeRemoveAllByBundleOptionWrongUid(data) { console.info("========ANS_Remove_1700 onConsume start==============>"); console.info("========ANS_Remove_1700 onConsume data:==============>" + JSON.stringify(data)); - var bundleOption = { + let bundleOption = { bundle:data.request.creatorBundleName, uid:123456789 } @@ -1388,13 +1388,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_1700', 0, async function (done) { console.info("===============ANS_Remove_1700==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveAllByBundleOptionWrongUid, onCancel:onCancelRemoveAllByBundleOptionWrongUid, } await notify.subscribe(subscriber); console.info("=============ANS_Remove_1700 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1439,7 +1439,7 @@ describe('ActsAnsNotificationRemove', function () { function onConsumeRemoveAllByBundleOptionWrongBundleCorrectUid(data) { console.info("==============ANS_Remove_1800 onConsume start=============>"); console.info("==============ANS_Remove_1800 onConsume data:=============>" + JSON.stringify(data)); - var bundleOption = { + let bundleOption = { bundle:"wrongBundleName", uid:data.request.creatorUid, } @@ -1467,13 +1467,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_1800', 0, async function (done) { console.info("===============ANS_Remove_1800 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveAllByBundleOptionWrongBundleCorrectUid, onCancel:onCancelremoveAllByBundleOptionwrongBundleCorrectUid, } await notify.subscribe(subscriber); console.info("================ANS_Remove_1800 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1517,7 +1517,7 @@ describe('ActsAnsNotificationRemove', function () { function onConsumeRemoveAllByBundleOptionNullCharacterBundleCorrectUid(data) { console.info("===========ANS_Remove_1900 onConsume start===============>"); console.info("===========ANS_Remove_1900 onConsume data:===============>" + JSON.stringify(data)); - var bundleOption = { + let bundleOption = { bundle:"", uid:data.request.creatorUid, } @@ -1546,13 +1546,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_1900', 0, async function (done) { console.info("===============ANS_Remove_1900 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveAllByBundleOptionNullCharacterBundleCorrectUid, onCancel:onCancelRemoveAllByBundleOptionNullCharacterBundleCorrectUid, } await notify.subscribe(subscriber); console.info("===============ANS_Remove_1900 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1596,7 +1596,7 @@ describe('ActsAnsNotificationRemove', function () { function onConsumeRemoveAllByBundleOptionWrongBundleWrongUid(data) { console.info("============ANS_Remove_2000 onConsume start================>"); console.info("============ANS_Remove_2000 onConsume data:================>" + JSON.stringify(data)); - var bundleOption = { + let bundleOption = { bundle:"wrongBundleName", uid:123456789, } @@ -1624,13 +1624,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_2000', 0, async function (done) { console.info("===============ANS_Remove_2000 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveAllByBundleOptionWrongBundleWrongUid, onCancel:onCancelRemoveAllByBundleOptionWrongBundleWrongUid, } await notify.subscribe(subscriber); console.info("==============ANS_Remove_2000 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1674,7 +1674,7 @@ describe('ActsAnsNotificationRemove', function () { function onConsumeRemoveAllByBundleOptionNullCharacterBundleWrongUid(data) { console.info("=========ANS_Remove_2100 onConsume start===================>"); console.info("=========ANS_Remove_2100 onConsume data:======>" + JSON.stringify(data)); - var bundleOption = { + let bundleOption = { bundle:"", uid:123456789, } @@ -1703,13 +1703,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_2100', 0, async function (done) { console.info("===============ANS_Remove_2100 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveAllByBundleOptionNullCharacterBundleWrongUid, onCancel:onCancelRemoveAllByBundleOptionNullCharacterBundleWrongUid, } await notify.subscribe(subscriber); console.info("============ANS_Remove_2100 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1753,7 +1753,7 @@ describe('ActsAnsNotificationRemove', function () { function onConsumeRemoveAllByBundleOptionIsUnremovable(data) { console.info("==========ANS_Remove_2200 onConsume start==================>"); console.info("==========ANS_Remove_2200 onConsume data:=================>" + JSON.stringify(data)); - var bundleOption = { + let bundleOption = { bundle:data.request.creatorBundleName, uid:data.request.creatorUid, } @@ -1781,13 +1781,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_2200', 0, async function (done) { console.info("===============ANS_Remove_2200 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveAllByBundleOptionIsUnremovable, onCancel:onCancelRemoveAllByBundleOptionIsUnremovable, } await notify.subscribe(subscriber); console.info("==============ANS_Remove_2200 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1834,7 +1834,7 @@ describe('ActsAnsNotificationRemove', function () { console.info("================ANS_Remove_2300 removeAllCallBack data:=========>" + JSON.stringify(data)); console.info("================ANS_Remove_2300 removeAllCallBack end:==========>") } - var timesOfOnConsumeRemoveAll + let timesOfOnConsumeRemoveAll function onConsumeRemoveAll(data) { timesOfOnConsumeRemoveAll = timesOfOnConsumeRemoveAll + 1 console.info("================ANS_Remove_2300 onConsume start==================>"); @@ -1846,7 +1846,7 @@ describe('ActsAnsNotificationRemove', function () { } console.info("================ANS_Remove_2300 onConsume end====================>"); } - var timesOfOnCancelRemoveAll + let timesOfOnCancelRemoveAll function onCancelRemoveAll(data) { timesOfOnCancelRemoveAll = timesOfOnCancelRemoveAll + 1 console.info("==================ANS_Remove_2300 onCancel start===========>"); @@ -1872,13 +1872,13 @@ describe('ActsAnsNotificationRemove', function () { console.info("===============ANS_Remove_2300 start==========================>"); timesOfOnConsumeRemoveAll = 0; timesOfOnCancelRemoveAll = 0; - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveAll, onCancel:onCancelRemoveAll, } await notify.subscribe(subscriber); console.info("=============ANS_Remove_2300 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1908,7 +1908,7 @@ describe('ActsAnsNotificationRemove', function () { badgeIconStyle: 1, showDeliveryTime: true, } - var notificationRequest1 = { + let notificationRequest1 = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -1951,7 +1951,6 @@ describe('ActsAnsNotificationRemove', function () { }),timeout); }) - var timesOfOnConsumeRemoveAll function onConsumeRemoveAllPromise(data) { timesOfOnConsumeRemoveAll = timesOfOnConsumeRemoveAll + 1 console.info("===========ANS_Remove_2400 onConsume start==============>"); @@ -1963,7 +1962,7 @@ describe('ActsAnsNotificationRemove', function () { } console.info("===========ANS_Remove_2400 onConsume end==============>"); } - var timesOfOnCancelRemoveAll + function onCancelRemoveAllPromise(data) { timesOfOnCancelRemoveAll = timesOfOnCancelRemoveAll + 1 console.info("===========ANS_Remove_2400 onCancel start=======================>"); @@ -1989,13 +1988,13 @@ describe('ActsAnsNotificationRemove', function () { console.info("===============ANS_Remove_2400 start==========================>"); timesOfOnConsumeRemoveAll = 0 timesOfOnCancelRemoveAll = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveAllPromise, onCancel:onCancelRemoveAllPromise, } await notify.subscribe(subscriber); console.info("==============ANS_Remove_2400 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -2025,7 +2024,7 @@ describe('ActsAnsNotificationRemove', function () { badgeIconStyle: 1, showDeliveryTime: true, } - var notificationRequest1 = { + let notificationRequest1 = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -2096,13 +2095,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_2500', 0, async function (done) { console.info("===============ANS_Remove_2500 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveAllIsUnremovable, onCancel:onCancelCallbackRemoveAllIsUnremovable, } await notify.subscribe(subscriber); console.info("======ANS_Remove_2500 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -2164,13 +2163,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_2600', 0, async function (done) { console.info("===============ANS_Remove_2600 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:OnConsumeRemoveAllIsUnremovablePromise, onCancel:OnCancelCallbackRemoveAllIsUnremovablePromise, } await notify.subscribe(subscriber); console.info("============ANS_Remove_2600 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -2231,7 +2230,7 @@ describe('ActsAnsNotificationRemove', function () { console.info("=======ANS_Remove_2700 onConsume remove========>"); console.info("=======ANS_Remove_2700 onConsume end===========>"); } - var timesOfOnCancelCallbackRemoveAll2Times + let timesOfOnCancelCallbackRemoveAll2Times function onCancelRemoveAll2Times(data) { timesOfOnCancelCallbackRemoveAll2Times = timesOfOnCancelCallbackRemoveAll2Times + 1 console.info("=======ANS_Remove_2700 onCancel start============>"); @@ -2254,13 +2253,13 @@ describe('ActsAnsNotificationRemove', function () { it('ANS_Remove_2700', 0, async function (done) { console.info("===============ANS_Remove_2700 start==========================>"); timesOfOnCancelCallbackRemoveAll2Times = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveAll2Times, onCancel:onCancelRemoveAll2Times, } await notify.subscribe(subscriber); console.info("============ANS_Remove_2700 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -2310,7 +2309,7 @@ describe('ActsAnsNotificationRemove', function () { console.info("=============ANS_Remove_2800 onConsume removeAll2=======================>"); console.info("=============ANS_Remove_2800 onConsume end=============>"); } - var timesOfOnCancelCallbackRemoveAll2TimesPromise + let timesOfOnCancelCallbackRemoveAll2TimesPromise function onCancelCallbackRemoveAll2TimesPromise(data) { timesOfOnCancelCallbackRemoveAll2TimesPromise = timesOfOnCancelCallbackRemoveAll2TimesPromise + 1 console.info("===================ANS_Remove_2800 onCancel start=======================>"); @@ -2332,13 +2331,13 @@ describe('ActsAnsNotificationRemove', function () { it('ANS_Remove_2800', 0, async function (done) { console.info("===============ANS_Remove_2800 start==========================>"); timesOfOnCancelCallbackRemoveAll2TimesPromise = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeCallbackRemoveAll2TimesPromise, onCancel:onCancelCallbackRemoveAll2TimesPromise, } await notify.subscribe(subscriber); console.info("================ANS_Remove_2800 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -2386,11 +2385,11 @@ describe('ActsAnsNotificationRemove', function () { console.info("=======ANS_Remove_2900 onConsume creatorUid:==============>" + data.request.creatorUid); console.info("=======ANS_Remove_2900 onConsume id: =======================>" + data.request.id); console.info("=======ANS_Remove_2900 onConsume label: =======================>" + data.request.label); - var bundleOption = { + let bundleOption = { bundle:data.request.creatorBundleName, uid:data.request.creatorUid, } - var notificationKey = { + let notificationKey = { id:data.request.id, label:data.request.label } @@ -2423,13 +2422,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_2900', 0, async function (done) { console.info("===============ANS_Remove_2900 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveByNotificationKey, onCancel:onCancelRemoveByNotificationKey, } await notify.subscribe(subscriber); console.info("================ANS_Remove_2900 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -2473,11 +2472,11 @@ describe('ActsAnsNotificationRemove', function () { function onConsumeRemoveByNotificationKeyPromise(data) { console.info("==========ANS_Remove_3000 onConsume start==============>"); console.info("==========ANS_Remove_3000 data: =======================>" + JSON.stringify(data)); - var bundleOption = { + let bundleOption = { bundle:data.request.creatorBundleName, uid:data.request.creatorUid, } - var notificationKey = { + let notificationKey = { id:30, label:"3000" } @@ -2502,13 +2501,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_3000', 0, async function (done) { console.info("===============ANS_Remove_3000 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveByNotificationKeyPromise, onCancel:onCancelRemoveByNotificationKeyPromise, } await notify.subscribe(subscriber); console.info("===============ANS_Remove_3000 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -2552,11 +2551,11 @@ describe('ActsAnsNotificationRemove', function () { function onConsumeRemoveByNotificationKeyWrongKey(data) { console.info("==========ANS_Remove_3100 onConsume start=============>"); console.info("==========ANS_Remove_3100 onConsume data:=============>" + JSON.stringify(data)); - var bundleOption = { + let bundleOption = { bundle:data.request.creatorBundleName, uid:data.request.creatorUid, } - var notificationKey = { + let notificationKey = { id:0, label:"wrongLabel" } @@ -2587,13 +2586,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_3100', 0, async function (done) { console.info("===============ANS_Remove_3100 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveByNotificationKeyWrongKey, onCancel:onCancelRemoveByNotificationKeyWrongKey, } await notify.subscribe(subscriber); console.info("==============ANS_Remove_3100 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -2637,11 +2636,11 @@ describe('ActsAnsNotificationRemove', function () { function onConsumeRemoveByNotificationKeyWrongKeyPromise(data) { console.info("===========ANS_Remove_3200 onConsume start===============>"); console.info("===========ANS_Remove_3200 onConsume data:===============>" + JSON.stringify(data)); - var bundleOption = { + let bundleOption = { bundle:data.request.creatorBundleName, uid:data.request.creatorUid, } - var notificationKey = { + let notificationKey = { id:0, label:"wrongLabel" } @@ -2670,13 +2669,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_3200', 0, async function (done) { console.info("===============ANS_Remove_3200 start=================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveByNotificationKeyWrongKeyPromise, onCancel:onCancelRemoveByNotificationKeyWrongKeyPromise, } await notify.subscribe(subscriber); console.info("===============ANS_Remove_3200 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -2720,11 +2719,11 @@ describe('ActsAnsNotificationRemove', function () { function OnConsumeRemoveByNotificationKeyWrongBundle(data) { console.info("==============ANS_Remove_3300 onConsume start===============>"); console.info("==============ANS_Remove_3300 onConsume data:===============>" + JSON.stringify(data)); - var bundleOption = { + let bundleOption = { bundle:"wrongBundleName", uid:0, } - var notificationKey = { + let notificationKey = { id:33, label:"3300" } @@ -2755,13 +2754,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_3300', 0, async function (done) { console.info("===============ANS_Remove_3300 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:OnConsumeRemoveByNotificationKeyWrongBundle, onCancel:OnCancelRemoveByNotificationKeyWrongBundle, } await notify.subscribe(subscriber); console.info("================ANS_Remove_3300 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -2805,11 +2804,11 @@ describe('ActsAnsNotificationRemove', function () { function onConsumeRemoveByNotificationKeyWrongBundlePromise(data) { console.info("===========ANS_Remove_3400 onConsume start============>"); console.info("===========ANS_Remove_3400 onConsume data:============>" + JSON.stringify(data)); - var bundleOption = { + let bundleOption = { bundle:"wrongBundleName", uid:0, } - var notificationKey = { + let notificationKey = { id:34, label:"3400" } @@ -2838,13 +2837,13 @@ describe('ActsAnsNotificationRemove', function () { */ it('ANS_Remove_3400', 0, async function (done) { console.info("===============ANS_Remove_3400 start==========================>"); - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveByNotificationKeyWrongBundlePromise, onCancel:onCancelRemoveByNotificationKeyWrongBundlePromise, } await notify.subscribe(subscriber); console.info("============ANS_Remove_3400 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -2902,11 +2901,11 @@ describe('ActsAnsNotificationRemove', function () { function onConsumeRemoveByNotificationKey2Times(data) { console.info("=========ANS_Remove_3500 onConsume start=======================>"); console.info("=========ANS_Remove_3500 onConsume data:=========>" + JSON.stringify(data)); - var bundleOption = { + let bundleOption = { bundle:data.request.creatorBundleName, uid:data.request.creatorUid, } - var notificationKey = { + let notificationKey = { id:35, label:"3500" } @@ -2915,7 +2914,7 @@ describe('ActsAnsNotificationRemove', function () { console.info("=========ANS_Remove_3500 onConsume remove==============>"); console.info("=========ANS_Remove_3500 onConsume end=================>"); } - var timesOfOnCancelRemoveByNotificationKey2Times + let timesOfOnCancelRemoveByNotificationKey2Times function onCancelRemoveByNotificationKey2Times(data) { timesOfOnCancelRemoveByNotificationKey2Times = timesOfOnCancelRemoveByNotificationKey2Times + 1 console.info("=========ANS_Remove_3500 onCancel start===============>"); @@ -2938,13 +2937,13 @@ describe('ActsAnsNotificationRemove', function () { it('ANS_Remove_3500', 0, async function (done) { console.info("===============ANS_Remove_3500 start==========================>"); timesOfOnCancelRemoveByNotificationKey2Times = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveByNotificationKey2Times, onCancel:onCancelRemoveByNotificationKey2Times, } await notify.subscribe(subscriber); console.info("===========ANS_Remove_3500 subscribe promise==================>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { @@ -2988,11 +2987,11 @@ describe('ActsAnsNotificationRemove', function () { function onConsumeRemoveByNotificationKey2TimesPromise(data) { console.info("=========ANS_Remove_3600 onConsume start===========>"); console.info("=========ANS_Remove_3600 onConsume data: =======================>" + JSON.stringify(data)); - var bundleOption = { + let bundleOption = { bundle:data.request.creatorBundleName, uid:data.request.creatorUid, } - var notificationKey = { + let notificationKey = { id:36, label:"3600" } @@ -3006,7 +3005,7 @@ describe('ActsAnsNotificationRemove', function () { console.info("=========ANS_Remove_3600 onConsume end===========>"); }); } - var timesOnCancelcbRemoveByKey2TimesPromise + let timesOnCancelcbRemoveByKey2TimesPromise function onCancelRemoveByNotificationKey2TimesPromise(data) { timesOnCancelcbRemoveByKey2TimesPromise = timesOnCancelcbRemoveByKey2TimesPromise + 1 console.info("=========ANS_Remove_3600 onCancel start=============>"); @@ -3030,13 +3029,13 @@ describe('ActsAnsNotificationRemove', function () { console.info("===============ANS_Remove_3600 start==========================>"); timesOnCancelcbRemoveByKey2TimesPromise = 0 timesOnCancelcbRemoveByKey2TimesPromise = 0 - var subscriber ={ + let subscriber ={ onConsume:onConsumeRemoveByNotificationKey2TimesPromise, onCancel:onCancelRemoveByNotificationKey2TimesPromise, } await notify.subscribe(subscriber); console.info("========ANS_Remove_3600 subscribe promise=============>"); - var notificationRequest = { + let notificationRequest = { content:{ contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, normal: { diff --git a/notification/ans_standard/publish_test/activebtn/activebutton/entry/src/main/js/test/ActiveButton.js b/notification/ans_standard/publish_test/activebtn/activebutton/entry/src/main/js/test/ActiveButton.js index c54d0d2a9..87d22b779 100644 --- a/notification/ans_standard/publish_test/activebtn/activebutton/entry/src/main/js/test/ActiveButton.js +++ b/notification/ans_standard/publish_test/activebtn/activebutton/entry/src/main/js/test/ActiveButton.js @@ -228,9 +228,9 @@ describe('ActsAnsActionButtonTest', function () { WantAgent.trigger(wantAgentD, triggerInfoD, (err, data) => { if (err.code == 0) { - console.info('==== triggerD success' + err.code+JSON.stringify(data) ); + console.info('==== triggered success' + err.code+JSON.stringify(data) ); } else { - console.info('----triggerD failed!----'+err.code); + console.info('----triggered failed!----'+err.code); } }); } diff --git a/notification/ans_standard/publish_test/actsansgetallactive/entry/src/main/js/default/pages/index/index.css b/notification/ans_standard/publish_test/actsansgetallactive/entry/src/main/js/default/pages/index/index.css index 6fda79275..b6c4207e3 100644 --- a/notification/ans_standard/publish_test/actsansgetallactive/entry/src/main/js/default/pages/index/index.css +++ b/notification/ans_standard/publish_test/actsansgetallactive/entry/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + .container { flex-direction: column; justify-content: center; diff --git a/notification/ans_standard/publish_test/actsansgetallactive/entry/src/main/js/default/pages/index/index.hml b/notification/ans_standard/publish_test/actsansgetallactive/entry/src/main/js/default/pages/index/index.hml index 3fdb04663..8a1e681a5 100644 --- a/notification/ans_standard/publish_test/actsansgetallactive/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ans_standard/publish_test/actsansgetallactive/entry/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +
currentApp diff --git a/notification/ans_standard/publish_test/enablenotification/enablenotification/entry/src/main/js/default/pages/index/index.hml b/notification/ans_standard/publish_test/enablenotification/enablenotification/entry/src/main/js/default/pages/index/index.hml index adeaa48ae..0e49f720d 100644 --- a/notification/ans_standard/publish_test/enablenotification/enablenotification/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ans_standard/publish_test/enablenotification/enablenotification/entry/src/main/js/default/pages/index/index.hml @@ -15,6 +15,6 @@
- 通知许可设定测试 + Test Enabling of Notifiction
diff --git a/notification/ans_standard/publish_test/publish/entry/src/main/js/default/pages/index/index.css b/notification/ans_standard/publish_test/publish/entry/src/main/js/default/pages/index/index.css index 6fda79275..b6c4207e3 100644 --- a/notification/ans_standard/publish_test/publish/entry/src/main/js/default/pages/index/index.css +++ b/notification/ans_standard/publish_test/publish/entry/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + .container { flex-direction: column; justify-content: center; diff --git a/notification/ans_standard/publish_test/publish/entry/src/main/js/default/pages/index/index.hml b/notification/ans_standard/publish_test/publish/entry/src/main/js/default/pages/index/index.hml index e4de1079a..792a7047e 100644 --- a/notification/ans_standard/publish_test/publish/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ans_standard/publish_test/publish/entry/src/main/js/default/pages/index/index.hml @@ -1,5 +1,20 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +
- 发布Icon通知 + Publishing ICON Notifiction
diff --git a/notification/ans_standard/publish_test/sub/entry/src/main/js/default/pages/index/index.css b/notification/ans_standard/publish_test/sub/entry/src/main/js/default/pages/index/index.css index 6fda79275..b6c4207e3 100644 --- a/notification/ans_standard/publish_test/sub/entry/src/main/js/default/pages/index/index.css +++ b/notification/ans_standard/publish_test/sub/entry/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + .container { flex-direction: column; justify-content: center; diff --git a/notification/ans_standard/publish_test/sub/entry/src/main/js/default/pages/index/index.hml b/notification/ans_standard/publish_test/sub/entry/src/main/js/default/pages/index/index.hml index e42bdfdd2..409a06e52 100644 --- a/notification/ans_standard/publish_test/sub/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ans_standard/publish_test/sub/entry/src/main/js/default/pages/index/index.hml @@ -1,5 +1,20 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +
- 订阅发布 + Text of Publishing Common Event
diff --git a/notification/ans_standard/publish_test/wantagent/wantagent1/entry/src/main/js/default/pages/index/index.hml b/notification/ans_standard/publish_test/wantagent/wantagent1/entry/src/main/js/default/pages/index/index.hml index 969be056a..f5f3da820 100644 --- a/notification/ans_standard/publish_test/wantagent/wantagent1/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ans_standard/publish_test/wantagent/wantagent1/entry/src/main/js/default/pages/index/index.hml @@ -15,6 +15,6 @@
- WantAgent1 + WantAgent1 Startup
diff --git a/notification/ans_standard/publish_test/wantagent/wantagent1promise/entry/src/main/js/default/pages/index/index.hml b/notification/ans_standard/publish_test/wantagent/wantagent1promise/entry/src/main/js/default/pages/index/index.hml index 77e87fff3..983b66268 100644 --- a/notification/ans_standard/publish_test/wantagent/wantagent1promise/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ans_standard/publish_test/wantagent/wantagent1promise/entry/src/main/js/default/pages/index/index.hml @@ -15,6 +15,6 @@
- WantAgent1Promise + WantAgent1Promise Startup
diff --git a/notification/ans_standard/publish_test/wantagent/wantagent3/entry/src/main/js/default/pages/index/index.hml b/notification/ans_standard/publish_test/wantagent/wantagent3/entry/src/main/js/default/pages/index/index.hml index ec9e6323f..515e12f3f 100644 --- a/notification/ans_standard/publish_test/wantagent/wantagent3/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ans_standard/publish_test/wantagent/wantagent3/entry/src/main/js/default/pages/index/index.hml @@ -15,6 +15,6 @@
- WantAgent3 + WantAgent3 Startup
diff --git a/notification/ans_standard/publish_test/wantagent/wantagent3promise/entry/src/main/js/default/pages/index/index.hml b/notification/ans_standard/publish_test/wantagent/wantagent3promise/entry/src/main/js/default/pages/index/index.hml index 1bbdc4ac7..d1def95a2 100644 --- a/notification/ans_standard/publish_test/wantagent/wantagent3promise/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ans_standard/publish_test/wantagent/wantagent3promise/entry/src/main/js/default/pages/index/index.hml @@ -15,6 +15,6 @@
- WantAgentPromise3 + WantAgentPromise3 Startup
diff --git a/notification/ans_standard/publish_test/wantagent/wantagent4/entry/src/main/js/default/pages/index/index.hml b/notification/ans_standard/publish_test/wantagent/wantagent4/entry/src/main/js/default/pages/index/index.hml index 0c14fffd3..0ac0a1b46 100644 --- a/notification/ans_standard/publish_test/wantagent/wantagent4/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ans_standard/publish_test/wantagent/wantagent4/entry/src/main/js/default/pages/index/index.hml @@ -15,6 +15,6 @@
- WantAgent4 + WantAgent4 Startup
diff --git a/notification/ans_standard/publish_test/wantagent/wantagent4promise/entry/src/main/js/default/pages/index/index.hml b/notification/ans_standard/publish_test/wantagent/wantagent4promise/entry/src/main/js/default/pages/index/index.hml index f570a6189..3ebe06578 100644 --- a/notification/ans_standard/publish_test/wantagent/wantagent4promise/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ans_standard/publish_test/wantagent/wantagent4promise/entry/src/main/js/default/pages/index/index.hml @@ -15,6 +15,6 @@
- WantAgentPromise4 - + WantAgentPromise4 Startup +
diff --git a/notification/ans_standard/publish_test/wantagent/wantagent5/entry/src/main/js/default/pages/index/index.hml b/notification/ans_standard/publish_test/wantagent/wantagent5/entry/src/main/js/default/pages/index/index.hml index c87150d93..5399a3b0f 100644 --- a/notification/ans_standard/publish_test/wantagent/wantagent5/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ans_standard/publish_test/wantagent/wantagent5/entry/src/main/js/default/pages/index/index.hml @@ -15,6 +15,6 @@
- WantAgent5 + WantAgent5 Startup
diff --git a/notification/ans_standard/publish_test/wantagent/wantagent5promise/entry/src/main/js/default/pages/index/index.hml b/notification/ans_standard/publish_test/wantagent/wantagent5promise/entry/src/main/js/default/pages/index/index.hml index 509642d74..72829fa2c 100644 --- a/notification/ans_standard/publish_test/wantagent/wantagent5promise/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ans_standard/publish_test/wantagent/wantagent5promise/entry/src/main/js/default/pages/index/index.hml @@ -15,6 +15,6 @@
- WantAgentPromise5 + WantAgentPromise5 Startup
diff --git a/notification/ces_standard/subscribeandpublish/actspublish/entry/src/main/js/default/pages/index/index.css b/notification/ces_standard/subscribeandpublish/actspublish/entry/src/main/js/default/pages/index/index.css index 6fda79275..b6c4207e3 100644 --- a/notification/ces_standard/subscribeandpublish/actspublish/entry/src/main/js/default/pages/index/index.css +++ b/notification/ces_standard/subscribeandpublish/actspublish/entry/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + .container { flex-direction: column; justify-content: center; diff --git a/notification/ces_standard/subscribeandpublish/actspublish/entry/src/main/js/default/pages/index/index.hml b/notification/ces_standard/subscribeandpublish/actspublish/entry/src/main/js/default/pages/index/index.hml index 794e7a821..153d713d1 100644 --- a/notification/ces_standard/subscribeandpublish/actspublish/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ces_standard/subscribeandpublish/actspublish/entry/src/main/js/default/pages/index/index.hml @@ -1,6 +1,21 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +
- 您好,地球1111 + Hello, World! {{ $t('strings.hello') }} {{ title }}
diff --git a/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/default/pages/index/index.hml b/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/default/pages/index/index.hml index 145f39483..433e7c8f8 100644 --- a/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/default/pages/index/index.hml @@ -15,7 +15,7 @@
- Hello,Earth! 1111 + Hello, World! {{ $t('strings.hello') }} {{ title }}
diff --git a/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/test/ActsSubscriber_test_ordered.js b/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/test/ActsSubscriber_test_ordered.js index b8799a0a7..34276bf23 100644 --- a/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/test/ActsSubscriber_test_ordered.js +++ b/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/test/ActsSubscriber_test_ordered.js @@ -17,18 +17,18 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from ' describe('ActsSubscriberTestOrder', function () { console.info("===========ActsSubscriberTestOrder start====================>"); - var num2 = 0; - var order = false; - var commonEventSubscriber0100; - var commonEventSubscriber0101; - var commonEventSubscriber0200; - var commonEventSubscriber0201; - var commonEventSubscriber0300; - var commonEventSubscriber0301; - var commonEventSubscriber0400; - var commonEventSubscriber0401; - var commonEventSubscriber0500; - var commonEventSubscriber0501; + let num2 = 0; + let order = false; + let commonEventSubscriber0100; + let commonEventSubscriber0101; + let commonEventSubscriber0200; + let commonEventSubscriber0201; + let commonEventSubscriber0300; + let commonEventSubscriber0301; + let commonEventSubscriber0400; + let commonEventSubscriber0401; + let commonEventSubscriber0500; + let commonEventSubscriber0501; function publishCallback(err) { console.info("===============>publishCallback"); @@ -46,17 +46,17 @@ describe('ActsSubscriberTestOrder', function () { it('ActsSubscriberTestOrder_0100', 0, async function (done) { console.info("===============ActsSubscriberTestOrder_0100===============>"); - var commonEventSubscribeInfo1 = { + let commonEventSubscribeInfo1 = { events: ["publish_event0100"], priority: 10 }; - var commonEventSubscribeInfo2 = { + let commonEventSubscribeInfo2 = { events: ["publish_event0100"], priority: 9 }; - var commonEventPublishData = { + let commonEventPublishData = { bundleName: "publish_event0100_bundleName", code: 1, data: "publish_event1001_init", @@ -163,25 +163,25 @@ describe('ActsSubscriberTestOrder', function () { it ('ActsSubscriberTestOrder_0200', 0, async function (done) { console.info("===============ActsSubscriberTestOrder_0200===============>"); - var commonEventSubscribeInfo1 = { + let commonEventSubscribeInfo1 = { events: ["publish_event0200", "publish_event0201"], priority: 10 }; - var commonEventSubscribeInfo2 = { + let commonEventSubscribeInfo2 = { events: ["publish_event0201"], priority: 9 }; - var commonEventPublishData1 = { + let commonEventPublishData1 = { bundleName: "publish_event0200_bundleName", code: 1, data: "publish_event0200_init", isOrdered: false, } - var commonEventPublishData2 = { + let commonEventPublishData2 = { bundleName: "publish_event0201_bundleName", code: 1, data: "publish_event0201_init", @@ -275,24 +275,24 @@ describe('ActsSubscriberTestOrder', function () { it ('ActsSubscriberTestOrder_0300', 0, async function (done) { console.info("===============ActsSubscriberTestOrder_0300===============>"); - var commonEventSubscribeInfo1 = { + let commonEventSubscribeInfo1 = { events: ["publish_event0301"], priority: 9 }; - var commonEventSubscribeInfo2 = { + let commonEventSubscribeInfo2 = { events: ["publish_event0301"], priority: 10 }; - var commonEventPublishData2 = { + let commonEventPublishData2 = { bundleName: "publish_event0301_bundleName", code: 1, data: "publish_event0301_init", isOrdered: true, } - var callBackNum = 0; + let callBackNum = 0; async function subscriberCallBack0300(err, data) { console.info("===============>subscriberCallBack0300========event: " + data.event); console.info("===============>subscriberCallBack0300========bundleName: " + data.bundleName); @@ -368,7 +368,7 @@ describe('ActsSubscriberTestOrder', function () { data.getSubscribeInfo().then(()=>{ console.info("===============ActsSubscriberTestOrder_0300=========getSubscribeInfo promise2"); Subscriber.subscribe(commonEventSubscriber0301, subscriberCallBack0301); - var numindex = 0; + let numindex = 0; for (; numindex < 3; ++numindex) { setTimeout(function(){ console.debug("===================ActsSubscriberTestOrder_0300 delay 100ms=================="); @@ -388,17 +388,17 @@ describe('ActsSubscriberTestOrder', function () { it ('ActsSubscriberTestOrder_0400', 0, async function (done) { console.info("===============ActsSubscriberTestOrder_0400===============>"); - var commonEventSubscribeInfo1 = { + let commonEventSubscribeInfo1 = { events: ["publish_eventOrder0400"], priority: 10 }; - var commonEventSubscribeInfo2 = { + let commonEventSubscribeInfo2 = { events: ["publish_eventOrder0400"], priority: 9 }; - var commonEventPublishData = { + let commonEventPublishData = { bundleName: "publish_event0400_bundleName", code: 1, data: "publish_event0400_init", @@ -472,17 +472,17 @@ describe('ActsSubscriberTestOrder', function () { it ('ActsSubscriberTestOrder_0500', 0, async function (done) { console.info("===============ActsSubscriberTestOrder_0500===============>"); - var commonEventSubscribeInfo1 = { + let commonEventSubscribeInfo1 = { events: ["publish_event0500"], priority: 1001 }; - var commonEventSubscribeInfo2 = { + let commonEventSubscribeInfo2 = { events: ["publish_event0500"], priority: -101 }; - var commonEventPublishData = { + let commonEventPublishData = { bundleName: "publish_event0500_bundleName", code: 10, data: "publish_event0500_init", diff --git a/notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/default/pages/index/index.hml b/notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/default/pages/index/index.hml index 02b44f5cd..7405385b2 100644 --- a/notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/default/pages/index/index.hml @@ -15,7 +15,7 @@
- Hello,Earth! 1111 + Hello, World! {{ $t('strings.hello') }} {{ title }}
diff --git a/notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/test/ActsSubscriber_test_unorder.js b/notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/test/ActsSubscriber_test_unorder.js index 530e34eae..8f56e0b57 100755 --- a/notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/test/ActsSubscriber_test_unorder.js +++ b/notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/test/ActsSubscriber_test_unorder.js @@ -17,10 +17,10 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from ' describe('ActsSubscriberTestUnorderSystem', async function (done) { console.info("===========ActsSubscriberTestUnorderSystem start====================>"); - var commonEventSubscriber1; - var commonEventSubscriber2; - var commonEventSubscriber3; - var array = [ + let commonEventSubscriber1; + let commonEventSubscriber2; + let commonEventSubscriber3; + let array = [ Subscriber.Support.COMMON_EVENT_SHUTDOWN, Subscriber.Support.COMMON_EVENT_BATTERY_CHANGED, Subscriber.Support.COMMON_EVENT_BATTERY_LOW, @@ -116,9 +116,9 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) { } function findArray(str) { - var value = false; - var index1 = 0; - var length = array.length; + let value = false; + let index1 = 0; + let length = array.length; for(; index1 < length; ++index1) { if (array[index1] == str) { value = true; @@ -135,7 +135,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) { */ it('ActsSubscriberTestUnorderSystem_0100', 0, async function (done) { console.info("===============ActsSubscriberTestUnorderSystem_0100 start==========================>"); - var commonEventSubscribeInfo = { + let commonEventSubscribeInfo = { events: [ Subscriber.Support.COMMON_EVENT_SHUTDOWN, Subscriber.Support.COMMON_EVENT_BATTERY_CHANGED, @@ -190,7 +190,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) { ], }; - var result = 0; + let result = 0; function subscriberCallBack001(err, data) { console.info("==========================>subscriberCallBack001 event = "+ data.event); @@ -226,7 +226,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) { */ it('ActsSubscriberTestUnorderSystem_0200', 0, async function (done) { console.info("===============ActsSubscriberTestUnorderSystem_0200 start==========================>"); - var commonEventSubscribeInfo = { + let commonEventSubscribeInfo = { events: [ Subscriber.Support.COMMON_EVENT_WIFI_HOTSPOT_STATE, Subscriber.Support.COMMON_EVENT_BLUETOOTH_A2DPSOURCE_AVRCP_CONNECT_STATE_UPDATE, @@ -267,7 +267,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) { ], }; - var result = 0; + let result = 0; function subscriberCallBack002(err, data) { console.info("==========================>subscriberCallBack002 event = "+ data.event); @@ -304,7 +304,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) { */ it('ActsSubscriberTestUnorderSystem_0300', 0, async function (done) { console.info("===============ActsSubscriberTestUnorderSystem_0300 start==========================>"); - var commonEventSubscribeInfo = { + let commonEventSubscribeInfo = { events: [ Subscriber.Support.COMMON_EVENT_WIFI_P2P_CONN_STATE, Subscriber.Support.COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_DISCOVERED, diff --git a/notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/default/pages/index/index.hml b/notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/default/pages/index/index.hml index 02b44f5cd..7405385b2 100644 --- a/notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/default/pages/index/index.hml @@ -15,7 +15,7 @@
- Hello,Earth! 1111 + Hello, World! {{ $t('strings.hello') }} {{ title }}
diff --git a/notification/ces_standard/subscribeandpublish/emittertest/entry/src/main/js/default/pages/index/index.css b/notification/ces_standard/subscribeandpublish/emittertest/entry/src/main/js/default/pages/index/index.css index 6fda79275..abb706898 100644 --- a/notification/ces_standard/subscribeandpublish/emittertest/entry/src/main/js/default/pages/index/index.css +++ b/notification/ces_standard/subscribeandpublish/emittertest/entry/src/main/js/default/pages/index/index.css @@ -1,4 +1,19 @@ -.container { +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + .container { flex-direction: column; justify-content: center; align-items: center; diff --git a/notification/ces_standard/subscribeandpublish/emittertest/entry/src/main/js/default/pages/index/index.hml b/notification/ces_standard/subscribeandpublish/emittertest/entry/src/main/js/default/pages/index/index.hml index 794e7a821..153d713d1 100644 --- a/notification/ces_standard/subscribeandpublish/emittertest/entry/src/main/js/default/pages/index/index.hml +++ b/notification/ces_standard/subscribeandpublish/emittertest/entry/src/main/js/default/pages/index/index.hml @@ -1,6 +1,21 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +
- 您好,地球1111 + Hello, World! {{ $t('strings.hello') }} {{ title }}
-- GitLab