Skip to content

Add low priority avatar decoration to room tile #30065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions playwright/e2e/left-panel/room-list-panel/room-list.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*

Check failure on line 1 in playwright/e2e/left-panel/room-list-panel/room-list.spec.ts

View workflow job for this annotation

GitHub Actions / Run Tests [Chrome] 2/6

[Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:258:13 › Room list › Avatar decoration › should be a low priority room @screenshot

1) [Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:258:13 › Room list › Avatar decoration › should be a low priority room @screenshot Test timeout of 30000ms exceeded.

Check failure on line 1 in playwright/e2e/left-panel/room-list-panel/room-list.spec.ts

View workflow job for this annotation

GitHub Actions / Run Tests [Chrome] 2/6

[Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:258:13 › Room list › Avatar decoration › should be a low priority room @screenshot

1) [Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:258:13 › Room list › Avatar decoration › should be a low priority room @screenshot Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Test timeout of 30000ms exceeded.

Check failure on line 1 in playwright/e2e/left-panel/room-list-panel/room-list.spec.ts

View workflow job for this annotation

GitHub Actions / Run Tests [Chrome] 2/6

[Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:258:13 › Room list › Avatar decoration › should be a low priority room @screenshot

1) [Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:258:13 › Room list › Avatar decoration › should be a low priority room @screenshot Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Test timeout of 30000ms exceeded.
* Copyright 2025 New Vector Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Expand Down Expand Up @@ -182,7 +182,7 @@

await page.keyboard.press("Alt+Shift+ArrowDown");

await expect(page.getByRole("heading", { name: "1 notification", level: 1 })).toBeVisible();

Check failure on line 185 in playwright/e2e/left-panel/room-list-panel/room-list.spec.ts

View workflow job for this annotation

GitHub Actions / Run Tests [Chrome] 2/6

[Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:173:17 › Room list › Room list › Shortcuts › should select the next unread room

2) [Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:173:17 › Room list › Room list › Shortcuts › should select the next unread room Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: getByRole('heading', { name: '1 notification', level: 1 }) Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for getByRole('heading', { name: '1 notification', level: 1 }) 183 | await page.keyboard.press("Alt+Shift+ArrowDown"); 184 | > 185 | await expect(page.getByRole("heading", { name: "1 notification", level: 1 })).toBeVisible(); | ^ 186 | }); 187 | }); 188 | at /home/runner/work/element-web/element-web/playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:185:95
});
});

Expand Down Expand Up @@ -255,6 +255,28 @@
await expect(publicRoom).toMatchScreenshot("room-list-item-public.png");
});

test("should be a low priority room", { tag: "@screenshot" }, async ({ page, app, user }) => {
// @ts-ignore Visibility enum is not accessible
await app.client.createRoom({ name: "low priority room", visibility: "public" });
const roomListView = getRoomList(page);
const publicRoom = roomListView.getByRole("gridcell", { name: "low priority room" });

// Make room low priority
await publicRoom.hover();
const roomItemMenu = publicRoom.getByRole("button", { name: "More Options" });
await roomItemMenu.click();
await page.getByRole("menuitem", { name: "Low priority" }).click();

Check failure on line 268 in playwright/e2e/left-panel/room-list-panel/room-list.spec.ts

View workflow job for this annotation

GitHub Actions / Run Tests [Chrome] 2/6

[Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:258:13 › Room list › Avatar decoration › should be a low priority room @screenshot

1) [Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:258:13 › Room list › Avatar decoration › should be a low priority room @screenshot Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('menuitem', { name: 'Low priority' }) 266 | const roomItemMenu = publicRoom.getByRole("button", { name: "More Options" }); 267 | await roomItemMenu.click(); > 268 | await page.getByRole("menuitem", { name: "Low priority" }).click(); | ^ 269 | 270 | // Should have low priority decoration 271 | await expect(publicRoom.locator(".mx_RoomAvatarView_icon")).toHaveAccessibleName( at /home/runner/work/element-web/element-web/playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:268:72

Check failure on line 268 in playwright/e2e/left-panel/room-list-panel/room-list.spec.ts

View workflow job for this annotation

GitHub Actions / Run Tests [Chrome] 2/6

[Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:258:13 › Room list › Avatar decoration › should be a low priority room @screenshot

1) [Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:258:13 › Room list › Avatar decoration › should be a low priority room @screenshot Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('menuitem', { name: 'Low priority' }) 266 | const roomItemMenu = publicRoom.getByRole("button", { name: "More Options" }); 267 | await roomItemMenu.click(); > 268 | await page.getByRole("menuitem", { name: "Low priority" }).click(); | ^ 269 | 270 | // Should have low priority decoration 271 | await expect(publicRoom.locator(".mx_RoomAvatarView_icon")).toHaveAccessibleName( at /home/runner/work/element-web/element-web/playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:268:72

Check failure on line 268 in playwright/e2e/left-panel/room-list-panel/room-list.spec.ts

View workflow job for this annotation

GitHub Actions / Run Tests [Chrome] 2/6

[Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:258:13 › Room list › Avatar decoration › should be a low priority room @screenshot

1) [Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:258:13 › Room list › Avatar decoration › should be a low priority room @screenshot Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByRole('menuitem', { name: 'Low priority' }) 266 | const roomItemMenu = publicRoom.getByRole("button", { name: "More Options" }); 267 | await roomItemMenu.click(); > 268 | await page.getByRole("menuitem", { name: "Low priority" }).click(); | ^ 269 | 270 | // Should have low priority decoration 271 | await expect(publicRoom.locator(".mx_RoomAvatarView_icon")).toHaveAccessibleName( at /home/runner/work/element-web/element-web/playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:268:72

// Should have low priority decoration
await expect(publicRoom.locator(".mx_RoomAvatarView_icon")).toHaveAccessibleName(
"This is a low priority room",
);

// focus the user menu to avoid to have hover decoration
await page.getByRole("button", { name: "User menu" }).focus();
await expect(publicRoom).toMatchScreenshot("room-list-item-low-priority.png");
});

test("should be a video room", { tag: "@screenshot" }, async ({ page, app, user }) => {
await page.getByTestId("room-list-panel").getByRole("button", { name: "Add" }).click();
await page.getByRole("menuitem", { name: "New video room" }).click();
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 25 additions & 15 deletions src/components/viewmodels/avatars/RoomAvatarViewModel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ import { useEffect, useState } from "react";

import { useTypedEventEmitter } from "../../../hooks/useEventEmitter";
import { useDmMember, usePresence, type Presence } from "../../views/avatars/WithPresenceIndicator";
import { DefaultTagID } from "../../../stores/room-list/models";

export enum AvatarBadgeDecoration {
LowPriority = "LowPriority",
VideoRoom = "VideoRoom",
PublicRoom = "PublicRoom",
Presence = "Presence",
}

export interface RoomAvatarViewState {
/**
* Whether the room avatar has a decoration.
* A decoration can be a public or a video call icon or an indicator of presence.
*/
hasDecoration: boolean;
/**
* Whether the room is public.
*/
isPublic: boolean;
/**
* Whether the room is a video room.
*/
isVideoRoom: boolean;
/**
* The presence of the user in the DM room.
* If null, the user is not in a DM room or presence is not enabled.
*/
presence: Presence | null;

/**
* The decoration that should be rendered.
*/
badgeDecoration?: AvatarBadgeDecoration;
}

/**
Expand All @@ -41,10 +41,20 @@ export function useRoomAvatarViewModel(room: Room): RoomAvatarViewState {
const roomMember = useDmMember(room);
const presence = usePresence(room, roomMember);
const isPublic = useIsPublic(room);
const isLowPriority = !!room.tags[DefaultTagID.LowPriority];

const hasDecoration = isPublic || isVideoRoom || presence !== null;
let badgeDecoration: AvatarBadgeDecoration | undefined;
if (isLowPriority) {
badgeDecoration = AvatarBadgeDecoration.LowPriority;
} else if (isVideoRoom) {
badgeDecoration = AvatarBadgeDecoration.VideoRoom;
} else if (isPublic) {
badgeDecoration = AvatarBadgeDecoration.PublicRoom;
} else if (presence) {
badgeDecoration = AvatarBadgeDecoration.Presence;
}

return { hasDecoration, isPublic, isVideoRoom, presence };
return { badgeDecoration, presence };
}

/**
Expand Down
83 changes: 50 additions & 33 deletions src/components/views/avatars/RoomAvatarView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ import React, { type JSX } from "react";
import { type Room } from "matrix-js-sdk/src/matrix";
import PublicIcon from "@vector-im/compound-design-tokens/assets/web/icons/public";
import VideoIcon from "@vector-im/compound-design-tokens/assets/web/icons/video-call-solid";
import ArrowDownIcon from "@vector-im/compound-design-tokens/assets/web/icons/arrow-down";
import OnlineOrUnavailableIcon from "@vector-im/compound-design-tokens/assets/web/icons/presence-solid-8x8";
import OfflineIcon from "@vector-im/compound-design-tokens/assets/web/icons/presence-outline-8x8";
import BusyIcon from "@vector-im/compound-design-tokens/assets/web/icons/presence-strikethrough-8x8";
import classNames from "classnames";

import RoomAvatar from "./RoomAvatar";
import { useRoomAvatarViewModel } from "../../viewmodels/avatars/RoomAvatarViewModel";
import { AvatarBadgeDecoration, useRoomAvatarViewModel } from "../../viewmodels/avatars/RoomAvatarViewModel";
import { _t } from "../../../languageHandler";
import { Presence } from "./WithPresenceIndicator";

Expand All @@ -33,41 +34,21 @@ interface RoomAvatarViewProps {
export function RoomAvatarView({ room }: RoomAvatarViewProps): JSX.Element {
const vm = useRoomAvatarViewModel(room);
// No decoration, we just show the avatar
if (!vm.hasDecoration) return <RoomAvatar size="32px" room={room} />;
if (!vm.badgeDecoration) return <RoomAvatar size="32px" room={room} />;

const icon = getAvatarDecoration(vm.badgeDecoration, vm.presence);

// Presence indicator and video/public icons don't have the same size
// We use different masks
const maskClass =
vm.badgeDecoration === AvatarBadgeDecoration.Presence
? "mx_RoomAvatarView_RoomAvatar_presence"
: "mx_RoomAvatarView_RoomAvatar_icon";

return (
<div className="mx_RoomAvatarView">
<RoomAvatar
className={classNames("mx_RoomAvatarView_RoomAvatar", {
// Presence indicator and video/public icons don't have the same size
// We use different masks
mx_RoomAvatarView_RoomAvatar_icon: vm.isVideoRoom || vm.isPublic,
mx_RoomAvatarView_RoomAvatar_presence: Boolean(vm.presence),
})}
size="32px"
room={room}
/>

{/* If the room is a public video room, we prefer to display only the video icon */}
{vm.isPublic && !vm.isVideoRoom && (
<PublicIcon
width="16px"
height="16px"
className="mx_RoomAvatarView_icon"
color="var(--cpd-color-icon-tertiary)"
aria-label={_t("room|header|room_is_public")}
/>
)}
{vm.isVideoRoom && (
<VideoIcon
width="16px"
height="16px"
className="mx_RoomAvatarView_icon"
color="var(--cpd-color-icon-tertiary)"
aria-label={_t("room|video_room")}
/>
)}
{vm.presence && <PresenceDecoration presence={vm.presence} />}
<RoomAvatar className={classNames("mx_RoomAvatarView_RoomAvatar", maskClass)} size="32px" room={room} />
{icon}
</div>
);
}
Expand Down Expand Up @@ -126,3 +107,39 @@ function PresenceDecoration({ presence }: PresenceDecorationProps): JSX.Element
);
}
}

function getAvatarDecoration(decoration: AvatarBadgeDecoration, presence: Presence | null): React.ReactNode {
if (decoration === AvatarBadgeDecoration.LowPriority) {
return (
<ArrowDownIcon
width="16px"
height="16px"
className="mx_RoomAvatarView_icon"
color="var(--cpd-color-icon-tertiary)"
aria-label={_t("room|room_is_low_priority")}
/>
);
} else if (decoration === AvatarBadgeDecoration.VideoRoom) {
return (
<VideoIcon
width="16px"
height="16px"
className="mx_RoomAvatarView_icon"
color="var(--cpd-color-icon-tertiary)"
aria-label={_t("room|video_room")}
/>
);
} else if (decoration === AvatarBadgeDecoration.PublicRoom) {
return (
<PublicIcon
width="16px"
height="16px"
className="mx_RoomAvatarView_icon"
color="var(--cpd-color-icon-tertiary)"
aria-label={_t("room|header|room_is_public")}
/>
);
} else if (decoration === AvatarBadgeDecoration.Presence) {
return <PresenceDecoration presence={presence!} />;
}
}
1 change: 1 addition & 0 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -2048,6 +2048,7 @@
"read_topic": "Click to read topic",
"rejecting": "Rejecting invite…",
"rejoin_button": "Re-join",
"room_is_low_priority": "This is a low priority room",
"search": {
"all_rooms_button": "Search all rooms",
"placeholder": "Search messages…",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@
import { renderHook, waitFor } from "jest-matrix-react";
import { JoinRule, type MatrixClient, type Room, RoomMember, User } from "matrix-js-sdk/src/matrix";

import { useRoomAvatarViewModel } from "../../../../../src/components/viewmodels/avatars/RoomAvatarViewModel";
import {
AvatarBadgeDecoration,
useRoomAvatarViewModel,
} from "../../../../../src/components/viewmodels/avatars/RoomAvatarViewModel";
import { createTestClient, mkStubRoom } from "../../../../test-utils";
import DMRoomMap from "../../../../../src/utils/DMRoomMap";
import * as PresenceIndicatorModule from "../../../../../src/components/views/avatars/WithPresenceIndicator";
import { DefaultTagID } from "../../../../../src/stores/room-list/models";

jest.mock("../../../../../src/utils/room/getJoinedNonFunctionalMembers", () => ({
getJoinedNonFunctionalMembers: jest.fn().mockReturnValue([]),
Expand All @@ -32,35 +36,60 @@
jest.spyOn(PresenceIndicatorModule, "usePresence").mockReturnValue(null);
});

it("should has hasDecoration to false", async () => {
it("should have badgeDecoration set to LowPriority", () => {
room.tags[DefaultTagID.LowPriority] = {};
const { result: vm } = renderHook(() => useRoomAvatarViewModel(room));
expect(vm.current.hasDecoration).toBe(false);
expect(vm.current.badgeDecoration).toBe(AvatarBadgeDecoration.LowPriority);
});

it("should has isVideoRoom set to true", () => {
it("should have badgeDecoration set to VideoRoom", () => {
jest.spyOn(room, "isCallRoom").mockReturnValue(true);
const { result: vm } = renderHook(() => useRoomAvatarViewModel(room));
expect(vm.current.isVideoRoom).toBe(true);
expect(vm.current.hasDecoration).toBe(true);
expect(vm.current.badgeDecoration).toBe(AvatarBadgeDecoration.VideoRoom);
});

it("should has isPublic set to true", () => {
it("should have badgeDecoration set to PublicRoom", () => {
jest.spyOn(room, "getJoinRule").mockReturnValue(JoinRule.Public);

const { result: vm } = renderHook(() => useRoomAvatarViewModel(room));
expect(vm.current.isPublic).toBe(true);
expect(vm.current.hasDecoration).toBe(true);
expect(vm.current.badgeDecoration).toBe(AvatarBadgeDecoration.PublicRoom);
});

it("should set badgeDecoration based on priority", () => {
// 1. Presence has the least priority
const user = User.createUser("userId", matrixClient);
const roomMember = new RoomMember(room.roomId, "userId");
roomMember.user = user;
jest.spyOn(PresenceIndicatorModule, "useDmMember").mockReturnValue(roomMember);
jest.spyOn(PresenceIndicatorModule, "usePresence").mockReturnValue(PresenceIndicatorModule.Presence.Online);

const { result: vm, rerender } = renderHook(() => useRoomAvatarViewModel(room));
expect(vm.current.badgeDecoration).toBe(AvatarBadgeDecoration.Presence);

// 2. With presence and public room, presence takes precedence
jest.spyOn(room, "getJoinRule").mockReturnValue(JoinRule.Public);
rerender(room);
expect(vm.current.badgeDecoration).toBe(AvatarBadgeDecoration.PublicRoom);

Check failure on line 71 in test/unit-tests/components/viewmodels/avatars/RoomAvatarViewModel-test.tsx

View workflow job for this annotation

GitHub Actions / Jest (1)

RoomAvatarViewModel › should set badgeDecoration based on priority

expect(received).toBe(expected) // Object.is equality Expected: "PublicRoom" Received: "Presence" at Object.toBe (test/unit-tests/components/viewmodels/avatars/RoomAvatarViewModel-test.tsx:71:44)

// 3. With presence, public-room and video room, video room takes precedence
jest.spyOn(room, "isCallRoom").mockReturnValue(true);
rerender(room);
expect(vm.current.badgeDecoration).toBe(AvatarBadgeDecoration.VideoRoom);

// 4. With presence, public room, video room and low priority, low priority takes precedence
room.tags[DefaultTagID.LowPriority] = {};
rerender(room);
expect(vm.current.badgeDecoration).toBe(AvatarBadgeDecoration.LowPriority);
});

it("should recompute isPublic when room changed", async () => {
const { result: vm, rerender } = renderHook((props) => useRoomAvatarViewModel(props), { initialProps: room });
expect(vm.current.isPublic).toBe(false);
expect(vm.current.badgeDecoration).not.toBe(AvatarBadgeDecoration.PublicRoom);

const publicRoom = mkStubRoom("roomId2", "roomName2", matrixClient);
jest.spyOn(publicRoom, "getJoinRule").mockReturnValue(JoinRule.Public);
rerender(publicRoom);

await waitFor(() => expect(vm.current.isPublic).toBe(true));
await waitFor(() => expect(vm.current.badgeDecoration).toBe(AvatarBadgeDecoration.PublicRoom));
});

it("should return presence", async () => {
Expand Down
39 changes: 19 additions & 20 deletions test/unit-tests/components/views/avatars/RoomAvatarView-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ import { mocked } from "jest-mock";
import { RoomAvatarView } from "../../../../../src/components/views/avatars/RoomAvatarView";
import { mkStubRoom, stubClient } from "../../../../test-utils";
import {
AvatarBadgeDecoration,
type RoomAvatarViewState,
useRoomAvatarViewModel,
} from "../../../../../src/components/viewmodels/avatars/RoomAvatarViewModel";
import DMRoomMap from "../../../../../src/utils/DMRoomMap";
import { Presence } from "../../../../../src/components/views/avatars/WithPresenceIndicator";

jest.mock("../../../../../src/components/viewmodels/avatars/RoomAvatarViewModel", () => ({
...jest.requireActual("../../../../../src/components/viewmodels/avatars/RoomAvatarViewModel"),
useRoomAvatarViewModel: jest.fn(),
}));

Expand All @@ -33,53 +35,50 @@ describe("<RoomAvatarView />", () => {

beforeEach(() => {
defaultValue = {
hasDecoration: true,
isPublic: true,
isVideoRoom: true,
badgeDecoration: undefined,
presence: null,
};

mocked(useRoomAvatarViewModel).mockReturnValue(defaultValue);
});

it("should not render a decoration", () => {
mocked(useRoomAvatarViewModel).mockReturnValue({ ...defaultValue, hasDecoration: false });
mocked(useRoomAvatarViewModel).mockReturnValue({ ...defaultValue });
const { asFragment } = render(<RoomAvatarView room={room} />);
expect(asFragment()).toMatchSnapshot();
});

it("should render a video room decoration", () => {
mocked(useRoomAvatarViewModel).mockReturnValue({ ...defaultValue, hasDecoration: true, isVideoRoom: true });
it("should render a low priority room decoration", () => {
mocked(useRoomAvatarViewModel).mockReturnValue({
...defaultValue,
badgeDecoration: AvatarBadgeDecoration.LowPriority,
});
const { asFragment } = render(<RoomAvatarView room={room} />);

expect(screen.getByLabelText("This room is a video room")).toBeInTheDocument();
expect(screen.getByLabelText("This is a low priority room")).toBeInTheDocument();
expect(asFragment()).toMatchSnapshot();
});

it("should render a public room decoration", () => {
it("should render a video room decoration", () => {
mocked(useRoomAvatarViewModel).mockReturnValue({
...defaultValue,
hasDecoration: true,
isPublic: true,
isVideoRoom: false,
badgeDecoration: AvatarBadgeDecoration.VideoRoom,
});
const { asFragment } = render(<RoomAvatarView room={room} />);

expect(screen.getByLabelText("This room is public")).toBeInTheDocument();
expect(screen.getByLabelText("This room is a video room")).toBeInTheDocument();
expect(asFragment()).toMatchSnapshot();
});

it("should not render a public room decoration if the room is a video room", () => {
it("should render a public room decoration", () => {
mocked(useRoomAvatarViewModel).mockReturnValue({
...defaultValue,
hasDecoration: true,
isPublic: true,
isVideoRoom: true,
badgeDecoration: AvatarBadgeDecoration.PublicRoom,
});
render(<RoomAvatarView room={room} />);
const { asFragment } = render(<RoomAvatarView room={room} />);

expect(screen.getByLabelText("This room is a video room")).toBeInTheDocument();
expect(screen.queryByLabelText("This room is public")).toBeNull();
expect(screen.getByLabelText("This room is public")).toBeInTheDocument();
expect(asFragment()).toMatchSnapshot();
});

it.each([
Expand All @@ -90,7 +89,7 @@ describe("<RoomAvatarView />", () => {
])("should render the $presence presence", ({ presence, label }) => {
mocked(useRoomAvatarViewModel).mockReturnValue({
...defaultValue,
hasDecoration: true,
badgeDecoration: AvatarBadgeDecoration.Presence,
presence,
});
const { asFragment } = render(<RoomAvatarView room={room} />);
Expand Down
Loading
Loading