Skip to content

Commit 98f1984

Browse files
committed
test: e2e add test for public and video room
1 parent 88ec5a9 commit 98f1984

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

playwright/e2e/left-panel/room-list-panel/room-list.spec.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import { type Page } from "@playwright/test";
99

10-
import { test, expect } from "../../../element-web-test";
10+
import { expect, test } from "../../../element-web-test";
1111

1212
test.describe("Room list", () => {
1313
test.use({
@@ -144,6 +144,32 @@ test.describe("Room list", () => {
144144
});
145145
});
146146

147+
test.describe("Avatar decoration", () => {
148+
test.use({ labsFlags: ["feature_video_rooms", "feature_new_room_list"] });
149+
150+
test("should be a public room", { tag: "@screenshot" }, async ({ page, app, user }) => {
151+
// @ts-ignore Visibility enum is not accessible
152+
await app.client.createRoom({ name: "public room", visibility: "public" });
153+
const roomListView = getRoomList(page);
154+
const publicRoom = roomListView.getByRole("gridcell", { name: "public room" });
155+
156+
await expect(publicRoom).toBeVisible();
157+
await expect(publicRoom).toMatchScreenshot("room-list-item-public.png");
158+
});
159+
160+
test("should be a video room", { tag: "@screenshot" }, async ({ page, app, user }) => {
161+
await page.getByTestId("room-list-panel").getByRole("button", { name: "Add" }).click();
162+
await page.getByRole("menuitem", { name: "New video room" }).click();
163+
await page.getByRole("textbox", { name: "Name" }).fill("video room");
164+
await page.getByRole("button", { name: "Create video room" }).click();
165+
166+
const roomListView = getRoomList(page);
167+
const videoRoom = roomListView.getByRole("gridcell", { name: "video room" });
168+
await expect(videoRoom).toBeVisible();
169+
await expect(videoRoom).toMatchScreenshot("room-list-item-video.png");
170+
});
171+
});
172+
147173
test.describe("Notification decoration", () => {
148174
test("should render the invitation decoration", { tag: "@screenshot" }, async ({ page, app, user, bot }) => {
149175
const roomListView = getRoomList(page);

0 commit comments

Comments
 (0)