Add low priority filter pill to the room list UI (#30060)
* Add low priority filter pill to the UI * Fix tests
This commit is contained in:
@@ -66,9 +66,17 @@ describe("RoomListViewModel", () => {
|
||||
mockAndCreateRooms();
|
||||
const { result: vm } = renderHook(() => useRoomListViewModel());
|
||||
// should have 6 filters
|
||||
expect(vm.current.primaryFilters).toHaveLength(6);
|
||||
expect(vm.current.primaryFilters).toHaveLength(7);
|
||||
// check the order
|
||||
for (const [i, name] of ["Unreads", "People", "Rooms", "Mentions", "Invites", "Favourites"].entries()) {
|
||||
for (const [i, name] of [
|
||||
"Unreads",
|
||||
"People",
|
||||
"Rooms",
|
||||
"Mentions",
|
||||
"Invites",
|
||||
"Favourites",
|
||||
"Low priority",
|
||||
].entries()) {
|
||||
expect(vm.current.primaryFilters[i].name).toEqual(name);
|
||||
expect(vm.current.primaryFilters[i].active).toEqual(false);
|
||||
}
|
||||
|
||||
@@ -175,6 +175,19 @@ exports[`<RoomListPanel /> should not render the RoomListSearch component when U
|
||||
Favourites
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
aria-selected="false"
|
||||
role="option"
|
||||
>
|
||||
<button
|
||||
aria-selected="false"
|
||||
class="_chat-filter_5qdp0_8"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
Low priority
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div
|
||||
class="mx_RoomListSkeleton"
|
||||
@@ -424,6 +437,19 @@ exports[`<RoomListPanel /> should render the RoomListSearch component when UICom
|
||||
Favourites
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
aria-selected="false"
|
||||
role="option"
|
||||
>
|
||||
<button
|
||||
aria-selected="false"
|
||||
class="_chat-filter_5qdp0_8"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
Low priority
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div
|
||||
class="mx_RoomListSkeleton"
|
||||
|
||||
Reference in New Issue
Block a user