diff --git a/playwright/e2e/voip/element-call.spec.ts b/playwright/e2e/voip/element-call.spec.ts index 1f9233bb3c..773445cdba 100644 --- a/playwright/e2e/voip/element-call.spec.ts +++ b/playwright/e2e/voip/element-call.spec.ts @@ -61,14 +61,14 @@ test.describe("Element Call", () => { test.describe("Group Chat", () => { test.use({ room: async ({ page, app, user, bot }, use) => { - const roomId = await app.client.createRoom({ name: "TestRoom", invite: [user.userId] }); + const roomId = await app.client.createRoom({ name: "TestRoom", invite: [bot.credentials.userId] }); await use({ roomId }); }, }); test("should be able to start a video call", async ({ page, user, room, app }) => { + await app.viewRoomById(room.roomId); await expect(page.getByText("Bob joined the room")).toBeVisible(); - await app.viewRoomById(room.roomId); await page.getByRole("button", { name: "Video call" }).click(); await page.getByRole("menuitem", { name: "Element Call" }).click(); @@ -84,9 +84,9 @@ test.describe("Element Call", () => { }); test("should be able to skip lobby by holding down shift", async ({ page, user, bot, room, app }) => { + await app.viewRoomById(room.roomId); await expect(page.getByText("Bob joined the room")).toBeVisible(); - await app.viewRoomById(room.roomId); await page.getByRole("button", { name: "Video call" }).click(); await page.keyboard.down("Shift"); await page.getByRole("menuitem", { name: "Element Call" }).click(); @@ -119,9 +119,9 @@ test.describe("Element Call", () => { }); test("should be able to start a video call", async ({ page, user, room, app }) => { + await app.viewRoomById(room.roomId); await expect(page.getByText("Bob joined the room")).toBeVisible(); - await app.viewRoomById(room.roomId); await page.getByRole("button", { name: "Video call" }).click(); await page.getByRole("menuitem", { name: "Element Call" }).click(); const frameUrlStr = await page.locator("iframe").getAttribute("src"); @@ -136,9 +136,9 @@ test.describe("Element Call", () => { }); test("should be able to skip lobby by holding down shift", async ({ page, user, room, app }) => { + await app.viewRoomById(room.roomId); await expect(page.getByText("Bob joined the room")).toBeVisible(); - await app.viewRoomById(room.roomId); await page.getByRole("button", { name: "Video call" }).click(); await page.keyboard.down("Shift"); await page.getByRole("menuitem", { name: "Element Call" }).click();