File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -243,6 +243,35 @@ void main() {
243243
244244      });
245245
246+       testWidgets ('tapping a DM row opens the message list' , (tester) async  {
247+         final  otherUser =  eg.otherUser;
248+         final  message =  eg.dmMessage (from:  otherUser, to:  [eg.selfUser]);
249+ 
250+         await  setupPage (tester,
251+             users:  [eg.selfUser, otherUser],
252+             unreadMessages:  [message]);
253+ 
254+         final  connection =  store.connection as  FakeApiConnection ;
255+ 
256+         connection.prepare (
257+           json:  eg.newestGetMessagesResult (messages:  [
258+             eg.dmMessage (from:  otherUser, to:  [eg.selfUser], flags:  [MessageFlag .read]),
259+           ], foundOldest:  false ).toJson (),
260+         );
261+ 
262+         connection.prepare (
263+           json:  eg.newestGetMessagesResult (messages:  [], foundOldest:  true ).toJson (),
264+         );
265+ 
266+         await  tester.tap (find.text (otherUser.fullName));
267+         await  tester.pumpAndSettle ();
268+ 
269+         check (find.byType (HomePage )).findsNothing ();
270+         check (find.byType (MessageListPage )).findsOne ();
271+ 
272+         check (find.text (otherUser.fullName)).findsAny ();
273+       });
274+ 
246275    });
247276
248277    // Tests for the topic action sheet are in test/widgets/action_sheet_test.dart. 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments