@@ -212,7 +212,6 @@ void main() {
212
212
});
213
213
214
214
group ('UserTopicUpdateButton' , () {
215
- late ZulipStream channel;
216
215
late String topic;
217
216
218
217
final mute = find.text ('Mute topic' );
@@ -231,10 +230,9 @@ void main() {
231
230
}) async {
232
231
addTearDown (testBinding.reset);
233
232
234
- channel = eg.stream ();
235
233
topic = 'isChannelMuted: $isChannelMuted , policy: $visibilityPolicy ' ;
236
234
await prepare (
237
- channel: channel ,
235
+ channel: someChannel ,
238
236
topic: topic,
239
237
isChannelSubscribed: isChannelMuted != null , // shorthand; see dartdoc
240
238
isChannelMuted: isChannelMuted,
@@ -243,12 +241,12 @@ void main() {
243
241
);
244
242
245
243
final message = eg.streamMessage (
246
- stream: channel , topic: topic, sender: eg.otherUser);
244
+ stream: someChannel , topic: topic, sender: eg.otherUser);
247
245
connection.prepare (json: eg.newestGetMessagesResult (
248
246
foundOldest: true , messages: [message]).toJson ());
249
247
await tester.pumpWidget (TestZulipApp (accountId: eg.selfAccount.id,
250
248
child: MessageListPage (
251
- initNarrow: eg.topicNarrow (channel .streamId, topic))));
249
+ initNarrow: eg.topicNarrow (someChannel .streamId, topic))));
252
250
await tester.pumpAndSettle ();
253
251
254
252
await tester.longPress (find.descendant (
@@ -275,7 +273,7 @@ void main() {
275
273
check (connection.lastRequest).isA< http.Request > ()
276
274
..url.path.equals ('/api/v1/user_topics' )
277
275
..bodyFields.deepEquals ({
278
- 'stream_id' : '${channel .streamId }' ,
276
+ 'stream_id' : '${someChannel .streamId }' ,
279
277
'topic' : topic,
280
278
'visibility_policy' : jsonEncode (expectedPolicy),
281
279
});
0 commit comments