@@ -316,15 +316,25 @@ test.describe("Room list filters and sort", () => {
316
316
} ,
317
317
) ;
318
318
319
- test ( "should render the placeholder for unread filter" , { tag : "@screenshot" } , async ( { page, app, user } ) => {
320
- const primaryFilters = getPrimaryFilters ( page ) ;
321
- await primaryFilters . getByRole ( "option" , { name : "Unread" } ) . click ( ) ;
319
+ [
320
+ { filter : "Unreads" , action : "Show all chats" } ,
321
+ { filter : "Mentions" , action : "See all activity" } ,
322
+ { filter : "Invites" , action : "See all activity" } ,
323
+ ] . forEach ( ( { filter, action } ) => {
324
+ test (
325
+ `should render the placeholder for ${ filter } filter` ,
326
+ { tag : "@screenshot" } ,
327
+ async ( { page, app, user } ) => {
328
+ const primaryFilters = getPrimaryFilters ( page ) ;
329
+ await primaryFilters . getByRole ( "option" , { name : filter } ) . click ( ) ;
322
330
323
- const emptyRoomList = getEmptyRoomList ( page ) ;
324
- await expect ( emptyRoomList ) . toMatchScreenshot ( "unread -empty-room-list.png" ) ;
331
+ const emptyRoomList = getEmptyRoomList ( page ) ;
332
+ await expect ( emptyRoomList ) . toMatchScreenshot ( ` ${ filter } -empty-room-list.png` ) ;
325
333
326
- await emptyRoomList . getByRole ( "button" , { name : "show all chats" } ) . click ( ) ;
327
- await expect ( primaryFilters . getByRole ( "option" , { name : "Unread" } ) ) . not . toBeChecked ( ) ;
334
+ await emptyRoomList . getByRole ( "button" , { name : action } ) . click ( ) ;
335
+ await expect ( primaryFilters . getByRole ( "option" , { name : filter } ) ) . not . toBeChecked ( ) ;
336
+ } ,
337
+ ) ;
328
338
} ) ;
329
339
330
340
[ "People" , "Rooms" , "Favourite" ] . forEach ( ( filter ) => {
0 commit comments