Skip to content

Commit 2a1fcac

Browse files
committed
test(e2e): wait for list to be rendered to take screenshot
1 parent 008f2ec commit 2a1fcac

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ test.describe("Room list panel", () => {
4444

4545
test("should respond to small screen sizes", { tag: "@screenshot" }, async ({ page }) => {
4646
await page.setViewportSize({ width: 575, height: 600 });
47-
const roomListPanel = getRoomListView(page);
48-
await expect(roomListPanel).toMatchScreenshot("room-list-panel-smallscreen.png");
47+
48+
const roomListView = getRoomListView(page);
49+
// Wait for the last room to be visible
50+
await expect(roomListView.getByRole("gridcell", { name: "Open room room19" })).toBeVisible();
51+
await expect(roomListView).toMatchScreenshot("room-list-panel-smallscreen.png");
4952
});
5053
});

0 commit comments

Comments
 (0)