@@ -110,11 +110,10 @@ void main() {
110
110
group ('topic action sheet' , () {
111
111
final someChannel = eg.stream ();
112
112
const someTopic = 'my topic' ;
113
+ final someMessage = eg.streamMessage (
114
+ stream: someChannel, topic: someTopic, sender: eg.otherUser);
113
115
114
116
group ('showTopicActionSheet' , () {
115
- final message = eg.streamMessage (
116
- stream: someChannel, topic: someTopic, sender: eg.otherUser);
117
-
118
117
Future <void > prepare ({
119
118
ZulipStream ? channel,
120
119
String topic = someTopic,
@@ -151,7 +150,7 @@ void main() {
151
150
channels: [eg.unreadChannelMsgs (
152
151
streamId: someChannel.streamId,
153
152
topic: someTopic,
154
- unreadMessageIds: [message .id],
153
+ unreadMessageIds: [someMessage .id],
155
154
)]));
156
155
await tester.pumpWidget (TestZulipApp (accountId: eg.selfAccount.id,
157
156
child: const HomePage ()));
@@ -167,7 +166,7 @@ void main() {
167
166
testWidgets ('show from app bar' , (tester) async {
168
167
await prepare ();
169
168
connection.prepare (json: eg.newestGetMessagesResult (
170
- foundOldest: true , messages: [message ]).toJson ());
169
+ foundOldest: true , messages: [someMessage ]).toJson ());
171
170
await tester.pumpWidget (TestZulipApp (accountId: eg.selfAccount.id,
172
171
child: MessageListPage (
173
172
initNarrow: eg.topicNarrow (someChannel.streamId, someTopic))));
@@ -186,7 +185,7 @@ void main() {
186
185
testWidgets ('show from recipient header' , (tester) async {
187
186
await prepare ();
188
187
connection.prepare (json: eg.newestGetMessagesResult (
189
- foundOldest: true , messages: [message ]).toJson ());
188
+ foundOldest: true , messages: [someMessage ]).toJson ());
190
189
await tester.pumpWidget (TestZulipApp (accountId: eg.selfAccount.id,
191
190
child: const MessageListPage (initNarrow: CombinedFeedNarrow ())));
192
191
// global store, per-account store, and message list get loaded
0 commit comments