Skip to content

Commit 0387c0f

Browse files
committed
test(e2e): fix room list test
1 parent cb5b208 commit 0387c0f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ test.describe("Room list", () => {
4343
await expect(roomListView.getByRole("gridcell", { name: "Open room room29" })).toBeVisible();
4444
await expect(roomListView).toMatchScreenshot("room-list.png");
4545

46-
await roomListView.hover();
46+
// Put focus on the room list
47+
await roomListView.getByRole("gridcell", { name: "Open room room29" }).click();
4748
// Scroll to the end of the room list
4849
await page.mouse.wheel(0, 1000);
4950
await expect(roomListView.getByRole("gridcell", { name: "Open room room0" })).toBeVisible();
@@ -108,6 +109,8 @@ test.describe("Room list", () => {
108109
// Remove hover on the room list item
109110
await roomListView.hover();
110111

112+
// Put focus on the room list
113+
await roomListView.getByRole("gridcell", { name: "Open room room29" }).click();
111114
// Scroll to the bottom of the list
112115
await page.getByRole("grid", { name: "Room list" }).evaluate((e) => {
113116
e.scrollTop = e.scrollHeight;
@@ -129,7 +132,8 @@ test.describe("Room list", () => {
129132

130133
test("should scroll to the current room", async ({ page, app, user }) => {
131134
const roomListView = getRoomList(page);
132-
await roomListView.hover();
135+
// Put focus on the room list
136+
await roomListView.getByRole("gridcell", { name: "Open room room29" }).click();
133137
// Scroll to the end of the room list
134138
await page.mouse.wheel(0, 1000);
135139

0 commit comments

Comments
 (0)