test(room list cell): regenerate snapshot and use option role

This commit is contained in:
Florian Duros
2025-03-06 09:34:51 +01:00
parent 734101f3cb
commit 61d01dd17b
2 changed files with 3 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ describe("<RoomListCell />", () => {
const onClick = jest.fn();
render(<RoomListCell room={room} onClick={onClick} />);
await user.click(screen.getByRole("button", { name: `Open room ${room.name}` }));
await user.click(screen.getByRole("option", { name: `Open room ${room.name}` }));
expect(onClick).toHaveBeenCalled();
});
});

View File

@@ -4,7 +4,9 @@ exports[`<RoomListCell /> should render a room cell 1`] = `
<DocumentFragment>
<button
aria-label="Open room room1"
aria-selected="false"
class="mx_RoomListCell"
role="option"
type="button"
>
<div