Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,13 @@ test.describe("Room list filters and sort", () => {
return page.getByTestId("empty-room-list");
}

test("should render the primary filters", { tag: "@screenshot" }, async ({ page, app, user }) => {
const primaryFilters = getPrimaryFilters(page);
await expect(primaryFilters).toMatchScreenshot("collapsed-primary-filters.png");
await getFilterExpandButton(page).click();
await expect(primaryFilters).toMatchScreenshot("expanded-primary-filters.png");
});

test(
"should render the default placeholder when there is no filter",
{ tag: "@screenshot" },
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/viewmodels/roomlist/useFilteredRooms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const filterKeyToNameMap: Map<FilterKey, TranslationKey> = new Map([
[FilterKey.UnreadFilter, _td("room_list|filters|unread")],
[FilterKey.PeopleFilter, _td("room_list|filters|people")],
[FilterKey.RoomsFilter, _td("room_list|filters|rooms")],
[FilterKey.FavouriteFilter, _td("room_list|filters|favourite")],
[FilterKey.MentionsFilter, _td("room_list|filters|mentions")],
[FilterKey.InvitesFilter, _td("room_list|filters|invites")],
[FilterKey.FavouriteFilter, _td("room_list|filters|favourite")],
[FilterKey.LowPriorityFilter, _td("room_list|filters|low_priority")],
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ describe("RoomListViewModel", () => {
"Unreads",
"People",
"Rooms",
"Favourites",
"Mentions",
"Invites",
"Favourites",
"Low priority",
].entries()) {
expect(vm.current.primaryFilters[i].name).toEqual(name);
Expand Down
Loading