From fe876aaae9e2c2eb0a3dbc4577d65b7e3f0239cb Mon Sep 17 00:00:00 2001 From: zhijianwen Date: Sat, 25 Jun 2022 17:25:23 +0800 Subject: [PATCH] xts Signed-off-by: zhijianwen --- .../main/js/test/actsansdistributedtest.js | 28 +++++++++++-------- .../entry/src/main/js/test/WantAgent.test.js | 1 + .../js/test/ActsSubscriber_test_unorder.js | 3 +- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/notification/ans_standard/publish_test/actsansdistributedtest/entry/src/main/js/test/actsansdistributedtest.js b/notification/ans_standard/publish_test/actsansdistributedtest/entry/src/main/js/test/actsansdistributedtest.js index 6e0d775d3..1386abf1e 100644 --- a/notification/ans_standard/publish_test/actsansdistributedtest/entry/src/main/js/test/actsansdistributedtest.js +++ b/notification/ans_standard/publish_test/actsansdistributedtest/entry/src/main/js/test/actsansdistributedtest.js @@ -165,13 +165,18 @@ describe('ActsAnsDistributeTest', function () { * @tc.desc: isSupportTemplate(templateName: string, callback: AsyncCallback): void */ it('ActsDistribute_test_0600', 0, async function (done) { - + console.info("==>ActsDistribute_test_0600 start==>"); var templateName = '/system/etc/notification_template/assets/js/downloadTemplate.js'; - - await notify.isSupportTemplate(templateName,function(data){ - console.log("===>isSupportTemplateCallback success===>"+JSON.stringify(data)) - console.log("===>isSupportTemplateCallback success===>"+err.code) - }) + function isSupportTemplateCallback(err, data) { + if(err) { + console.error("isSupportTemplateCallback" + err.code); + } else { + expect(true).assertTrue(); + console.info("isSupportTemplateCallback" + JSON.stringify(data)); + done(); + } + } + notify.isSupportTemplate(templateName, isSupportTemplateCallback); done(); }) @@ -181,12 +186,13 @@ describe('ActsAnsDistributeTest', function () { * @tc.desc: isSupportTemplate(templateName: string): Promise */ it('ActsDistribute_test_0700', 0, async function (done) { - + console.info("==>ActsDistribute_test_0700 start==>"); var templateName = '/system/etc/notification_template/assets/js/downloadTemplate.js'; - - await notify.isSupportTemplate(templateName).then ((data) => { - console.log("isSupportTemplatePromise") - console.log("==>ActsDistribute_test_0700 success==>" +JSON.stringify(data)) + notify.isSupportTemplate(templateName).then ((data) => { + expect(data).assertEqual(false); + console.info("isSupportTemplatePromise"); + console.info("==>ActsDistribute_test_0700 success==>" + JSON.stringify(data)); + done(); }) done(); }) diff --git a/notification/ans_standard/publish_test/wantagent/wantagent2promise/entry/src/main/js/test/WantAgent.test.js b/notification/ans_standard/publish_test/wantagent/wantagent2promise/entry/src/main/js/test/WantAgent.test.js index 778cf404d..8c9138b15 100644 --- a/notification/ans_standard/publish_test/wantagent/wantagent2promise/entry/src/main/js/test/WantAgent.test.js +++ b/notification/ans_standard/publish_test/wantagent/wantagent2promise/entry/src/main/js/test/WantAgent.test.js @@ -26,6 +26,7 @@ describe('ActsAnsWantAgentTwoProTest', function () { * @tc.desc: verify the function of getWantAgent(OperationType.START_ABILITIES) */ it('ACTS_SetWant_0400', 0, async function (done) { + expect(3).assertEqual(wantAgent.OperationType.START_SERVICE) var agentInfo = { wants: [ { 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 22c136063..79a37c7fa 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 @@ -287,7 +287,8 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) { Subscriber.Support.COMMON_EVENT_ABILITY_UPDATED, Subscriber.Support.COMMON_EVENT_VISIBLE_ACCOUNTS_UPDATED, Subscriber.Support.COMMON_EVENT_ACCOUNT_DELETED, - Subscriber.Support.COMMON_EVENT_FOUNDATION_READY + Subscriber.Support.COMMON_EVENT_FOUNDATION_READY, + Subscriber.Support.COMMON_EVENT_BATTERY_CHANGED ], }; -- GitLab