From d2718376f78dd92b08c5a09b807bcb058977b637 Mon Sep 17 00:00:00 2001 From: zhijianwen Date: Fri, 4 Nov 2022 14:37:34 +0800 Subject: [PATCH] --ActsNotificationManagerPublishTest-- Signed-off-by: zhijianwen --- .../actsNotificationPublishTest/BUILD.gn | 2 +- .../src/main/js/MainAbility/app.js | 2 +- .../main/js/MainAbility/pages/index/index.js | 2 +- .../ActsNotificationManagerPublishTest.js | 389 ++++++++++++++++++ .../js/test/ActsNotificationPublishTest.js | 16 +- .../src/main/js/test/List.test.js | 5 +- 6 files changed, 404 insertions(+), 12 deletions(-) create mode 100644 notification/ans_standard/actsNotificationPublishTest/src/main/js/test/ActsNotificationManagerPublishTest.js diff --git a/notification/ans_standard/actsNotificationPublishTest/BUILD.gn b/notification/ans_standard/actsNotificationPublishTest/BUILD.gn index 8b97e27a6..cb900434c 100644 --- a/notification/ans_standard/actsNotificationPublishTest/BUILD.gn +++ b/notification/ans_standard/actsNotificationPublishTest/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. +# 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 diff --git a/notification/ans_standard/actsNotificationPublishTest/src/main/js/MainAbility/app.js b/notification/ans_standard/actsNotificationPublishTest/src/main/js/MainAbility/app.js index b58cf3c57..5b800cb12 100644 --- a/notification/ans_standard/actsNotificationPublishTest/src/main/js/MainAbility/app.js +++ b/notification/ans_standard/actsNotificationPublishTest/src/main/js/MainAbility/app.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/notification/ans_standard/actsNotificationPublishTest/src/main/js/MainAbility/pages/index/index.js b/notification/ans_standard/actsNotificationPublishTest/src/main/js/MainAbility/pages/index/index.js index 312c30c0c..329d97240 100644 --- a/notification/ans_standard/actsNotificationPublishTest/src/main/js/MainAbility/pages/index/index.js +++ b/notification/ans_standard/actsNotificationPublishTest/src/main/js/MainAbility/pages/index/index.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/notification/ans_standard/actsNotificationPublishTest/src/main/js/test/ActsNotificationManagerPublishTest.js b/notification/ans_standard/actsNotificationPublishTest/src/main/js/test/ActsNotificationManagerPublishTest.js new file mode 100644 index 000000000..2aee9b241 --- /dev/null +++ b/notification/ans_standard/actsNotificationPublishTest/src/main/js/test/ActsNotificationManagerPublishTest.js @@ -0,0 +1,389 @@ +/* +* 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. +*/ + +import notificationManager from '@ohos.notificationManager' +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import image from '@ohos.multimedia.image' +import wantAgent from '@ohos.app.ability.wantAgent' + +export default function ActsNotificationManagerPublishTest() { + describe('SUB_NOTIFICATION_ANS_MANAGER_Publish_TEST', function () { + let TAG = 'SUB_NOTIFICATION_ANS_MANAGER_Publish_TEST ===>' + console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_Publish_TEST START') + + /* + * @tc.number : SUB_NOTIFICATION_ANS_MANAGER_CANCEL_TEST_0100 + * @tc.name : function cancel(id: number, label: string, callback: AsyncCallback): void + * @tc.desc : Cancels a notification with the specified label and ID + */ + it('SUB_NOTIFICATION_ANS_MANAGER_CANCEL_TEST_0100', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_CANCEL_TEST_0100 START`) + let id = 1 + let label = "label" + try { + await notificationManager.cancel(id, label, (err) => { + if (err) { + console.info(`${TAG} cancel AsyncCallback err: ${err.code}, errMes: ${err.message}`) + expect(true).assertTrue() + done() + } else { + console.info(`${TAG} cancel AsyncCallback success`) + expect(false).assertTrue() + done() + } + }) + } catch (err) { + console.info(`${TAG} cancel AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + } + + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_CANCEL_TEST_0100 END`) + }) + + /* + * @tc.number : SUB_NOTIFICATION_ANS_MANAGER_CANCEL_TEST_0200 + * @tc.name : function cancel(id: number, label: string, callback: AsyncCallback): void + * @tc.desc : Cancels a notification with the specified label and ID + */ + it('SUB_NOTIFICATION_ANS_MANAGER_CANCEL_TEST_0200', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_CANCEL_TEST_0100 START`) + let id = 1 + let label = "label" + await notificationManager.cancel(id, label).then(() => { + console.info(`${TAG} cancel Promise success`) + expect(false).assertTrue() + done() + }).catch((err) => { + console.info(`${TAG} cancel Promise err: ${err.code}, errMes: ${err.message}`) + expect(true).assertTrue() + done() + }) + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_CANCEL_TEST_0100 END`) + }) + + /* + * @tc.number : SUB_NOTIFICATION_ANS_MANAGER_CANCEL_TEST_0300 + * @tc.name : function cancel(id: number, callback: AsyncCallback): void + * @tc.desc : Cancels a notification with the specified ID + */ + it('SUB_NOTIFICATION_ANS_MANAGER_CANCEL_TEST_0300', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_CANCEL_TEST_0300 START`) + let id = 1 + try { + await notificationManager.cancel(id, (err) => { + if (err) { + console.info(`${TAG} cancel id err: ${err.code}, errMes: ${err.message}`) + expect(true).assertTrue() + done() + } else { + console.info(`${TAG} cancel id success`) + expect(false).assertTrue() + done() + } + }) + } catch (err) { + console.info(`${TAG} cancel id errCode: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + } + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_CANCEL_TEST_0300 END`) + }) + + /* + * @tc.number : SUB_NOTIFICATION_ANS_MANAGER_CANCELAll_TEST_0100 + * @tc.name : function cancelAll(callback: AsyncCallback): void + * @tc.desc : Cancels all notifications of the current application + */ + it('SUB_NOTIFICATION_ANS_MANAGER_CANCELAll_TEST_0100', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_CANCELAll_TEST_0100 START`) + try { + await notificationManager.cancelAll((err) => { + if (err) { + console.info(`${TAG} cancelAll AsyncCallback err: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + } else { + console.info(`${TAG} cancelAll AsyncCallback success`) + expect(true).assertTrue() + done() + } + }) + } catch (err) { + console.info(`${TAG} cancelAll AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + } + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_CANCELAll_TEST_0100 END`) + }) + + /* + * @tc.number : SUB_NOTIFICATION_ANS_MANAGER_CANCELAll_TEST_0200 + * @tc.name : function cancelAll(): Promise + * @tc.desc : Cancels all notifications of the current application + */ + it('SUB_NOTIFICATION_ANS_MANAGER_CANCELAll_TEST_0200', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_CANCELAll_TEST_0200 START`) + await notificationManager.cancelAll().then(() => { + console.info(`${TAG} cancelAll Promise success`) + expect(true).assertTrue() + done() + }).catch((err) => { + console.info(`${TAG} cancelAll Promise err: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + }) + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_CANCELAll_TEST_0200 END`) + }) + + /* + * @tc.number : SUB_NOTIFICATION_ANS_MANAGER_CANCEL_GROUP_TEST_0100 + * @tc.name : function cancelGroup(groupName: string, callback: AsyncCallback): void + * @tc.desc : Cancel the notification of a specified group for this application + */ + it('SUB_NOTIFICATION_ANS_MANAGER_CANCEL_GROUP_TEST_0100', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_CANCEL_GROUP_TEST_0100 START`) + let groupName = "groupName" + try { + await notificationManager.cancelGroup(groupName, (err) => { + if (err) { + console.info(`${TAG} cancelGroup AsyncCallback err: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + } else { + console.info(`${TAG} cancelGroup AsyncCallback success`) + expect(true).assertTrue() + done() + } + }) + } catch (err) { + console.info(`${TAG} cancelGroup AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + } + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_CANCEL_GROUP_TEST_0100 END`) + }) + + /* + * @tc.number : SUB_NOTIFICATION_ANS_MANAGER_CANCEL_GROUP_TEST_0200 + * @tc.name : function cancelGroup(groupName: string): Promise + * @tc.desc : Cancel the notification of a specified group for this application + */ + it('SUB_NOTIFICATION_ANS_MANAGER_CANCEL_GROUP_TEST_0200', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_CANCEL_GROUP_TEST_0200 START`) + let groupName = "groupName" + await notificationManager.cancelGroup(groupName).then(() => { + console.info(`${TAG} cancelGroup Promise success`) + expect(true).assertTrue() + done() + }).catch((err) => { + console.info(`${TAG} cancelGroup Promise err: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + }) + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_CANCEL_GROUP_TEST_0200 END`) + }) + + /* + * @tc.number : SUB_NOTIFICATION_ANS_MANAGER_REQUEST_ENABLE_TEST_0100 + * @tc.name : function requestEnableNotification(callback: AsyncCallback): void + * @tc.desc : OperationType.UNKNOWN_TYPE & WantAgentFlags.ONE_TIME_FLAG + */ + it('SUB_NOTIFICATION_ANS_MANAGER_REQUEST_ENABLE_TEST_0100', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_REQUEST_ENABLE_TEST_0100 START`) + try { + await notificationManager.requestEnableNotification((err) => { + if (err) { + console.info(`${TAG} requestEnableNotification AsyncCallback err: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + } else { + console.info(`${TAG} requestEnableNotification AsyncCallback success`) + expect(true).assertTrue() + done() + } + }) + } catch (err) { + console.info(`${TAG} requestEnableNotification AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + } + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_REQUEST_ENABLE_TEST_0100 END`) + }) + + /* + * @tc.number : SUB_NOTIFICATION_ANS_MANAGER_REQUEST_ENABLE_TEST_0200 + * @tc.name : function requestEnableNotification(): Promise + * @tc.desc : OperationType.UNKNOWN_TYPE & WantAgentFlags.ONE_TIME_FLAG + */ + it('SUB_NOTIFICATION_ANS_MANAGER_REQUEST_ENABLE_TEST_0200', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_REQUEST_ENABLE_TEST_0200 START`) + await notificationManager.requestEnableNotification().then(() => { + console.info(`${TAG} requestEnableNotification Promise success`) + expect(true).assertTrue() + done() + }).catch((err) => { + console.info(`${TAG} requestEnableNotification Promise err: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + }) + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_REQUEST_ENABLE_TEST_0200 END`) + }) + + /* + * @tc.number : SUB_NOTIFICATION_ANS_MANAGER_COUNT_TEST_0100 + * @tc.name : function getActiveNotificationCount(callback: AsyncCallback): void + * @tc.desc : Obtains the number of all active notifications + */ + it('SUB_NOTIFICATION_ANS_MANAGER_COUNT_TEST_0100', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_ACTIVE_COUNT_TEST_0100 START`) + try { + await notificationManager.getActiveNotificationCount((err, data) => { + if (err) { + console.info(`${TAG} getActiveNotificationCount AsyncCallback err:${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + } else { + console.info(`${TAG} getActiveNotificationCount AsyncCallback success ${JSON.stringify(data)}`) + expect(true).assertTrue() + done() + } + }) + } catch (err) { + console.info(`${TAG} getActiveNotificationCount AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + } + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_COUNT_TEST_0100 END`) + }) + + /* + * @tc.number : SUB_NOTIFICATION_ANS_MANAGER_COUNT_TEST_0200 + * @tc.name : function getActiveNotificationCount(): Promise + * @tc.desc : Obtains the number of all active notifications + */ + it('SUB_NOTIFICATION_ANS_MANAGER_COUNT_TEST_0200', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_ACTIVE_COUNT_TEST_0200 START`) + await notificationManager.getActiveNotificationCount().then((data) => { + console.info(`${TAG} getActiveNotificationCount Promise success :${JSON.stringify(data)}`) + expect(true).assertTrue() + done() + }).catch((err) => { + console.info(`${TAG} getActiveNotificationCount Promise err: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + }) + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_COUNT_TEST_0200 END`) + }) + + /* + * @tc.number : SUB_NOTIFICATION_ANS_MANAGER_COUNT_TEST_0300 + * @tc.name : function getActiveNotifications(callback: AsyncCallback>): void + * @tc.desc : Obtains an array of active notifications + */ + it('SUB_NOTIFICATION_ANS_MANAGER_COUNT_TEST_0300', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_ACTIVE_COUNT_TEST_0300 START`) + try { + await notificationManager.getActiveNotifications((err, data) => { + if (err) { + console.info(`${TAG} getActiveNotifications AsyncCallback err: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + } else { + console.info(`${TAG} getActiveNotifications AsyncCallback success ${JSON.stringify(data)}`) + expect(true).assertTrue() + done() + } + }) + } catch (err) { + console.info(`${TAG} getActiveNotifications AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + } + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_COUNT_TEST_0300 END`) + }) + + /* + * @tc.number : SUB_NOTIFICATION_ANS_MANAGER_COUNT_TEST_0400 + * @tc.name : function getActiveNotifications(): Promise> + * @tc.desc : Obtains an array of active notifications + */ + it('SUB_NOTIFICATION_ANS_MANAGER_COUNT_TEST_0400', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_COUNT_TEST_0400 START`) + await notificationManager.getActiveNotifications().then((data) => { + console.info(`${TAG} getActiveNotifications Promise success :${JSON.stringify(data)}`) + expect(true).assertTrue() + done() + }).catch((err) => { + console.info(`${TAG} getActiveNotifications Promise err: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + }) + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_COUNT_TEST_0400 END`) + }) + + + /* + * @tc.number : SUB_NOTIFICATION_ANS_MANAGER_SUPPORT_TEST_0100 + * @tc.name : function isSupportTemplate(templateName: string, callback: AsyncCallback): void + * @tc.desc : Obtains whether the template is supported by the system + */ + it('SUB_NOTIFICATION_ANS_MANAGER_SUPPORT_TEST_0100', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_SUPPORT_TEST_0100 START`) + let templateName = 'test_templateName' + try { + await notificationManager.isSupportTemplate(templateName, (err, data) => { + if (err) { + console.info(`${TAG} isSupportTemplate AsyncCallback err: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + } else { + console.info(`${TAG} isSupportTemplate AsyncCallback success:${JSON.stringify(data)} `) + expect(true).assertTrue() + done() + } + }) + } catch (err) { + console.info(`${TAG} isSupportTemplate AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + } + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_SUPPORT_TEST_0100 END`) + }) + + /* + * @tc.number : SUB_NOTIFICATION_ANS_MANAGER_SUPPORT_TEST_0200 + * @tc.name : function isSupportTemplate(templateName: string): Promise + * @tc.desc : Obtains whether the template is supported by the system + */ + it('SUB_NOTIFICATION_ANS_MANAGER_SUPPORT_TEST_0200', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_SUPPORT_TEST_0200 START`) + let templateName = 'test_templateName' + await notificationManager.isSupportTemplate(templateName).then((data) => { + console.info(`${TAG} isSupportTemplate Promise success :${JSON.stringify(data)}`) + expect(true).assertTrue() + done() + }).catch((err) => { + console.info(`${TAG} isSupportTemplate Promise err: ${err.code}, errMes: ${err.message}`) + expect(false).assertTrue() + done() + }) + console.info(`${TAG} SUB_NOTIFICATION_ANS_MANAGER_SUPPORT_TEST_0200 END`) + }) + + console.info(TAG + 'SUB_NOTIFICATION_ANS_MANAGER_Publish_TEST END') + }) + +} diff --git a/notification/ans_standard/actsNotificationPublishTest/src/main/js/test/ActsNotificationPublishTest.js b/notification/ans_standard/actsNotificationPublishTest/src/main/js/test/ActsNotificationPublishTest.js index 11644a962..09f005834 100644 --- a/notification/ans_standard/actsNotificationPublishTest/src/main/js/test/ActsNotificationPublishTest.js +++ b/notification/ans_standard/actsNotificationPublishTest/src/main/js/test/ActsNotificationPublishTest.js @@ -1,5 +1,5 @@ /* -* Copyright (c) 2021 Huawei Device Co., Ltd. +* 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 @@ -155,7 +155,7 @@ export default function ActsNotificationPublishTest() { * @tc.desc : Publishes a notification */ it('SUB_NOTIFICATION_ANS_PUBLISH_TEST_0200', 0, async function (done) { - console.info(`${TAG} SUB_NOTIFICATION_ANS_PUBLISH_TEST_0100 START`) + console.info(`${TAG} SUB_NOTIFICATION_ANS_PUBLISH_TEST_0200 START`) let notificationRequest = { content: { contentType: notification.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, @@ -197,7 +197,7 @@ export default function ActsNotificationPublishTest() { * @tc.desc : Publishes a notification */ it('SUB_NOTIFICATION_ANS_PUBLISH_TEST_0500', 0, async function (done) { - console.info(`${TAG} SUB_NOTIFICATION_ANS_PUBLISH_TEST_0100 START`) + console.info(`${TAG} SUB_NOTIFICATION_ANS_PUBLISH_TEST_0500 START`) let notificationRequest = { content: { contentType: notification.ContentType.NOTIFICATION_CONTENT_LONG_TEXT, @@ -249,7 +249,7 @@ export default function ActsNotificationPublishTest() { * @tc.desc : Publishes a notification */ it('SUB_NOTIFICATION_ANS_PUBLISH_TEST_0600', 0, async function (done) { - console.info(`${TAG} SUB_NOTIFICATION_ANS_PUBLISH_TEST_0100 START`) + console.info(`${TAG} SUB_NOTIFICATION_ANS_PUBLISH_TEST_0600 START`) let notificationRequest = { content: { contentType: notification.ContentType.NOTIFICATION_CONTENT_LONG_TEXT, @@ -299,7 +299,7 @@ export default function ActsNotificationPublishTest() { * @tc.desc : Publishes a notification */ it('SUB_NOTIFICATION_ANS_PUBLISH_TEST_0700', 0, async function (done) { - console.info(`${TAG} SUB_NOTIFICATION_ANS_PUBLISH_TEST_0100 START`) + console.info(`${TAG} SUB_NOTIFICATION_ANS_PUBLISH_TEST_0700 START`) let notificationRequest = { content: { contentType: notification.ContentType.NOTIFICATION_CONTENT_MULTILINE, @@ -351,7 +351,7 @@ export default function ActsNotificationPublishTest() { * @tc.desc : Publishes a notification */ it('SUB_NOTIFICATION_ANS_PUBLISH_TEST_0800', 0, async function (done) { - console.info(`${TAG} SUB_NOTIFICATION_ANS_PUBLISH_TEST_0100 START`) + console.info(`${TAG} SUB_NOTIFICATION_ANS_PUBLISH_TEST_0800 START`) let notificationRequest = { content: { contentType: notification.ContentType.NOTIFICATION_CONTENT_MULTILINE, @@ -401,7 +401,7 @@ export default function ActsNotificationPublishTest() { * @tc.desc : Publishes a notification */ it('SUB_NOTIFICATION_ANS_PUBLISH_TEST_1100', 0, async function (done) { - console.info(`${TAG} SUB_NOTIFICATION_ANS_PUBLISH_TEST_0100 START`) + console.info(`${TAG} SUB_NOTIFICATION_ANS_PUBLISH_TEST_1100 START`) let notificationRequest = { content: { contentType: notification.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, @@ -456,7 +456,7 @@ export default function ActsNotificationPublishTest() { * @tc.desc : Publishes a notification */ it('SUB_NOTIFICATION_ANS_PUBLISH_TEST_1200', 0, async function (done) { - console.info(`${TAG} SUB_NOTIFICATION_ANS_PUBLISH_TEST_0100 START`) + console.info(`${TAG} SUB_NOTIFICATION_ANS_PUBLISH_TEST_1200 START`) let notificationRequest = { content: { contentType: notification.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, diff --git a/notification/ans_standard/actsNotificationPublishTest/src/main/js/test/List.test.js b/notification/ans_standard/actsNotificationPublishTest/src/main/js/test/List.test.js index 7d3b2d9e1..d2bac1c00 100644 --- a/notification/ans_standard/actsNotificationPublishTest/src/main/js/test/List.test.js +++ b/notification/ans_standard/actsNotificationPublishTest/src/main/js/test/List.test.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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 @@ -13,6 +13,9 @@ * limitations under the License. */ import ActsNotificationPublishTest from './ActsNotificationPublishTest.js' +import ActsNotificationManagerPublishTest from './ActsNotificationManagerPublishTest.js' + export default function testsuite() { ActsNotificationPublishTest() + ActsNotificationManagerPublishTest() } -- GitLab