Skip to content

Commit b361f70

Browse files
committed
dialog [nfc]: Rename checkNoErrorDialog to checkNoDialog
1 parent b2ce0c0 commit b361f70

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

test/widgets/action_sheet_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ void main() {
495495
await tester.tap(findButtonForLabel('Mark as resolved'));
496496
await tester.pumpAndSettle();
497497

498-
checkNoErrorDialog(tester);
498+
checkNoDialog(tester);
499499
checkRequest(message.id, '✔ zulip');
500500
});
501501

@@ -510,7 +510,7 @@ void main() {
510510
await tester.tap(findButtonForLabel('Mark as resolved'));
511511
await tester.pumpAndSettle();
512512

513-
checkNoErrorDialog(tester);
513+
checkNoDialog(tester);
514514
checkRequest(message.id, '✔ zulip');
515515
});
516516

@@ -523,7 +523,7 @@ void main() {
523523
await tester.tap(findButtonForLabel('Mark as unresolved'));
524524
await tester.pumpAndSettle();
525525

526-
checkNoErrorDialog(tester);
526+
checkNoDialog(tester);
527527
checkRequest(message.id, 'zulip');
528528
});
529529

@@ -536,7 +536,7 @@ void main() {
536536
await tester.tap(findButtonForLabel('Mark as unresolved'));
537537
await tester.pumpAndSettle();
538538

539-
checkNoErrorDialog(tester);
539+
checkNoDialog(tester);
540540
checkRequest(message.id, 'zulip');
541541
});
542542

test/widgets/app_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,14 @@ void main() {
280280
check(ZulipApp.ready).value.isFalse();
281281
await tester.pump();
282282
check(findSnackBarByText(message).evaluate()).isEmpty();
283-
checkNoErrorDialog(tester);
283+
checkNoDialog(tester);
284284

285285
check(ZulipApp.ready).value.isTrue();
286286
// After app startup, reportErrorToUserBriefly displays a SnackBar.
287287
reportErrorToUserBriefly(message, details: details);
288288
await tester.pumpAndSettle();
289289
check(findSnackBarByText(message).evaluate()).single;
290-
checkNoErrorDialog(tester);
290+
checkNoDialog(tester);
291291

292292
// Open the error details dialog.
293293
await tester.tap(find.text('Details'));

test/widgets/compose_box_test.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ void main() {
270270
await prepareWithContent(tester,
271271
makeStringWithCodePoints(kMaxMessageLengthCodePoints));
272272
await tapSendButton(tester);
273-
checkNoErrorDialog(tester);
273+
checkNoDialog(tester);
274274
});
275275

276276
testWidgets('code points not counted unnecessarily', (tester) async {
@@ -307,7 +307,7 @@ void main() {
307307
await prepareWithTopic(tester,
308308
makeStringWithCodePoints(kMaxTopicLengthCodePoints));
309309
await tapSendButton(tester);
310-
checkNoErrorDialog(tester);
310+
checkNoDialog(tester);
311311
});
312312

313313
testWidgets('code points not counted unnecessarily', (tester) async {
@@ -548,7 +548,7 @@ void main() {
548548
await setupAndTapSend(tester, prepareResponse: (int messageId) {
549549
connection.prepare(json: SendMessageResult(id: messageId).toJson());
550550
});
551-
checkNoErrorDialog(tester);
551+
checkNoDialog(tester);
552552
});
553553

554554
testWidgets('ZulipApiException', (tester) async {
@@ -671,7 +671,7 @@ void main() {
671671
check(call.allowMultiple).equals(true);
672672
check(call.type).equals(FileType.media);
673673

674-
checkNoErrorDialog(tester);
674+
checkNoDialog(tester);
675675

676676
check(controller!.content.text)
677677
.equals('see image: [Uploading image.jpg…]()\n\n');
@@ -730,7 +730,7 @@ void main() {
730730
check(call.source).equals(ImageSource.camera);
731731
check(call.requestFullMetadata).equals(false);
732732

733-
checkNoErrorDialog(tester);
733+
checkNoDialog(tester);
734734

735735
check(controller!.content.text)
736736
.equals('see image: [Uploading image.jpg…]()\n\n');

test/widgets/dialog_checks.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ Widget checkErrorDialog(WidgetTester tester, {
4848
}
4949
}
5050

51-
/// Checks that there is no error dialog.
51+
/// Checks that there is no dialog.
5252
/// Fails if one is found.
53-
void checkNoErrorDialog(WidgetTester tester) {
53+
void checkNoDialog(WidgetTester tester) {
5454
switch (defaultTargetPlatform) {
5555
case TargetPlatform.android:
5656
case TargetPlatform.fuchsia:
5757
case TargetPlatform.linux:
5858
case TargetPlatform.windows:
59-
check(find.bySubtype<AlertDialog>()).findsNothing();
59+
check(find.byType(Dialog)).findsNothing();
6060
case TargetPlatform.iOS:
6161
case TargetPlatform.macOS:
6262
check(find.byType(CupertinoAlertDialog)).findsNothing();

0 commit comments

Comments
 (0)