mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
fix test, need to dismiss a new dialog
This commit is contained in:
@@ -122,6 +122,7 @@ export class TestHelpers {
|
|||||||
|
|
||||||
await this.maybeDismissBrowserNotSupportedToast(page);
|
await this.maybeDismissBrowserNotSupportedToast(page);
|
||||||
await this.maybeDismissServiceWorkerWarningToast(page);
|
await this.maybeDismissServiceWorkerWarningToast(page);
|
||||||
|
await this.maybeDismissBackupChat(page);
|
||||||
|
|
||||||
await TestHelpers.setDevToolElementCallDevUrl(page);
|
await TestHelpers.setDevToolElementCallDevUrl(page);
|
||||||
|
|
||||||
@@ -170,6 +171,22 @@ export class TestHelpers {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static async maybeDismissBackupChat(page: Page): Promise<void> {
|
||||||
|
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<void> {
|
public static async maybeDismissKeyBackupToast(page: Page): Promise<void> {
|
||||||
const toast = page
|
const toast = page
|
||||||
.locator(".mx_Toast_toast")
|
.locator(".mx_Toast_toast")
|
||||||
|
|||||||
Reference in New Issue
Block a user