New Room List: Change the order of filters to match those on mobile (#30905)
* Change the order of filters to match those on mobile * Fix jest test * Update screenshots to include expanded and collapsed list of filters. * lint
This commit is contained in:
@@ -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" },
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.5 KiB |
@@ -48,9 +48,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")],
|
||||
]);
|
||||
|
||||
|
||||
@@ -72,9 +72,9 @@ describe("RoomListViewModel", () => {
|
||||
"Unreads",
|
||||
"People",
|
||||
"Rooms",
|
||||
"Favourites",
|
||||
"Mentions",
|
||||
"Invites",
|
||||
"Favourites",
|
||||
"Low priority",
|
||||
].entries()) {
|
||||
expect(vm.current.primaryFilters[i].name).toEqual(name);
|
||||
|
||||
Reference in New Issue
Block a user