diff --git a/test/widgets/content_test.dart b/test/widgets/content_test.dart index f871615571..f7941bc6df 100644 --- a/test/widgets/content_test.dart +++ b/test/widgets/content_test.dart @@ -871,7 +871,18 @@ void main() { .single.equals((url: Uri.parse('https://a/'), mode: LaunchMode.inAppBrowserView)); }); - testWidgets('error dialog if invalid link', (tester) async { + testWidgets('error dialog if invalid URL', (tester) async { + await prepare(tester, + '
'); + await tapText(tester, find.text('word')); + await tester.pump(); + check(testBinding.takeLaunchUrlCalls()).isEmpty(); + checkErrorDialog(tester, + expectedTitle: 'Unable to open link', + expectedMessage: 'Link could not be opened: ::invalid::'); + }); + + testWidgets('error dialog if platform cannot open link', (tester) async { await prepare(tester, ''); testBinding.launchUrlResult = false;