@@ -75,6 +75,25 @@ void main() {
75
75
check (isUnpinnedHeaderInTree ()).isTrue ();
76
76
});
77
77
78
+ testWidgets ('archived subscriptions are filtered out' , (tester) async {
79
+ await setupStreamListPage (tester, subscriptions: [
80
+ eg.subscription (eg.stream (streamId: 1 , isArchived: true ), pinToTop: true ),
81
+ eg.subscription (eg.stream (streamId: 2 , isArchived: true ), pinToTop: false ),
82
+ eg.subscription (eg.stream (streamId: 3 ), pinToTop: true ),
83
+ eg.subscription (eg.stream (streamId: 4 ), pinToTop: false ),
84
+ ]);
85
+
86
+ check (getItemCount ()).equals (2 );
87
+ check (isPinnedHeaderInTree ()).isTrue ();
88
+ check (isUnpinnedHeaderInTree ()).isTrue ();
89
+
90
+ check (find.text ('stream 1' )).findsNothing ();
91
+ check (find.text ('stream 2' )).findsNothing ();
92
+
93
+ check (find.text ('stream 3' )).findsOne ();
94
+ check (find.text ('stream 4' )).findsOne ();
95
+ });
96
+
78
97
testWidgets ('only pinned subscriptions' , (tester) async {
79
98
await setupStreamListPage (tester, subscriptions: [
80
99
eg.subscription (eg.stream (streamId: 1 ), pinToTop: true ),
0 commit comments