File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import 'package:zulip/model/localizations.dart';
9
9
import 'package:zulip/model/narrow.dart' ;
10
10
import 'package:zulip/model/store.dart' ;
11
11
import 'package:zulip/model/typing_status.dart' ;
12
+ import 'package:zulip/widgets/content.dart' ;
12
13
import 'package:zulip/widgets/message_list.dart' ;
13
14
14
15
import '../api/fake_api.dart' ;
@@ -108,18 +109,13 @@ void main() {
108
109
109
110
group ('ComposeAutocomplete' , () {
110
111
111
- Finder findNetworkImage (String url) {
112
- return find.byWidgetPredicate ((widget) => switch (widget) {
113
- Image (image: NetworkImage (url: var imageUrl)) when imageUrl == url
114
- => true ,
115
- _ => false ,
116
- });
117
- }
112
+ Finder findAvatarImage (int userId) =>
113
+ find.byWidgetPredicate ((widget) => widget is AvatarImage && widget.userId == userId);
118
114
119
115
void checkUserShown (User user, PerAccountStore store, {required bool expected}) {
120
116
check (find.text (user.fullName).evaluate ().length).equals (expected ? 1 : 0 );
121
117
final avatarFinder =
122
- findNetworkImage (store. tryResolveUrl ( user.avatarUrl ! ). toString () );
118
+ findAvatarImage ( user.userId );
123
119
check (avatarFinder.evaluate ().length).equals (expected ? 1 : 0 );
124
120
}
125
121
You can’t perform that action at this time.
0 commit comments