diff --git a/apps/web/playwright/e2e/left-panel/room-list-panel/room-list-sections.spec.ts b/apps/web/playwright/e2e/left-panel/room-list-panel/room-list-sections.spec.ts index 14256cf645..e1ef31e92f 100644 --- a/apps/web/playwright/e2e/left-panel/room-list-panel/room-list-sections.spec.ts +++ b/apps/web/playwright/e2e/left-panel/room-list-panel/room-list-sections.spec.ts @@ -290,4 +290,131 @@ test.describe("Room list sections", () => { await expect(roomList.getByRole("row", { name: "no unread room" })).not.toBeVisible(); }); }); + + test.describe("Section keyboard navigation", () => { + test.beforeEach(async ({ app }) => { + // A favourite room forces section mode and gives us a non-trivial first section. + const favouriteId = await app.client.createRoom({ name: "favourite room" }); + await app.client.evaluate(async (client, roomId) => { + await client.setRoomTag(roomId, "m.favourite"); + }, favouriteId); + + // A chats-section room so we have a second section to navigate to. + await app.client.createRoom({ name: "chat room" }); + }); + + test("Arrow Down/Up move focus through sections and rooms", async ({ page }) => { + const roomList = getRoomList(page); + const favouritesHeader = getSectionHeader(page, "Favourites"); + // In treegrid mode, a room renders as
. + // Only the inner