fix test ordering

This commit is contained in:
Half-Shot 2025-09-22 19:28:18 +01:00
parent ee6696eb0f
commit 2eaf20ea30

View File

@ -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();