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 1f1a7502ab0535bcec5e84e36aedae6965d7adbe..b733fcc547b417d52db2918178bf19ba3c1a7d2a 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 @@ -70,4 +70,48 @@ describe('SUB_NOTIFICATION_CES_SYSTEM_API_TEST', function () { console.info(`${TAG} SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0200 END`); }); + + /* + * @tc.number: SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0300 + * @tc.name: removeStickyCommonEvent + * @tc.desc: test function removeStickyCommonEvent + */ + 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", (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() + } + }); + + console.info(`${TAG} SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0300 END`); + }); + + /* + * @tc.number: SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0400 + * @tc.name: removeStickyCommonEvent + * @tc.desc: test function removeStickyCommonEvent + */ + it('SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0400', 0, async function (done) { + console.info(`${TAG} SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0400 START`); + + 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`); + }); }) } \ No newline at end of file