From faeb05ba14c43141413ce3e80f27756679f38e6d Mon Sep 17 00:00:00 2001 From: Valere Date: Mon, 27 Apr 2026 14:38:28 +0200 Subject: [PATCH] fix test, need to dismiss a new dialog --- playwright/widget/test-helpers.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/playwright/widget/test-helpers.ts b/playwright/widget/test-helpers.ts index b47588ce..9167412e 100644 --- a/playwright/widget/test-helpers.ts +++ b/playwright/widget/test-helpers.ts @@ -122,6 +122,7 @@ export class TestHelpers { await this.maybeDismissBrowserNotSupportedToast(page); await this.maybeDismissServiceWorkerWarningToast(page); + await this.maybeDismissBackupChat(page); await TestHelpers.setDevToolElementCallDevUrl(page); @@ -170,6 +171,22 @@ export class TestHelpers { } } + private static async maybeDismissBackupChat(page: Page): Promise { + const toast = page + .locator(".mx_Toast_toast") + .getByText("Back up your chats"); + + try { + await expect(toast).toBeVisible({ timeout: 700 }); + await page + .locator(".mx_Toast_toast") + .getByRole("button", { name: "Dismiss" }) + .click(); + } catch { + // toast not visible, continue as normal + } + } + public static async maybeDismissKeyBackupToast(page: Page): Promise { const toast = page .locator(".mx_Toast_toast")