fix: playwright, new web popup interfering with test to witch room

This commit is contained in:
Valere
2026-03-19 09:20:02 +01:00
parent 396225a900
commit 9c2b2d4780
3 changed files with 23 additions and 0 deletions

View File

@@ -152,6 +152,22 @@ export class TestHelpers {
}
}
public static async maybeDismissBackupChatsToast(page: Page): Promise<void> {
const toast = page
.locator(".mx_Toast_toast")
.getByRole("heading", { name: "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 createRoom(
name: string,
page: Page,