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

!7312 通知xts用例运行异常修改

Merge pull request !7312 from FangJinliang/pr_0120
...@@ -477,7 +477,6 @@ describe('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST', function () { ...@@ -477,7 +477,6 @@ describe('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST', function () {
*/ */
it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0900', 0, async function (done) { it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0900', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0900 START`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0900 START`);
try{ try{
await notificationManager.addSlot(notificationManager.SlotType.SOCIAL_COMMUNICATION, (err) => { await notificationManager.addSlot(notificationManager.SlotType.SOCIAL_COMMUNICATION, (err) => {
console.info(`${TAG} addSlot success`) console.info(`${TAG} addSlot success`)
...@@ -488,7 +487,14 @@ describe('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST', function () { ...@@ -488,7 +487,14 @@ describe('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST', function () {
} else { } else {
notificationManager.getSlots().then((NotificationSlot) => { notificationManager.getSlots().then((NotificationSlot) => {
console.info(`${TAG} getSlots success:` + JSON.stringify(NotificationSlot)) console.info(`${TAG} getSlots success:` + JSON.stringify(NotificationSlot))
expect(NotificationSlot[0].type).assertEqual(notificationManager.SlotType.SOCIAL_COMMUNICATION) for (let i = 0; i < NotificationSlot.length; ++i) {
console.info(`${TAG} NotificationSlot[${i}].type:` + JSON.stringify(NotificationSlot[i].type))
if (NotificationSlot[i].type == notificationManager.SlotType.SOCIAL_COMMUNICATION) {
done()
return
}
}
expect(false).assertTrue()
done() done()
}).catch((err) => { }).catch((err) => {
console.info(`${TAG} getSlots failed err: + ${err.code}`) console.info(`${TAG} getSlots failed err: + ${err.code}`)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册