未验证 提交 515ce447 编写于 作者: O openharmony_ci 提交者: Gitee

!3442 【XTS】【事件通知子系统】系统接口修改及部分用例修改

Merge pull request !3442 from 付家睿/master
...@@ -31,13 +31,14 @@ group("publish_test") { ...@@ -31,13 +31,14 @@ group("publish_test") {
"actsansgetallactive:ActsAnsGetAllActiveTestXts", "actsansgetallactive:ActsAnsGetAllActiveTestXts",
"ansactscancelgroup:ActsAnsCancelGroupTest", "ansactscancelgroup:ActsAnsCancelGroupTest",
"ansactsremovegroup:ActsAnsRemoveGroupTest", "ansactsremovegroup:ActsAnsRemoveGroupTest",
"donotdisturbmode:ActsAnsDoNotDisturbTest",
#"donotdisturbmode:ActsAnsDoNotDisturbTest",
#"publish:ActsAnsNotificationPublishXts", #"publish:ActsAnsNotificationPublishXts",
"publishsound:ActsAnsPublishSoundTest", "publishsound:ActsAnsPublishSoundTest",
#"publishvibra:ActsAnsPublishVibraTest", #"publishvibra:ActsAnsPublishVibraTest",
"sub:ActsAnsSubTestXts", #"sub:ActsAnsSubTestXts",
"unsubscribe:ActsAnsUnSubscriberTest", "unsubscribe:ActsAnsUnSubscriberTest",
"wantagent:wantagent", "wantagent:wantagent",
] ]
......
...@@ -85,7 +85,7 @@ describe('ActsAnsActionButtonTest', function () { ...@@ -85,7 +85,7 @@ describe('ActsAnsActionButtonTest', function () {
} }
} }
], ],
operationType: OperationType.START_ABILITY, operationType: WantAgent.OperationType.START_ABILITY,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}; };
...@@ -170,7 +170,7 @@ describe('ActsAnsActionButtonTest', function () { ...@@ -170,7 +170,7 @@ describe('ActsAnsActionButtonTest', function () {
} }
} }
], ],
operationType: OperationType.START_ABILITY, operationType: WantAgent.OperationType.START_ABILITY,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}; };
......
...@@ -17,7 +17,7 @@ group("badgedisplayed") { ...@@ -17,7 +17,7 @@ group("badgedisplayed") {
testonly = true testonly = true
if (is_standard_system) { if (is_standard_system) {
deps = [ deps = [
"badgedisplay:ActsAnsBadgeDisplayTest", #"badgedisplay:ActsAnsBadgeDisplayTest",
"localcandisplay:localcandisplay", "localcandisplay:localcandisplay",
] ]
} }
......
...@@ -17,7 +17,7 @@ group("enablenotification") { ...@@ -17,7 +17,7 @@ group("enablenotification") {
testonly = true testonly = true
if (is_standard_system) { if (is_standard_system) {
deps = [ deps = [
"enablenotification:ActsAnsEnableNotificationTest", #"enablenotification:ActsAnsEnableNotificationTest",
"localnotificationenable:ActsAnsLocalNotificationTest", "localnotificationenable:ActsAnsLocalNotificationTest",
] ]
} }
......
...@@ -17,6 +17,7 @@ import notify from '@ohos.notification' ...@@ -17,6 +17,7 @@ import notify from '@ohos.notification'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
var time = 300 var time = 300
var ERR_ANS_NON_SYSTEM_APP = 67108877 var ERR_ANS_NON_SYSTEM_APP = 67108877
var cancalAllFlag = false
describe('ActsAnsActiveTest', function () { describe('ActsAnsActiveTest', function () {
console.info("===========ActsAnsActiveTest start====================>"); console.info("===========ActsAnsActiveTest start====================>");
function getCallback(err, data){ function getCallback(err, data){
...@@ -50,6 +51,11 @@ describe('ActsAnsActiveTest', function () { ...@@ -50,6 +51,11 @@ describe('ActsAnsActiveTest', function () {
} }
} }
function cancelAllCallback(err) {
cancalAllFlag = true
console.info("===>cancelAllCallback===>");
}
/* /*
* @tc.number: Ans_GetActive_0100 * @tc.number: Ans_GetActive_0100
* @tc.name: getActiveNotifications(callback: AsyncCallback<Array<NotificationRequest>>): void; * @tc.name: getActiveNotifications(callback: AsyncCallback<Array<NotificationRequest>>): void;
...@@ -942,14 +948,17 @@ describe('ActsAnsActiveTest', function () { ...@@ -942,14 +948,17 @@ describe('ActsAnsActiveTest', function () {
console.debug("===============Ans_GetActive_1900 publish1 end==================>"); console.debug("===============Ans_GetActive_1900 publish1 end==================>");
await notify.publish(notificationRequest2); await notify.publish(notificationRequest2);
console.debug("===============Ans_GetActive_1900 publish2 end==================>"); console.debug("===============Ans_GetActive_1900 publish2 end==================>");
await notify.cancelAll(); await notify.cancelAll(cancelAllCallback);
expect(cancalAllFlag).assertEqual(false);
console.debug("===============Ans_GetActive_1900 cancel end==================>"); console.debug("===============Ans_GetActive_1900 cancel end==================>");
notify.getActiveNotificationCount(getCountCallbackFive); await notify.getActiveNotificationCount(getCountCallbackFive);
console.debug("===============Ans_GetActive_1900 getActiveNotifications end==================>"); console.debug("===============Ans_GetActive_1900 getActiveNotifications end==================>");
setTimeout(function(){ setTimeout(function(){
console.debug("===============Ans_GetActive_1900 done==================>"); console.debug("===============Ans_GetActive_1900 done==================>");
done(); done();
}, time); }, time);
}) })
/* /*
...@@ -989,7 +998,8 @@ describe('ActsAnsActiveTest', function () { ...@@ -989,7 +998,8 @@ describe('ActsAnsActiveTest', function () {
console.debug("===============Ans_GetActive_2000 publish1 end==================>"); console.debug("===============Ans_GetActive_2000 publish1 end==================>");
await notify.publish(notificationRequest2); await notify.publish(notificationRequest2);
console.debug("===============Ans_GetActive_2000 publish2 end==================>"); console.debug("===============Ans_GetActive_2000 publish2 end==================>");
await notify.cancelAll(); await notify.cancelAll(cancelAllCallback);
expect(cancalAllFlag).assertEqual(true);
console.debug("===============Ans_GetActive_2000 cancelAll end==================>"); console.debug("===============Ans_GetActive_2000 cancelAll end==================>");
var promiseCount = await notify.getActiveNotificationCount(); var promiseCount = await notify.getActiveNotificationCount();
expect(promiseCount).assertEqual(0); expect(promiseCount).assertEqual(0);
......
...@@ -18,7 +18,7 @@ group("subscribe") { ...@@ -18,7 +18,7 @@ group("subscribe") {
if (is_standard_system) { if (is_standard_system) {
deps = [ deps = [
"publish:ActsAnsPublishTest", "publish:ActsAnsPublishTest",
"subscribe:ActsAnsSubscriberTest", #"subscribe:ActsAnsSubscriberTest",
] ]
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册