未验证 提交 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 () {
*/
it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0900', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0900 START`);
try{
await notificationManager.addSlot(notificationManager.SlotType.SOCIAL_COMMUNICATION, (err) => {
console.info(`${TAG} addSlot success`)
......@@ -488,7 +487,14 @@ describe('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST', function () {
} else {
notificationManager.getSlots().then((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()
}).catch((err) => {
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.
先完成此消息的编辑!
想要评论请 注册