|
|
@ -10,8 +10,7 @@ import 'package:flutter_test/flutter_test.dart';
|
|
|
|
import 'utils.dart';
|
|
|
|
import 'utils.dart';
|
|
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
void main() {
|
|
|
|
testWidgets(
|
|
|
|
testWidgets('Selecting the email address shows a custom button',
|
|
|
|
'Selecting the email address shows a custom button',
|
|
|
|
|
|
|
|
(tester) async {
|
|
|
|
(tester) async {
|
|
|
|
await tester.pumpWidget(const MyApp());
|
|
|
|
await tester.pumpWidget(const MyApp());
|
|
|
|
|
|
|
|
|
|
|
@ -19,8 +18,9 @@ void main() {
|
|
|
|
await tester.dragUntilVisible(
|
|
|
|
await tester.dragUntilVisible(
|
|
|
|
find.text(EmailButtonPage.title),
|
|
|
|
find.text(EmailButtonPage.title),
|
|
|
|
find.byType(ListView),
|
|
|
|
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.tap(find.text(EmailButtonPage.title));
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
|
|
|
|
|
|
|
@ -49,8 +49,8 @@ void main() {
|
|
|
|
expect(find.text('Send email'), findsNothing);
|
|
|
|
expect(find.text('Send email'), findsNothing);
|
|
|
|
switch (defaultTargetPlatform) {
|
|
|
|
switch (defaultTargetPlatform) {
|
|
|
|
case TargetPlatform.iOS:
|
|
|
|
case TargetPlatform.iOS:
|
|
|
|
expect(find.byType(CupertinoTextSelectionToolbarButton),
|
|
|
|
expect(
|
|
|
|
findsNWidgets(2));
|
|
|
|
find.byType(CupertinoTextSelectionToolbarButton), findsNWidgets(2));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case TargetPlatform.macOS:
|
|
|
|
case TargetPlatform.macOS:
|
|
|
|
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
|
|
|
|
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
|
|
|
@ -97,8 +97,8 @@ void main() {
|
|
|
|
expect(find.text('Send email'), findsOneWidget);
|
|
|
|
expect(find.text('Send email'), findsOneWidget);
|
|
|
|
switch (defaultTargetPlatform) {
|
|
|
|
switch (defaultTargetPlatform) {
|
|
|
|
case TargetPlatform.iOS:
|
|
|
|
case TargetPlatform.iOS:
|
|
|
|
expect(find.byType(CupertinoTextSelectionToolbarButton),
|
|
|
|
expect(
|
|
|
|
findsNWidgets(3));
|
|
|
|
find.byType(CupertinoTextSelectionToolbarButton), findsNWidgets(3));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case TargetPlatform.macOS:
|
|
|
|
case TargetPlatform.macOS:
|
|
|
|
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
|
|
|
|
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
|
|
|
@ -114,7 +114,5 @@ void main() {
|
|
|
|
find.byType(DesktopTextSelectionToolbarButton), findsNWidgets(4));
|
|
|
|
find.byType(DesktopTextSelectionToolbarButton), findsNWidgets(4));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|
|
|
|
skip: true, // TODO(justinmc): Make this test pass and re-enable.
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|