mirror of
https://github.com/vector-im/element-call.git
synced 2026-04-25 09:35:33 +00:00
Merge pull request #3839 from element-hq/valere/revert_widget_cap_workaround
revert workaround for widget permission dialog, not needed anymore
This commit is contained in:
@@ -34,9 +34,6 @@ export class TestHelpers {
|
|||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
|
|
||||||
await page.getByRole("menuitem", { name: "Element 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async joinCallFromLobby(page: Page): Promise<void> {
|
public static async joinCallFromLobby(page: Page): Promise<void> {
|
||||||
@@ -63,9 +60,6 @@ export class TestHelpers {
|
|||||||
await expect(page.getByText(label)).toBeVisible();
|
await expect(page.getByText(label)).toBeVisible();
|
||||||
await expect(page.getByRole("button", { name: "Join" })).toBeVisible();
|
await expect(page.getByRole("button", { name: "Join" })).toBeVisible();
|
||||||
await page.getByRole("button", { name: "Join" }).click();
|
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -242,29 +236,10 @@ export class TestHelpers {
|
|||||||
await page.getByRole("button", { name: "Video call" }).click();
|
await page.getByRole("button", { name: "Video call" }).click();
|
||||||
await page.getByRole("menuitem", { name: "Element 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 TestHelpers.setEmbeddedElementCallRtcMode(page, mode);
|
||||||
await page.getByRole("button", { name: "Close lobby" }).click();
|
await page.getByRole("button", { name: "Close lobby" }).click();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Remove as soon as web merges https://github.com/element-hq/element-web/pull/32755
|
|
||||||
public 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.
|
* Goes to the settings to set the RTC mode.
|
||||||
* then closes the settings modal.
|
* then closes the settings modal.
|
||||||
|
|||||||
@@ -45,8 +45,6 @@ widgetTest(
|
|||||||
await expect(whistler.page.getByText("Incoming voice call")).toBeVisible();
|
await expect(whistler.page.getByText("Incoming voice call")).toBeVisible();
|
||||||
await whistler.page.getByRole("button", { name: "Accept" }).click();
|
await whistler.page.getByRole("button", { name: "Accept" }).click();
|
||||||
|
|
||||||
await TestHelpers.dismissFileDialogPermissionIfNeeded(whistler.page);
|
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
whistler.page.locator('iframe[title="Element Call"]'),
|
whistler.page.locator('iframe[title="Element Call"]'),
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
@@ -140,8 +138,6 @@ widgetTest(
|
|||||||
await expect(whistler.page.getByText("Incoming video call")).toBeVisible();
|
await expect(whistler.page.getByText("Incoming video call")).toBeVisible();
|
||||||
await whistler.page.getByRole("button", { name: "Accept" }).click();
|
await whistler.page.getByRole("button", { name: "Accept" }).click();
|
||||||
|
|
||||||
await TestHelpers.dismissFileDialogPermissionIfNeeded(whistler.page);
|
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
whistler.page.locator('iframe[title="Element Call"]'),
|
whistler.page.locator('iframe[title="Element Call"]'),
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
|
|||||||
Reference in New Issue
Block a user