Workaround: EW has not yet merged the download file permission for EC

This commit is contained in:
Valere
2026-03-31 14:56:25 +02:00
parent 40fdef89eb
commit 0dabb43e0f

View File

@@ -34,6 +34,9 @@ export class TestHelpers {
).toBeVisible();
await page.getByRole("menuitem", { name: "Element Call" }).click();
// TODO: Remove as soon as web merges https://github.com/element-hq/element-web/pull/32755
await this.dismissFileDialogPermissionIfNeeded(page);
}
public static async joinCallFromLobby(page: Page): Promise<void> {
@@ -60,6 +63,9 @@ export class TestHelpers {
await expect(page.getByText(label)).toBeVisible();
await expect(page.getByRole("button", { name: "Join" })).toBeVisible();
await page.getByRole("button", { name: "Join" }).click();
// TODO: Remove as soon as web merges https://github.com/element-hq/element-web/pull/32755
await this.dismissFileDialogPermissionIfNeeded(page);
}
/**
@@ -235,9 +241,30 @@ export class TestHelpers {
): Promise<void> {
await page.getByRole("button", { name: "Video call" }).click();
await page.getByRole("menuitem", { name: "Element Call" }).click();
// TODO: Remove as soon as web merges https://github.com/element-hq/element-web/pull/32755
await this.dismissFileDialogPermissionIfNeeded(page);
await TestHelpers.setEmbeddedElementCallRtcMode(page, mode);
await page.getByRole("button", { name: "Close lobby" }).click();
}
// TODO: Remove as soon as web merges https://github.com/element-hq/element-web/pull/32755
private static async dismissFileDialogPermissionIfNeeded(
page: Page,
): Promise<void> {
const dialogHeading = page.getByRole("heading", {
name: "Approve widget permissions",
});
try {
await expect(dialogHeading).toBeVisible({ timeout: 3000 });
await page.getByRole("button", { name: "Approve" }).click();
} catch {
// Dialog did not appear, that's fine
}
}
/**
* Goes to the settings to set the RTC mode.
* then closes the settings modal.