File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,26 @@ void main() {
5656 }
5757
5858 group ('markNarrowAsRead' , () {
59+ Future <void > confirmToMarkNarrowAsRead ({required WidgetTester tester,
60+ required BuildContext context, required Narrow narrow
61+ }) async {
62+ final zulipLocalizations = GlobalLocalizations .zulipLocalizations;
63+
64+ final future = tester.runAsync (() => ZulipAction .markNarrowAsRead (context, narrow));
65+
66+ await tester.pump ();
67+ final (confirmButton, _) = checkSuggestedActionDialog (tester,
68+ expectedTitle: zulipLocalizations.markAllAsReadConfirmationDialogTitle,
69+ expectedMessage: zulipLocalizations.markAllAsReadConfirmationDialogMessage,
70+ expectedActionButtonText: zulipLocalizations.markAllAsReadConfirmationDialogAction,
71+ );
72+
73+ await tester.tap (find.byWidget (confirmButton));
74+ await tester.pump ();
75+
76+ await future;
77+ }
78+
5979 testWidgets ('smoke test on modern server' , (tester) async {
6080 final narrow = TopicNarrow .ofMessage (eg.streamMessage ());
6181 await prepare (tester);
You can’t perform that action at this time.
0 commit comments