Skip to content

Commit 6409735

Browse files
committed
msglist test: Add helper function to check ActionDialog
1 parent 4570a1d commit 6409735

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/widgets/message_list_test.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,16 @@ void main() {
972972
return finder.evaluate().isNotEmpty;
973973
}
974974

975+
(Widget, Widget) checkConfirmDialog(WidgetTester tester) {
976+
final zulipLocalizations = GlobalLocalizations.zulipLocalizations;
977+
return checkSuggestedActionDialog(tester,
978+
expectedTitle: zulipLocalizations.markAllAsReadConfirmationDialogTitle,
979+
expectedMessage: zulipLocalizations.markAllAsReadConfirmationDialogMessage,
980+
expectDestructiveActionButton: true,
981+
expectedActionButtonText: zulipLocalizations.markAllAsReadConfirmationDialogAction,
982+
);
983+
}
984+
975985
testWidgets('from read to unread', (tester) async {
976986
final message = eg.streamMessage(flags: [MessageFlag.read]);
977987
await setupMessageListPage(tester, messages: [message]);

0 commit comments

Comments
 (0)