Skip to content

Commit a0732f9

Browse files
committed
compose test [nfc]: Extract ChannelNarrow variable
Signed-off-by: Zixuan James Li <[email protected]>
1 parent 8b4f059 commit a0732f9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/widgets/compose_box_test.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,15 +352,16 @@ void main() {
352352
}
353353

354354
group('to ChannelNarrow', () {
355+
final narrow = ChannelNarrow(channel.streamId);
356+
355357
testWidgets('with empty topic', (tester) async {
356-
await prepare(tester, narrow: ChannelNarrow(channel.streamId));
358+
await prepare(tester, narrow: narrow);
357359
checkComposeBoxHintTexts(tester,
358360
topicHintText: 'Topic',
359361
contentHintText: 'Message #${channel.name} > (no topic)');
360362
});
361363

362364
testWidgets('with non-empty topic', (tester) async {
363-
final narrow = ChannelNarrow(channel.streamId);
364365
await prepare(tester, narrow: narrow);
365366
await enterTopic(tester, narrow: narrow, topic: 'new topic');
366367
await tester.pump();

0 commit comments

Comments
 (0)