mirror of
https://github.com/vector-im/element-call.git
synced 2026-05-01 09:54:37 +00:00
fix accept call with latest web
This commit is contained in:
@@ -45,7 +45,7 @@ widgetTest("Start a new call as widget", async ({ asWidget, browserName }) => {
|
||||
).toBeVisible();
|
||||
|
||||
// Join from the other side
|
||||
await TestHelpers.joinCallInCurrentRoom(whistler.page);
|
||||
await TestHelpers.joinCallInCurrentDM(whistler.page);
|
||||
|
||||
// Currently disabled due to recent Element Web is bypassing Lobby
|
||||
// await expect(
|
||||
|
||||
@@ -54,12 +54,34 @@ export class TestHelpers {
|
||||
.click();
|
||||
}
|
||||
|
||||
public static async joinCallInCurrentDM(
|
||||
page: Page,
|
||||
audioOnly: boolean = false,
|
||||
): Promise<void> {
|
||||
await this.joinCallInRoom(page, audioOnly, true);
|
||||
}
|
||||
|
||||
public static async joinCallInCurrentRoom(
|
||||
page: Page,
|
||||
audioOnly: boolean = false,
|
||||
): Promise<void> {
|
||||
// This is the header button that notifies about an ongoing call
|
||||
const label = audioOnly ? "Voice call started" : "Video call started";
|
||||
await this.joinCallInRoom(page, audioOnly, false);
|
||||
}
|
||||
|
||||
public static async joinCallInRoom(
|
||||
page: Page,
|
||||
audioOnly: boolean = false,
|
||||
isDM: boolean = false,
|
||||
): Promise<void> {
|
||||
// XXX This using the notification toast to join the room.
|
||||
// Not the button in the header
|
||||
|
||||
await page.waitForTimeout(3000);
|
||||
const label = isDM
|
||||
? audioOnly
|
||||
? "Incoming voice call"
|
||||
: "Incoming video call"
|
||||
: "Group call started";
|
||||
await expect(page.getByText(label)).toBeVisible({
|
||||
timeout: 10000,
|
||||
});
|
||||
|
||||
@@ -41,7 +41,7 @@ widgetTest(
|
||||
).toBeVisible();
|
||||
|
||||
await expect(whistler.page.getByText("Incoming voice call")).toBeVisible();
|
||||
await whistler.page.getByRole("button", { name: "Accept" }).click();
|
||||
await whistler.page.getByRole("button", { name: "Join" }).click();
|
||||
|
||||
await expect(
|
||||
whistler.page.locator('iframe[title="Element Call"]'),
|
||||
@@ -132,7 +132,7 @@ widgetTest(
|
||||
).toBeVisible();
|
||||
|
||||
await expect(whistler.page.getByText("Incoming video call")).toBeVisible();
|
||||
await whistler.page.getByRole("button", { name: "Accept" }).click();
|
||||
await whistler.page.getByRole("button", { name: "Join" }).click();
|
||||
|
||||
await expect(
|
||||
whistler.page.locator('iframe[title="Element Call"]'),
|
||||
@@ -217,7 +217,7 @@ widgetTest(
|
||||
).toBeVisible();
|
||||
|
||||
await expect(whistler.page.getByText("Incoming video call")).toBeVisible();
|
||||
await whistler.page.getByRole("button", { name: "Decline" }).click();
|
||||
await whistler.page.getByRole("button", { name: "Ignore" }).click();
|
||||
|
||||
await expect(
|
||||
whistler.page.locator('iframe[title="Element Call"]'),
|
||||
|
||||
Reference in New Issue
Block a user