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")