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

!6429 【XTS】【事件通知子系统】新增&修改_master

Merge pull request !6429 from zhijianwen/master
...@@ -751,7 +751,7 @@ export default function ActsNotificationManagerSlotTest() { ...@@ -751,7 +751,7 @@ export default function ActsNotificationManagerSlotTest() {
}) })
try { try {
await notificationManager.getSlot(notificationManager.SlotType.UNKNOWN_TYPE, (err, NotificationSlot) => { notificationManager.getSlot(notificationManager.SlotType.UNKNOWN_TYPE, (err, NotificationSlot) => {
if (err) { if (err) {
console.info(`${TAG} getSlot UNKNOWN_TYPE errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} getSlot UNKNOWN_TYPE errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -759,17 +759,7 @@ export default function ActsNotificationManagerSlotTest() { ...@@ -759,17 +759,7 @@ export default function ActsNotificationManagerSlotTest() {
} else { } else {
console.info(`${TAG} getSlot UNKNOWN_TYPE success: ${NotificationSlot.type}`) console.info(`${TAG} getSlot UNKNOWN_TYPE success: ${NotificationSlot.type}`)
expect(true).assertTrue() expect(true).assertTrue()
done() notificationManager.removeSlot(notificationManager.SlotType.UNKNOWN_TYPE, (err) => {
}
})
} catch (err) {
console.info(`${TAG} getSlot UNKNOWN_TYPE errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.removeSlot(notificationManager.SlotType.UNKNOWN_TYPE, (err) => {
if (err) { if (err) {
console.info(`${TAG} removeSlot UNKNOWN_TYPE errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} removeSlot UNKNOWN_TYPE errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -780,8 +770,11 @@ export default function ActsNotificationManagerSlotTest() { ...@@ -780,8 +770,11 @@ export default function ActsNotificationManagerSlotTest() {
done() done()
} }
}) })
done()
}
})
} catch (err) { } catch (err) {
console.info(`${TAG} removeSlot UNKNOWN_TYPE errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} getSlot UNKNOWN_TYPE errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
done() done()
} }
...@@ -808,7 +801,7 @@ export default function ActsNotificationManagerSlotTest() { ...@@ -808,7 +801,7 @@ export default function ActsNotificationManagerSlotTest() {
}) })
try { try {
await notificationManager.getSlot(notificationManager.SlotType.SOCIAL_COMMUNICATION, (err, NotificationSlot) => { notificationManager.getSlot(notificationManager.SlotType.SOCIAL_COMMUNICATION, (err, NotificationSlot) => {
if (err) { if (err) {
console.info(`${TAG} getSlot SOCIAL_COMMUNICATION errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} getSlot SOCIAL_COMMUNICATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -816,17 +809,7 @@ export default function ActsNotificationManagerSlotTest() { ...@@ -816,17 +809,7 @@ export default function ActsNotificationManagerSlotTest() {
} else { } else {
console.info(`${TAG} getSlot SOCIAL_COMMUNICATION success: ${NotificationSlot.type}`) console.info(`${TAG} getSlot SOCIAL_COMMUNICATION success: ${NotificationSlot.type}`)
expect(true).assertTrue() expect(true).assertTrue()
done() notificationManager.removeSlot(notificationManager.SlotType.SOCIAL_COMMUNICATION, (err) => {
}
})
} catch (err) {
console.info(`${TAG} getSlot SOCIAL_COMMUNICATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.removeSlot(notificationManager.SlotType.SOCIAL_COMMUNICATION, (err) => {
if (err) { if (err) {
console.info(`${TAG} removeSlot SOCIAL_COMMUNICATION errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} removeSlot SOCIAL_COMMUNICATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -837,8 +820,11 @@ export default function ActsNotificationManagerSlotTest() { ...@@ -837,8 +820,11 @@ export default function ActsNotificationManagerSlotTest() {
done() done()
} }
}) })
done()
}
})
} catch (err) { } catch (err) {
console.info(`${TAG} removeSlot SOCIAL_COMMUNICATION errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} getSlot SOCIAL_COMMUNICATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
done() done()
} }
...@@ -865,7 +851,7 @@ export default function ActsNotificationManagerSlotTest() { ...@@ -865,7 +851,7 @@ export default function ActsNotificationManagerSlotTest() {
}) })
try { try {
await notificationManager.getSlot(notificationManager.SlotType.SERVICE_INFORMATION, (err, NotificationSlot) => { notificationManager.getSlot(notificationManager.SlotType.SERVICE_INFORMATION, (err, NotificationSlot) => {
if (err) { if (err) {
console.info(`${TAG} getSlot SERVICE_INFORMATION errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} getSlot SERVICE_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -873,17 +859,7 @@ export default function ActsNotificationManagerSlotTest() { ...@@ -873,17 +859,7 @@ export default function ActsNotificationManagerSlotTest() {
} else { } else {
console.info(`${TAG} getSlot SERVICE_INFORMATION success: ${NotificationSlot.type}`) console.info(`${TAG} getSlot SERVICE_INFORMATION success: ${NotificationSlot.type}`)
expect(true).assertTrue() expect(true).assertTrue()
done() notificationManager.removeSlot(notificationManager.SlotType.SERVICE_INFORMATION, (err) => {
}
})
} catch (err) {
console.info(`${TAG} getSlot SERVICE_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.removeSlot(notificationManager.SlotType.SERVICE_INFORMATION, (err) => {
if (err) { if (err) {
console.info(`${TAG} removeSlot SERVICE_INFORMATION errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} removeSlot SERVICE_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -894,8 +870,11 @@ export default function ActsNotificationManagerSlotTest() { ...@@ -894,8 +870,11 @@ export default function ActsNotificationManagerSlotTest() {
done() done()
} }
}) })
done()
}
})
} catch (err) { } catch (err) {
console.info(`${TAG} removeSlot SERVICE_INFORMATION errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} getSlot SERVICE_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
done() done()
} }
...@@ -922,7 +901,7 @@ export default function ActsNotificationManagerSlotTest() { ...@@ -922,7 +901,7 @@ export default function ActsNotificationManagerSlotTest() {
}) })
try { try {
await notificationManager.getSlot(notificationManager.SlotType.CONTENT_INFORMATION, (err, NotificationSlot) => { notificationManager.getSlot(notificationManager.SlotType.CONTENT_INFORMATION, (err, NotificationSlot) => {
if (err) { if (err) {
console.info(`${TAG} getSlot CONTENT_INFORMATION errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} getSlot CONTENT_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -930,17 +909,7 @@ export default function ActsNotificationManagerSlotTest() { ...@@ -930,17 +909,7 @@ export default function ActsNotificationManagerSlotTest() {
} else { } else {
console.info(`${TAG} getSlot CONTENT_INFORMATION success: ${NotificationSlot.type}`) console.info(`${TAG} getSlot CONTENT_INFORMATION success: ${NotificationSlot.type}`)
expect(true).assertTrue() expect(true).assertTrue()
done() notificationManager.removeSlot(notificationManager.SlotType.CONTENT_INFORMATION, (err) => {
}
})
} catch (err) {
console.info(`${TAG} getSlot CONTENT_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.removeSlot(notificationManager.SlotType.CONTENT_INFORMATION, (err) => {
if (err) { if (err) {
console.info(`${TAG} removeSlot CONTENT_INFORMATION errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} removeSlot CONTENT_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -951,8 +920,11 @@ export default function ActsNotificationManagerSlotTest() { ...@@ -951,8 +920,11 @@ export default function ActsNotificationManagerSlotTest() {
done() done()
} }
}) })
done()
}
})
} catch (err) { } catch (err) {
console.info(`${TAG} removeSlot CONTENT_INFORMATION errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} getSlot CONTENT_INFORMATION errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
done() done()
} }
...@@ -979,7 +951,7 @@ export default function ActsNotificationManagerSlotTest() { ...@@ -979,7 +951,7 @@ export default function ActsNotificationManagerSlotTest() {
}) })
try { try {
await notificationManager.getSlot(notificationManager.SlotType.OTHER_TYPES, (err, NotificationSlot) => { notificationManager.getSlot(notificationManager.SlotType.OTHER_TYPES, (err, NotificationSlot) => {
if (err) { if (err) {
console.info(`${TAG} getSlot OTHER_TYPES errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} getSlot OTHER_TYPES errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -987,17 +959,7 @@ export default function ActsNotificationManagerSlotTest() { ...@@ -987,17 +959,7 @@ export default function ActsNotificationManagerSlotTest() {
} else { } else {
console.info(`${TAG} getSlot OTHER_TYPES success: ${NotificationSlot.type}`) console.info(`${TAG} getSlot OTHER_TYPES success: ${NotificationSlot.type}`)
expect(true).assertTrue() expect(true).assertTrue()
done() notificationManager.removeSlot(notificationManager.SlotType.OTHER_TYPES, (err) => {
}
})
} catch (err) {
console.info(`${TAG} getSlot OTHER_TYPES errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
try {
await notificationManager.removeSlot(notificationManager.SlotType.OTHER_TYPES, (err) => {
if (err) { if (err) {
console.info(`${TAG} removeSlot OTHER_TYPES errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} removeSlot OTHER_TYPES errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -1008,8 +970,11 @@ export default function ActsNotificationManagerSlotTest() { ...@@ -1008,8 +970,11 @@ export default function ActsNotificationManagerSlotTest() {
done() done()
} }
}) })
done()
}
})
} catch (err) { } catch (err) {
console.info(`${TAG} removeSlot OTHER_TYPES errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} getSlot OTHER_TYPES errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
done() done()
} }
......
...@@ -544,6 +544,11 @@ describe('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST', function () { ...@@ -544,6 +544,11 @@ describe('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST', function () {
expect(typeof flags.vibrationEnabled == 'number').assertTrue() expect(typeof flags.vibrationEnabled == 'number').assertTrue()
expect(flags.soundEnabled).assertEqual(1) expect(flags.soundEnabled).assertEqual(1)
expect(flags.vibrationEnabled).assertEqual(2) expect(flags.vibrationEnabled).assertEqual(2)
expect(notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT).assertEqual(0)
expect(notificationManager.ContentType.NOTIFICATION_CONTENT_LONG_TEXT).assertEqual(1)
expect(notificationManager.ContentType.NOTIFICATION_CONTENT_PICTURE).assertEqual(2)
expect(notificationManager.ContentType.NOTIFICATION_CONTENT_CONVERSATION).assertEqual(3)
expect(notificationManager.ContentType.NOTIFICATION_CONTENT_MULTILINE).assertEqual(4)
done() done()
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_1100 END`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_1100 END`);
}); });
......
...@@ -654,7 +654,7 @@ export default function ActsNotificationSlotTest() { ...@@ -654,7 +654,7 @@ export default function ActsNotificationSlotTest() {
done() done()
}) })
await notification.getSlot(notification.SlotType.UNKNOWN_TYPE, (err, NotificationSlot) => { notification.getSlot(notification.SlotType.UNKNOWN_TYPE, (err, NotificationSlot) => {
if (err.code) { if (err.code) {
console.info(`${TAG} getSlot UNKNOWN_TYPE err: ${err.code}`) console.info(`${TAG} getSlot UNKNOWN_TYPE err: ${err.code}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -662,11 +662,7 @@ export default function ActsNotificationSlotTest() { ...@@ -662,11 +662,7 @@ export default function ActsNotificationSlotTest() {
} else { } else {
console.info(`${TAG} getSlot UNKNOWN_TYPE success: ${NotificationSlot.type}`) console.info(`${TAG} getSlot UNKNOWN_TYPE success: ${NotificationSlot.type}`)
expect(true).assertTrue() expect(true).assertTrue()
done() notification.removeSlot(notification.SlotType.UNKNOWN_TYPE, (err) => {
}
})
await notification.removeSlot(notification.SlotType.UNKNOWN_TYPE, (err) => {
if (err.code) { if (err.code) {
console.info(`${TAG} removeSlot UNKNOWN_TYPE err: ${err.code}`) console.info(`${TAG} removeSlot UNKNOWN_TYPE err: ${err.code}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -677,6 +673,10 @@ export default function ActsNotificationSlotTest() { ...@@ -677,6 +673,10 @@ export default function ActsNotificationSlotTest() {
done() done()
} }
}) })
done()
}
})
console.info(TAG + 'SUB_NOTIFICATION_ANS_SLOT_TEST_3100 END') console.info(TAG + 'SUB_NOTIFICATION_ANS_SLOT_TEST_3100 END')
}) })
...@@ -698,7 +698,7 @@ export default function ActsNotificationSlotTest() { ...@@ -698,7 +698,7 @@ export default function ActsNotificationSlotTest() {
done() done()
}) })
await notification.getSlot(notification.SlotType.SOCIAL_COMMUNICATION, (err, NotificationSlot) => { notification.getSlot(notification.SlotType.SOCIAL_COMMUNICATION, (err, NotificationSlot) => {
if (err.code) { if (err.code) {
console.info(`${TAG} getSlot SOCIAL_COMMUNICATION err: ${err.code}`) console.info(`${TAG} getSlot SOCIAL_COMMUNICATION err: ${err.code}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -706,11 +706,7 @@ export default function ActsNotificationSlotTest() { ...@@ -706,11 +706,7 @@ export default function ActsNotificationSlotTest() {
} else { } else {
console.info(`${TAG} getSlot SOCIAL_COMMUNICATION success: ${NotificationSlot.type}`) console.info(`${TAG} getSlot SOCIAL_COMMUNICATION success: ${NotificationSlot.type}`)
expect(true).assertTrue() expect(true).assertTrue()
done() notification.removeSlot(notification.SlotType.SOCIAL_COMMUNICATION, (err) => {
}
})
await notification.removeSlot(notification.SlotType.SOCIAL_COMMUNICATION, (err) => {
if (err.code) { if (err.code) {
console.info(`${TAG} removeSlot SOCIAL_COMMUNICATION err: ${err.code}`) console.info(`${TAG} removeSlot SOCIAL_COMMUNICATION err: ${err.code}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -721,6 +717,10 @@ export default function ActsNotificationSlotTest() { ...@@ -721,6 +717,10 @@ export default function ActsNotificationSlotTest() {
done() done()
} }
}) })
done()
}
})
console.info(TAG + 'SUB_NOTIFICATION_ANS_SLOT_TEST_3200 END') console.info(TAG + 'SUB_NOTIFICATION_ANS_SLOT_TEST_3200 END')
}) })
...@@ -742,7 +742,7 @@ export default function ActsNotificationSlotTest() { ...@@ -742,7 +742,7 @@ export default function ActsNotificationSlotTest() {
done() done()
}) })
await notification.getSlot(notification.SlotType.SERVICE_INFORMATION, (err, NotificationSlot) => { notification.getSlot(notification.SlotType.SERVICE_INFORMATION, (err, NotificationSlot) => {
if (err.code) { if (err.code) {
console.info(`${TAG} getSlot SERVICE_INFORMATION err: ${err.code}`) console.info(`${TAG} getSlot SERVICE_INFORMATION err: ${err.code}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -750,11 +750,7 @@ export default function ActsNotificationSlotTest() { ...@@ -750,11 +750,7 @@ export default function ActsNotificationSlotTest() {
} else { } else {
console.info(`${TAG} getSlot SERVICE_INFORMATION success: ${NotificationSlot.type}`) console.info(`${TAG} getSlot SERVICE_INFORMATION success: ${NotificationSlot.type}`)
expect(true).assertTrue() expect(true).assertTrue()
done() notification.removeSlot(notification.SlotType.SERVICE_INFORMATION, (err) => {
}
})
await notification.removeSlot(notification.SlotType.SERVICE_INFORMATION, (err) => {
if (err.code) { if (err.code) {
console.info(`${TAG} removeSlot SERVICE_INFORMATION err: ${err.code}`) console.info(`${TAG} removeSlot SERVICE_INFORMATION err: ${err.code}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -765,6 +761,10 @@ export default function ActsNotificationSlotTest() { ...@@ -765,6 +761,10 @@ export default function ActsNotificationSlotTest() {
done() done()
} }
}) })
done()
}
})
console.info(TAG + 'SUB_NOTIFICATION_ANS_SLOT_TEST_3300 END') console.info(TAG + 'SUB_NOTIFICATION_ANS_SLOT_TEST_3300 END')
}) })
...@@ -786,7 +786,7 @@ export default function ActsNotificationSlotTest() { ...@@ -786,7 +786,7 @@ export default function ActsNotificationSlotTest() {
done() done()
}) })
await notification.getSlot(notification.SlotType.CONTENT_INFORMATION, (err, NotificationSlot) => { notification.getSlot(notification.SlotType.CONTENT_INFORMATION, (err, NotificationSlot) => {
if (err.code) { if (err.code) {
console.info(`${TAG} getSlot CONTENT_INFORMATION err: ${err.code}`) console.info(`${TAG} getSlot CONTENT_INFORMATION err: ${err.code}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -794,11 +794,7 @@ export default function ActsNotificationSlotTest() { ...@@ -794,11 +794,7 @@ export default function ActsNotificationSlotTest() {
} else { } else {
console.info(`${TAG} getSlot CONTENT_INFORMATION success: ${NotificationSlot.type}`) console.info(`${TAG} getSlot CONTENT_INFORMATION success: ${NotificationSlot.type}`)
expect(true).assertTrue() expect(true).assertTrue()
done() notification.removeSlot(notification.SlotType.CONTENT_INFORMATION, (err) => {
}
})
await notification.removeSlot(notification.SlotType.CONTENT_INFORMATION, (err) => {
if (err.code) { if (err.code) {
console.info(`${TAG} removeSlot CONTENT_INFORMATION err: ${err.code}`) console.info(`${TAG} removeSlot CONTENT_INFORMATION err: ${err.code}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -809,6 +805,11 @@ export default function ActsNotificationSlotTest() { ...@@ -809,6 +805,11 @@ export default function ActsNotificationSlotTest() {
done() done()
} }
}) })
done()
}
})
console.info(TAG + 'SUB_NOTIFICATION_ANS_SLOT_TEST_3400 END') console.info(TAG + 'SUB_NOTIFICATION_ANS_SLOT_TEST_3400 END')
}) })
...@@ -830,7 +831,7 @@ export default function ActsNotificationSlotTest() { ...@@ -830,7 +831,7 @@ export default function ActsNotificationSlotTest() {
done() done()
}) })
await notification.getSlot(notification.SlotType.OTHER_TYPES, (err, NotificationSlot) => { notification.getSlot(notification.SlotType.OTHER_TYPES, (err, NotificationSlot) => {
if (err.code) { if (err.code) {
console.info(`${TAG} getSlot OTHER_TYPES err: ${err.code}`) console.info(`${TAG} getSlot OTHER_TYPES err: ${err.code}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -838,11 +839,7 @@ export default function ActsNotificationSlotTest() { ...@@ -838,11 +839,7 @@ export default function ActsNotificationSlotTest() {
} else { } else {
console.info(`${TAG} getSlot OTHER_TYPES success: ${NotificationSlot.type}`) console.info(`${TAG} getSlot OTHER_TYPES success: ${NotificationSlot.type}`)
expect(true).assertTrue() expect(true).assertTrue()
done() notification.removeSlot(notification.SlotType.OTHER_TYPES, (err) => {
}
})
await notification.removeSlot(notification.SlotType.OTHER_TYPES, (err) => {
if (err.code) { if (err.code) {
console.info(`${TAG} removeSlot CONTENT_INFORMATION err: ${err.code}`) console.info(`${TAG} removeSlot CONTENT_INFORMATION err: ${err.code}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -853,6 +850,11 @@ export default function ActsNotificationSlotTest() { ...@@ -853,6 +850,11 @@ export default function ActsNotificationSlotTest() {
done() done()
} }
}) })
done()
}
})
console.info(TAG + 'SUB_NOTIFICATION_ANS_SLOT_TEST_3500 END') console.info(TAG + 'SUB_NOTIFICATION_ANS_SLOT_TEST_3500 END')
}) })
...@@ -1207,17 +1209,6 @@ export default function ActsNotificationSlotTest() { ...@@ -1207,17 +1209,6 @@ export default function ActsNotificationSlotTest() {
it('SUB_NOTIFICATION_ANS_SLOT_TEST_4700', 0, async function (done) { it('SUB_NOTIFICATION_ANS_SLOT_TEST_4700', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_SLOT_TEST_4700 START') console.info(TAG + 'SUB_NOTIFICATION_ANS_SLOT_TEST_4700 START')
// await notification.addSlot(notification.SlotType.UNKNOWN_TYPE, (err) => {
// if (err.code) {
// console.info(`${TAG} addSlot UNKNOWN_TYPE err: + ${err.code}`)
// expect(false).assertTrue()
// done()
// } else {
// console.info(`${TAG} addSlot UNKNOWN_TYPE success`)
// expect(true).assertTrue()
// }
// })
await notification.addSlot(notification.SlotType.SOCIAL_COMMUNICATION, (err) => { await notification.addSlot(notification.SlotType.SOCIAL_COMMUNICATION, (err) => {
if (err.code) { if (err.code) {
console.info(`${TAG} addSlot SOCIAL_COMMUNICATION err: + ${err.code}`) console.info(`${TAG} addSlot SOCIAL_COMMUNICATION err: + ${err.code}`)
...@@ -1288,17 +1279,6 @@ export default function ActsNotificationSlotTest() { ...@@ -1288,17 +1279,6 @@ export default function ActsNotificationSlotTest() {
it('SUB_NOTIFICATION_ANS_SLOT_TEST_4800', 0, async function (done) { it('SUB_NOTIFICATION_ANS_SLOT_TEST_4800', 0, async function (done) {
console.info(TAG + 'SUB_NOTIFICATION_ANS_SLOT_TEST_4800 START') console.info(TAG + 'SUB_NOTIFICATION_ANS_SLOT_TEST_4800 START')
// await notification.addSlot(notification.SlotType.UNKNOWN_TYPE, (err) => {
// if (err.code) {
// console.info(`${TAG} addSlot UNKNOWN_TYPE err: + ${err.code}`)
// expect(false).assertTrue()
// done()
// } else {
// console.info(`${TAG} addSlot UNKNOWN_TYPE success`)
// expect(true).assertTrue()
// }
// })
await notification.addSlot(notification.SlotType.SOCIAL_COMMUNICATION, (err) => { await notification.addSlot(notification.SlotType.SOCIAL_COMMUNICATION, (err) => {
if (err.code) { if (err.code) {
console.info(`${TAG} addSlot SOCIAL_COMMUNICATION err: + ${err.code}`) console.info(`${TAG} addSlot SOCIAL_COMMUNICATION err: + ${err.code}`)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册