diff --git a/test/unit-tests/components/views/rooms/RoomListPanel/RoomListItemView-test.tsx b/test/unit-tests/components/views/rooms/RoomListPanel/RoomListItemView-test.tsx index 914d33ee18..eda1a80514 100644 --- a/test/unit-tests/components/views/rooms/RoomListPanel/RoomListItemView-test.tsx +++ b/test/unit-tests/components/views/rooms/RoomListPanel/RoomListItemView-test.tsx @@ -89,6 +89,10 @@ describe("", () => { await user.hover(listItem); await waitFor(() => expect(screen.getByRole("button", { name: "More Options" })).toBeInTheDocument()); + + // also make another snapshot in the hover state (mostly to test the aria-describedBy on the buttons + // as there's no easy way to get the effective ARIA description in react testing library, surprisingly) + expect(listItem).toMatchSnapshot(); }); test("should hover decoration if focused", async () => { diff --git a/test/unit-tests/components/views/rooms/RoomListPanel/__snapshots__/RoomListItemView-test.tsx.snap b/test/unit-tests/components/views/rooms/RoomListPanel/__snapshots__/RoomListItemView-test.tsx.snap index 30edbfde50..138190f2a7 100644 --- a/test/unit-tests/components/views/rooms/RoomListPanel/__snapshots__/RoomListItemView-test.tsx.snap +++ b/test/unit-tests/components/views/rooms/RoomListPanel/__snapshots__/RoomListItemView-test.tsx.snap @@ -124,6 +124,129 @@ exports[` should display notification decoration 1`] = ` `; +exports[` should hover decoration if hovered 1`] = ` + + + + + + +`; + exports[` should render a room item 1`] = `