diff --git a/playwright/e2e/left-panel/room-list-panel/room-list.spec.ts b/playwright/e2e/left-panel/room-list-panel/room-list.spec.ts index 67910f61e8..0b6aa34029 100644 --- a/playwright/e2e/left-panel/room-list-panel/room-list.spec.ts +++ b/playwright/e2e/left-panel/room-list-panel/room-list.spec.ts @@ -41,7 +41,7 @@ test.describe("Room list", () => { } }); - test("should render the room list", { tag: "@screenshot" }, async ({ page, app, user }) => { + test("should render the room list", { tag: "@screenshot" }, async ({ page, app, user, axe }) => { const roomListView = getRoomList(page); await expect(roomListView.getByRole("option", { name: "Open room room29" })).toBeVisible(); await expect(roomListView).toMatchScreenshot("room-list.png"); @@ -54,6 +54,7 @@ test.describe("Room list", () => { // scrollListToBottom seems to leave the mouse hovered over the list, move it away. await page.getByRole("button", { name: "User menu" }).hover(); + await expect(axe).toHaveNoViolations(); await expect(roomListView).toMatchScreenshot("room-list-scrolled.png"); }); diff --git a/src/components/utils/ListView.tsx b/src/components/utils/ListView.tsx index b8425b366f..235a706a55 100644 --- a/src/components/utils/ListView.tsx +++ b/src/components/utils/ListView.tsx @@ -285,7 +285,10 @@ export function ListView(props: IListViewProps {displayChevron && ( {filters.map((filter, i) => ( -
  • - filter.toggle()}> - {filter.name} - -
  • + filter.toggle()}> + {filter.name} + ))} diff --git a/test/unit-tests/components/views/rooms/RoomListPanel/RoomListPrimaryFilters-test.tsx b/test/unit-tests/components/views/rooms/RoomListPanel/RoomListPrimaryFilters-test.tsx index 7128ecd1b8..d7d4e8314f 100644 --- a/test/unit-tests/components/views/rooms/RoomListPanel/RoomListPrimaryFilters-test.tsx +++ b/test/unit-tests/components/views/rooms/RoomListPanel/RoomListPrimaryFilters-test.tsx @@ -63,7 +63,7 @@ describe("", () => { render(); // Click on an inactive filter - await user.click(screen.getByRole("button", { name: "People" })); + await user.click(screen.getByRole("option", { name: "People" })); // Check that the toggle function was called expect(filterToggleMocks[0]).toHaveBeenCalledTimes(1); diff --git a/test/unit-tests/components/views/rooms/RoomListPanel/__snapshots__/RoomList-test.tsx.snap b/test/unit-tests/components/views/rooms/RoomListPanel/__snapshots__/RoomList-test.tsx.snap index fcbaa9110e..078950c360 100644 --- a/test/unit-tests/components/views/rooms/RoomListPanel/__snapshots__/RoomList-test.tsx.snap +++ b/test/unit-tests/components/views/rooms/RoomListPanel/__snapshots__/RoomList-test.tsx.snap @@ -9,6 +9,7 @@ exports[` should render a room list 1`] = ` data-virtuoso-scroller="true" role="listbox" style="height: 100%; outline: none; overflow-y: auto; position: relative;" + tabindex="0" >
    should renders all filters correctly 1`] = `
    -
      -
    • - -
    • -
    • + -
    • -
    • + -
    • -
    + Unreads + +
    `;