|
7 | 7 |
|
8 | 8 | import { type Page } from "@playwright/test";
|
9 | 9 |
|
10 |
| -import { test, expect } from "../../../element-web-test"; |
| 10 | +import { expect, test } from "../../../element-web-test"; |
11 | 11 |
|
12 | 12 | test.describe("Room list", () => {
|
13 | 13 | test.use({
|
@@ -144,6 +144,32 @@ test.describe("Room list", () => {
|
144 | 144 | });
|
145 | 145 | });
|
146 | 146 |
|
| 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 | + |
147 | 173 | test.describe("Notification decoration", () => {
|
148 | 174 | test("should render the invitation decoration", { tag: "@screenshot" }, async ({ page, app, user, bot }) => {
|
149 | 175 | const roomListView = getRoomList(page);
|
|
0 commit comments