From 3913270623428105340dcb50e79dd397f2c72003 Mon Sep 17 00:00:00 2001 From: fangJinliang1 Date: Mon, 3 Apr 2023 22:55:18 +0800 Subject: [PATCH] add test Signed-off-by: fangJinliang1 Change-Id: Ica1cc11f8c4669c7e3de79991fb0d718970233e3 --- .../main/ets/test/ActsCommonEventSystemAPITest.test.ets | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/notification/ces_standard/actsCommonEventSystemAPITest/entry/src/main/ets/test/ActsCommonEventSystemAPITest.test.ets b/notification/ces_standard/actsCommonEventSystemAPITest/entry/src/main/ets/test/ActsCommonEventSystemAPITest.test.ets index 42c310153..b733fcc54 100644 --- a/notification/ces_standard/actsCommonEventSystemAPITest/entry/src/main/ets/test/ActsCommonEventSystemAPITest.test.ets +++ b/notification/ces_standard/actsCommonEventSystemAPITest/entry/src/main/ets/test/ActsCommonEventSystemAPITest.test.ets @@ -79,13 +79,15 @@ describe('SUB_NOTIFICATION_CES_SYSTEM_API_TEST', function () { it('SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0300', 0, async function (done) { console.info(`${TAG} SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0300 START`); - commonEventManager.removeStickyCommonEvent("sticky_event", (error) => { - if (error) { + commonEventManager.removeStickyCommonEvent("sticky_event", (err) => { + if (err) { console.info(`${TAG} remove sticky event AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) expect(err.code).assertEqual(202); + done() } else { console.info("${TAG} remove sticky event AsyncCallback success"); expect(false).assertTrue() + done() } }); @@ -103,9 +105,11 @@ describe('SUB_NOTIFICATION_CES_SYSTEM_API_TEST', function () { commonEventManager.removeStickyCommonEvent("sticky_event").then(() => { console.info("${TAG} remove sticky event AsyncCallback success"); expect(false).assertTrue() + done() }).catch ((err) => { console.info(`${TAG} remove sticky event AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) expect(err.code).assertEqual(202); + done() }); console.info(`${TAG} SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0400 END`); -- GitLab