Skip to content

Commit b56b0f2

Browse files
authored
New room list: rework spacing of room list item (#29965)
* feat: rework spacing of room list item * test: update snapshot * test(e2e): regenerate room list panel screenshots * test(e2e): regenerate room list screenshots * test(e2e): update filter screenshot
1 parent 4dcde7e commit b56b0f2

29 files changed

+78
-70
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ test.describe("Room list panel", () => {
3030
for (let i = 0; i < 20; i++) {
3131
await app.client.createRoom({ name: `room${i}` });
3232
}
33+
34+
// focus the user menu to avoid to have hover decoration
35+
await page.getByRole("button", { name: "User menu" }).focus();
3336
});
3437

3538
test("should render the room list panel", { tag: "@screenshot" }, async ({ page, app, user }) => {

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

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ test.describe("Room list", () => {
2929
test.beforeEach(async ({ page, app, user }) => {
3030
// The notification toast is displayed above the search section
3131
await app.closeNotificationToast();
32+
33+
// focus the user menu to avoid to have hover decoration
34+
await page.getByRole("button", { name: "User menu" }).focus();
3235
});
3336

3437
test.describe("Room list", () => {
@@ -241,6 +244,10 @@ test.describe("Room list", () => {
241244
test("should be a public room", { tag: "@screenshot" }, async ({ page, app, user }) => {
242245
// @ts-ignore Visibility enum is not accessible
243246
await app.client.createRoom({ name: "public room", visibility: "public" });
247+
248+
// focus the user menu to avoid to have hover decoration
249+
await page.getByRole("button", { name: "User menu" }).focus();
250+
244251
const roomListView = getRoomList(page);
245252
const publicRoom = roomListView.getByRole("gridcell", { name: "public room" });
246253

@@ -256,6 +263,10 @@ test.describe("Room list", () => {
256263

257264
const roomListView = getRoomList(page);
258265
const videoRoom = roomListView.getByRole("gridcell", { name: "video room" });
266+
267+
// focus the user menu to avoid to have hover decoration
268+
await page.getByRole("button", { name: "User menu" }).focus();
269+
259270
await expect(videoRoom).toBeVisible();
260271
await expect(videoRoom).toMatchScreenshot("room-list-item-video.png");
261272
});
@@ -328,6 +339,10 @@ test.describe("Room list", () => {
328339
await page.getByRole("menuitemcheckbox", { name: "Show message previews" }).click();
329340

330341
const roomId = await app.client.createRoom({ name: "activity" });
342+
343+
// focus the user menu to avoid to have hover decoration
344+
await page.getByRole("button", { name: "User menu" }).focus();
345+
331346
await app.client.inviteUser(roomId, bot.credentials.userId);
332347
await bot.joinRoom(roomId);
333348
await bot.sendMessage(roomId, "I am a robot. Beep.");
@@ -376,8 +391,8 @@ test.describe("Room list", () => {
376391
await room.getByRole("button", { name: "More Options" }).click();
377392
await page.getByRole("menuitem", { name: "mark as unread" }).click();
378393

379-
// Remove hover on the room list item
380-
await roomListView.hover();
394+
// focus the user menu to avoid to have hover decoration
395+
await page.getByRole("button", { name: "User menu" }).focus();
381396

382397
await expect(room).toMatchScreenshot("room-list-item-mark-as-unread.png");
383398
});
-247 Bytes
Loading
-80 Bytes
Loading
-1 Bytes
Loading
-14 Bytes
Loading
-201 Bytes
Loading
-194 Bytes
Loading
-244 Bytes
Loading
-310 Bytes
Loading

0 commit comments

Comments
 (0)