From 20457315f7418fee347ce1d1ab8eed694037c9f9 Mon Sep 17 00:00:00 2001 From: Victor Rubezhny Date: Tue, 2 Jun 2026 16:01:09 +0200 Subject: [PATCH] [tests] Fix for stale Notification Center in Public UI tests when waiting for the messages Signed-off-by: Victor Rubezhny --- test/ui/common/conditions.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/ui/common/conditions.ts b/test/ui/common/conditions.ts index a931d93a4..e98ec11f7 100644 --- a/test/ui/common/conditions.ts +++ b/test/ui/common/conditions.ts @@ -38,12 +38,10 @@ export async function notificationExists( driver: WebDriver, timeout = 10000, ): Promise { - const center = await new Workbench().openNotificationsCenter(); - - let currentNotifications = undefined; return driver.wait(async () => { try { + const center = await new Workbench().openNotificationsCenter(); const notifications = await center.getNotifications(NotificationType.Any); currentNotifications = notifications; for (const item of notifications) { @@ -70,9 +68,9 @@ export async function notificationDoesNotExist( driver: WebDriver, timeout = 10_000, ): Promise { - const center = await new Workbench().openNotificationsCenter(); return driver.wait(async () => { try { + const center = await new Workbench().openNotificationsCenter(); const notifications = await center.getNotifications(NotificationType.Any); const notificationText = []; notifications.forEach(