mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Fix and reenable context_menus email button test (#1585)
This commit is contained in:
@@ -10,8 +10,7 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'utils.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets(
|
||||
'Selecting the email address shows a custom button',
|
||||
testWidgets('Selecting the email address shows a custom button',
|
||||
(tester) async {
|
||||
await tester.pumpWidget(const MyApp());
|
||||
|
||||
@@ -19,8 +18,9 @@ void main() {
|
||||
await tester.dragUntilVisible(
|
||||
find.text(EmailButtonPage.title),
|
||||
find.byType(ListView),
|
||||
const Offset(0.0, -200.0),
|
||||
const Offset(0.0, -100.0),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text(EmailButtonPage.title));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
@@ -49,8 +49,8 @@ void main() {
|
||||
expect(find.text('Send email'), findsNothing);
|
||||
switch (defaultTargetPlatform) {
|
||||
case TargetPlatform.iOS:
|
||||
expect(find.byType(CupertinoTextSelectionToolbarButton),
|
||||
findsNWidgets(2));
|
||||
expect(
|
||||
find.byType(CupertinoTextSelectionToolbarButton), findsNWidgets(2));
|
||||
break;
|
||||
case TargetPlatform.macOS:
|
||||
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
|
||||
@@ -97,8 +97,8 @@ void main() {
|
||||
expect(find.text('Send email'), findsOneWidget);
|
||||
switch (defaultTargetPlatform) {
|
||||
case TargetPlatform.iOS:
|
||||
expect(find.byType(CupertinoTextSelectionToolbarButton),
|
||||
findsNWidgets(3));
|
||||
expect(
|
||||
find.byType(CupertinoTextSelectionToolbarButton), findsNWidgets(3));
|
||||
break;
|
||||
case TargetPlatform.macOS:
|
||||
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
|
||||
@@ -114,7 +114,5 @@ void main() {
|
||||
find.byType(DesktopTextSelectionToolbarButton), findsNWidgets(4));
|
||||
break;
|
||||
}
|
||||
},
|
||||
skip: true, // TODO(justinmc): Make this test pass and re-enable.
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user