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

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

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