Skip to content

Commit b1b1ebc

Browse files
committed
Fix tests
1 parent e49f2bc commit b1b1ebc

5 files changed

Lines changed: 36 additions & 2 deletions

File tree

1.09 KB
Loading
1.02 KB
Loading
1.01 KB
Loading

test/unit-tests/components/viewmodels/roomlist/RoomListViewModel-test.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,17 @@ describe("RoomListViewModel", () => {
6666
mockAndCreateRooms();
6767
const { result: vm } = renderHook(() => useRoomListViewModel());
6868
// should have 6 filters
69-
expect(vm.current.primaryFilters).toHaveLength(6);
69+
expect(vm.current.primaryFilters).toHaveLength(7);
7070
// check the order
71-
for (const [i, name] of ["Unreads", "People", "Rooms", "Mentions", "Invites", "Favourites"].entries()) {
71+
for (const [i, name] of [
72+
"Unreads",
73+
"People",
74+
"Rooms",
75+
"Mentions",
76+
"Invites",
77+
"Favourites",
78+
"Low priority",
79+
].entries()) {
7280
expect(vm.current.primaryFilters[i].name).toEqual(name);
7381
expect(vm.current.primaryFilters[i].active).toEqual(false);
7482
}

test/unit-tests/components/views/rooms/RoomListPanel/__snapshots__/RoomListPanel-test.tsx.snap

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,19 @@ exports[`<RoomListPanel /> should not render the RoomListSearch component when U
175175
Favourites
176176
</button>
177177
</li>
178+
<li
179+
aria-selected="false"
180+
role="option"
181+
>
182+
<button
183+
aria-selected="false"
184+
class="_chat-filter_5qdp0_8"
185+
role="button"
186+
tabindex="0"
187+
>
188+
Low priority
189+
</button>
190+
</li>
178191
</ul>
179192
<div
180193
class="mx_RoomListSkeleton"
@@ -424,6 +437,19 @@ exports[`<RoomListPanel /> should render the RoomListSearch component when UICom
424437
Favourites
425438
</button>
426439
</li>
440+
<li
441+
aria-selected="false"
442+
role="option"
443+
>
444+
<button
445+
aria-selected="false"
446+
class="_chat-filter_5qdp0_8"
447+
role="button"
448+
tabindex="0"
449+
>
450+
Low priority
451+
</button>
452+
</li>
427453
</ul>
428454
<div
429455
class="mx_RoomListSkeleton"

0 commit comments

Comments
 (0)