From 759ab0941dc0096ed9a9578debdb379c12bfb786 Mon Sep 17 00:00:00 2001 From: fangJinliang1 Date: Sun, 29 Jan 2023 19:20:49 +0800 Subject: [PATCH] fix xts Signed-off-by: fangJinliang1 Change-Id: I966ae1cb38efa05c27ed2ed474bd3b178098e827 Signed-off-by: fangJinliang1 --- .../entry/src/main/ets/test/SecondaryDirectory.test.ets | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/notification/ans_standard/actsNotificationSecondaryDirectory/entry/src/main/ets/test/SecondaryDirectory.test.ets b/notification/ans_standard/actsNotificationSecondaryDirectory/entry/src/main/ets/test/SecondaryDirectory.test.ets index 3862491e5..41bba1dee 100644 --- a/notification/ans_standard/actsNotificationSecondaryDirectory/entry/src/main/ets/test/SecondaryDirectory.test.ets +++ b/notification/ans_standard/actsNotificationSecondaryDirectory/entry/src/main/ets/test/SecondaryDirectory.test.ets @@ -468,7 +468,14 @@ describe('secondaryDirectoryTest', function () { } else { notify.getSlots().then((NotificationSlot) => { console.info(`${TAG} getSlots success:` + JSON.stringify(NotificationSlot)) - expect(NotificationSlot[0].type).assertEqual(notify.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 == notify.SlotType.SOCIAL_COMMUNICATION) { + done() + return + } + } + expect(false).assertTrue() done() }).catch((err) => { console.info(`${TAG} getSlots failed err: + ${err.code}`) -- GitLab