Skip to content

Commit 8892fd1

Browse files
author
nsamuelreddy
committed
all_channels: Show archive icon for archived channels
Fixes: #1992
1 parent d9f614e commit 8892fd1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/widgets/all_channels_test.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,4 +309,19 @@ void main() {
309309
'subscriptions': jsonEncode([channel.name]),
310310
});
311311
});
312+
313+
testWidgets('shows archive icon for archived channels', (tester) async {
314+
final archivedChannel = eg.stream(isArchived: true);
315+
final activeChannel = eg.stream(isArchived: false);
316+
await setupAllChannelsPage(tester, channels: [archivedChannel, activeChannel]);
317+
await tester.pump();
318+
319+
final archivedIcon = tester.widgetList<Icon>(find.byType(Icon))
320+
.firstWhere((icon) => icon.icon == ZulipIcons.archive);
321+
check(archivedIcon).isNotNull();
322+
323+
final activeIcons = tester.widgetList<Icon>(find.byType(Icon))
324+
.where((icon) => icon.icon != ZulipIcons.archive);
325+
check(activeIcons).isNotEmpty();
326+
});
312327
}

0 commit comments

Comments
 (0)