Unverified Commit 5bdc698b authored by Darren Austin's avatar Darren Austin Committed by GitHub

Updated skipped tests for material directory. (#87328)

parent b375059e
...@@ -94,7 +94,7 @@ void main() { ...@@ -94,7 +94,7 @@ void main() {
await tester.tap(find.text('Pirate package ')); await tester.tap(find.text('Pirate package '));
await tester.pumpAndSettle(const Duration(milliseconds: 100)); await tester.pumpAndSettle(const Duration(milliseconds: 100));
expect(find.text('Pirate license'), findsOneWidget); expect(find.text('Pirate license'), findsOneWidget);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/54385 });
testWidgets('About box logic defaults to executable name for app name', (WidgetTester tester) async { testWidgets('About box logic defaults to executable name for app name', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
...@@ -155,7 +155,7 @@ void main() { ...@@ -155,7 +155,7 @@ void main() {
await tester.tap(find.text('Another package')); await tester.tap(find.text('Another package'));
await tester.pumpAndSettle(const Duration(milliseconds: 100)); await tester.pumpAndSettle(const Duration(milliseconds: 100));
expect(find.text('Another license'), findsOneWidget); expect(find.text('Another license'), findsOneWidget);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/54385 });
testWidgets('LicensePage control test with all properties', (WidgetTester tester) async { testWidgets('LicensePage control test with all properties', (WidgetTester tester) async {
const FlutterLogo logo = FlutterLogo(); const FlutterLogo logo = FlutterLogo();
...@@ -231,7 +231,7 @@ void main() { ...@@ -231,7 +231,7 @@ void main() {
await tester.tap(find.text('Another package')); await tester.tap(find.text('Another package'));
await tester.pumpAndSettle(const Duration(milliseconds: 100)); await tester.pumpAndSettle(const Duration(milliseconds: 100));
expect(find.text('Another license'), findsOneWidget); expect(find.text('Another license'), findsOneWidget);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/54385 });
testWidgets('_PackageLicensePage title style without AppBarTheme', (WidgetTester tester) async { testWidgets('_PackageLicensePage title style without AppBarTheme', (WidgetTester tester) async {
LicenseRegistry.addLicense(() { LicenseRegistry.addLicense(() {
...@@ -278,7 +278,7 @@ void main() { ...@@ -278,7 +278,7 @@ void main() {
expect(title.style, titleTextStyle); expect(title.style, titleTextStyle);
final Text subtitle = tester.widget(find.text('1 license.')); final Text subtitle = tester.widget(find.text('1 license.'));
expect(subtitle.style, subtitleTextStyle); expect(subtitle.style, subtitleTextStyle);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/54385 });
testWidgets('_PackageLicensePage title style with AppBarTheme', (WidgetTester tester) async { testWidgets('_PackageLicensePage title style with AppBarTheme', (WidgetTester tester) async {
LicenseRegistry.addLicense(() { LicenseRegistry.addLicense(() {
...@@ -336,7 +336,7 @@ void main() { ...@@ -336,7 +336,7 @@ void main() {
expect(title.style, titleTextStyle); expect(title.style, titleTextStyle);
final Text subtitle = tester.widget(find.text('1 license.')); final Text subtitle = tester.widget(find.text('1 license.'));
expect(subtitle.style, subtitleTextStyle); expect(subtitle.style, subtitleTextStyle);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/54385 });
testWidgets('LicensePage respects the notch', (WidgetTester tester) async { testWidgets('LicensePage respects the notch', (WidgetTester tester) async {
const double safeareaPadding = 27.0; const double safeareaPadding = 27.0;
...@@ -366,7 +366,7 @@ void main() { ...@@ -366,7 +366,7 @@ void main() {
tester.getTopLeft(find.text('Licenses')), tester.getTopLeft(find.text('Licenses')),
const Offset(16.0 + safeareaPadding, 18.0 + safeareaPadding), const Offset(16.0 + safeareaPadding, 18.0 + safeareaPadding),
); );
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/54385 });
testWidgets('LicensePage returns early if unmounted', (WidgetTester tester) async { testWidgets('LicensePage returns early if unmounted', (WidgetTester tester) async {
final Completer<LicenseEntry> licenseCompleter = Completer<LicenseEntry>(); final Completer<LicenseEntry> licenseCompleter = Completer<LicenseEntry>();
......
...@@ -516,7 +516,7 @@ void main() { ...@@ -516,7 +516,7 @@ void main() {
// to "4", which results in the web evaluating to the value "4" regardless of which // to "4", which results in the web evaluating to the value "4" regardless of which
// one is used. This results in a difference for doubles in debugFillProperties between // one is used. This results in a difference for doubles in debugFillProperties between
// the web and the rest of Flutter's target platforms. // the web and the rest of Flutter's target platforms.
}, skip: kIsWeb); }, skip: kIsWeb); // https://github.com/flutter/flutter/issues/87364
} }
AppBarTheme _appBarTheme() { AppBarTheme _appBarTheme() {
......
...@@ -79,8 +79,7 @@ void main() { ...@@ -79,8 +79,7 @@ void main() {
find.byKey(key), find.byKey(key),
matchesGoldenFile('bottom_app_bar.custom_shape.2.png'), matchesGoldenFile('bottom_app_bar.custom_shape.2.png'),
); );
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/51675, }, skip: isBrowser); // https://github.com/flutter/flutter/issues/44572
// https://github.com/flutter/flutter/issues/44572
testWidgets('color defaults to Theme.bottomAppBarColor', (WidgetTester tester) async { testWidgets('color defaults to Theme.bottomAppBarColor', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
......
...@@ -66,7 +66,10 @@ void main() { ...@@ -66,7 +66,10 @@ void main() {
expect(find.text('Page 1'), isOnstage); expect(find.text('Page 1'), isOnstage);
expect(find.text('Page 2'), findsNothing); expect(find.text('Page 2'), findsNothing);
}, variant: TargetPlatformVariant.only(TargetPlatform.android), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.android),
skip: kIsWeb, // [intended] no default transitions on the web.
);
testWidgets('test page transition', (WidgetTester tester) async { testWidgets('test page transition', (WidgetTester tester) async {
final Key page2Key = UniqueKey(); final Key page2Key = UniqueKey();
...@@ -147,7 +150,10 @@ void main() { ...@@ -147,7 +150,10 @@ void main() {
// Page 1 is back where it started. // Page 1 is back where it started.
expect(widget1InitialTopLeft == widget1TransientTopLeft, true); expect(widget1InitialTopLeft == widget1TransientTopLeft, true);
}, variant: TargetPlatformVariant.only(TargetPlatform.iOS), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.iOS),
skip: kIsWeb, // [intended] no default transitions on the web.
);
testWidgets('test fullscreen dialog transition', (WidgetTester tester) async { testWidgets('test fullscreen dialog transition', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
...@@ -207,7 +213,10 @@ void main() { ...@@ -207,7 +213,10 @@ void main() {
// Page 1 is back where it started. // Page 1 is back where it started.
expect(widget1InitialTopLeft == widget1TransientTopLeft, true); expect(widget1InitialTopLeft == widget1TransientTopLeft, true);
}, variant: TargetPlatformVariant.only(TargetPlatform.iOS), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.iOS),
skip: kIsWeb, // [intended] no default transitions on the web.
);
testWidgets('test no back gesture on Android', (WidgetTester tester) async { testWidgets('test no back gesture on Android', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
...@@ -237,7 +246,10 @@ void main() { ...@@ -237,7 +246,10 @@ void main() {
// Page 2 didn't move // Page 2 didn't move
expect(tester.getTopLeft(find.text('Page 2')), Offset.zero); expect(tester.getTopLeft(find.text('Page 2')), Offset.zero);
}, variant: TargetPlatformVariant.only(TargetPlatform.android), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.android),
skip: kIsWeb, // [intended] no default transitions on the web.
);
testWidgets('test back gesture', (WidgetTester tester) async { testWidgets('test back gesture', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
...@@ -278,7 +290,10 @@ void main() { ...@@ -278,7 +290,10 @@ void main() {
await tester.pump(); await tester.pump();
expect(tester.getTopLeft(find.text('Page 2')), const Offset(100.0, 0.0)); expect(tester.getTopLeft(find.text('Page 2')), const Offset(100.0, 0.0));
}, variant: TargetPlatformVariant.only(TargetPlatform.iOS), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.iOS),
skip: kIsWeb, // [intended] no default transitions on the web.
);
testWidgets('back gesture while OS changes', (WidgetTester tester) async { testWidgets('back gesture while OS changes', (WidgetTester tester) async {
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
...@@ -369,7 +384,7 @@ void main() { ...@@ -369,7 +384,7 @@ void main() {
final Offset helloPosition6 = tester.getCenter(find.text('HELLO')); final Offset helloPosition6 = tester.getCenter(find.text('HELLO'));
expect(helloPosition5, helloPosition6); expect(helloPosition5, helloPosition6);
expect(Theme.of(tester.element(find.text('HELLO'))).platform, TargetPlatform.macOS); expect(Theme.of(tester.element(find.text('HELLO'))).platform, TargetPlatform.macOS);
}, skip: kIsWeb); }, skip: kIsWeb); // [intended] doesn't apply to the web.
testWidgets('test no back gesture on fullscreen dialogs', (WidgetTester tester) async { testWidgets('test no back gesture on fullscreen dialogs', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
...@@ -480,7 +495,10 @@ void main() { ...@@ -480,7 +495,10 @@ void main() {
// Page 1 is back where it started. // Page 1 is back where it started.
expect(widget1InitialTopLeft == widget1TransientTopLeft, true); expect(widget1InitialTopLeft == widget1TransientTopLeft, true);
}, variant: TargetPlatformVariant.only(TargetPlatform.iOS), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.iOS),
skip: kIsWeb, // [intended] no default transitions on the web.
);
testWidgets('test edge swipe then drop back at starting point works', (WidgetTester tester) async { testWidgets('test edge swipe then drop back at starting point works', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
...@@ -548,7 +566,10 @@ void main() { ...@@ -548,7 +566,10 @@ void main() {
expect(find.text('Page 1'), isOnstage); expect(find.text('Page 1'), isOnstage);
expect(find.text('Page 2'), findsNothing); expect(find.text('Page 2'), findsNothing);
}, variant: TargetPlatformVariant.only(TargetPlatform.iOS), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.iOS),
skip: kIsWeb, // [intended] no default transitions on the web.
);
testWidgets('Back swipe dismiss interrupted by route push', (WidgetTester tester) async { testWidgets('Back swipe dismiss interrupted by route push', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/28728 // Regression test for https://github.com/flutter/flutter/issues/28728
...@@ -643,7 +664,10 @@ void main() { ...@@ -643,7 +664,10 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(find.text('route'), findsOneWidget); expect(find.text('route'), findsOneWidget);
expect(find.text('push'), findsNothing); expect(find.text('push'), findsNothing);
}, variant: TargetPlatformVariant.only(TargetPlatform.iOS), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.iOS),
skip: kIsWeb, // [intended] no default transitions on the web.
);
testWidgets('During back swipe the route ignores input', (WidgetTester tester) async { testWidgets('During back swipe the route ignores input', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/39989 // Regression test for https://github.com/flutter/flutter/issues/39989
...@@ -713,7 +737,10 @@ void main() { ...@@ -713,7 +737,10 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(tester.getTopLeft(find.byKey(pageScaffoldKey)), const Offset(400, 0)); expect(tester.getTopLeft(find.byKey(pageScaffoldKey)), const Offset(400, 0));
expect(tester.getTopLeft(find.byKey(homeScaffoldKey)).dx, lessThan(0)); expect(tester.getTopLeft(find.byKey(homeScaffoldKey)).dx, lessThan(0));
}, variant: TargetPlatformVariant.only(TargetPlatform.iOS), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.iOS),
skip: kIsWeb, // [intended] no default transitions on the web.
);
testWidgets('After a pop caused by a back-swipe, input reaches the exposed route', (WidgetTester tester) async { testWidgets('After a pop caused by a back-swipe, input reaches the exposed route', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/41024 // Regression test for https://github.com/flutter/flutter/issues/41024
...@@ -784,7 +811,10 @@ void main() { ...@@ -784,7 +811,10 @@ void main() {
await tester.tap(find.byKey(homeScaffoldKey)); await tester.tap(find.byKey(homeScaffoldKey));
expect(homeTapCount, 2); expect(homeTapCount, 2);
expect(pageTapCount, 1); expect(pageTapCount, 1);
}, variant: TargetPlatformVariant.only(TargetPlatform.iOS), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.iOS),
skip: kIsWeb, // [intended] no default transitions on the web.
);
testWidgets('A MaterialPageRoute should slide out with CupertinoPageTransition when a compatible PageRoute is pushed on top of it', (WidgetTester tester) async { testWidgets('A MaterialPageRoute should slide out with CupertinoPageTransition when a compatible PageRoute is pushed on top of it', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/44864. // Regression test for https://github.com/flutter/flutter/issues/44864.
...@@ -812,7 +842,10 @@ void main() { ...@@ -812,7 +842,10 @@ void main() {
// Title of the first route slides to the left. // Title of the first route slides to the left.
expect(titleInitialTopLeft.dy, equals(titleTransientTopLeft.dy)); expect(titleInitialTopLeft.dy, equals(titleTransientTopLeft.dy));
expect(titleInitialTopLeft.dx, greaterThan(titleTransientTopLeft.dx)); expect(titleInitialTopLeft.dx, greaterThan(titleTransientTopLeft.dx));
}, variant: TargetPlatformVariant.only(TargetPlatform.iOS), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.iOS),
skip: kIsWeb, // [intended] no default transitions on the web.
);
testWidgets('MaterialPage works', (WidgetTester tester) async { testWidgets('MaterialPage works', (WidgetTester tester) async {
final LocalKey pageKey = UniqueKey(); final LocalKey pageKey = UniqueKey();
......
...@@ -61,7 +61,10 @@ void main() { ...@@ -61,7 +61,10 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(find.text('page b'), findsOneWidget); expect(find.text('page b'), findsOneWidget);
expect(find.byType(CupertinoPageTransition), findsOneWidget); expect(find.byType(CupertinoPageTransition), findsOneWidget);
}, variant: TargetPlatformVariant.only(TargetPlatform.iOS), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.iOS),
skip: kIsWeb, // [intended] no default transitions on the web.
);
testWidgets('Default PageTransitionsTheme builds a _FadeUpwardsPageTransition for android', (WidgetTester tester) async { testWidgets('Default PageTransitionsTheme builds a _FadeUpwardsPageTransition for android', (WidgetTester tester) async {
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
...@@ -94,7 +97,10 @@ void main() { ...@@ -94,7 +97,10 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(find.text('page b'), findsOneWidget); expect(find.text('page b'), findsOneWidget);
expect(findFadeUpwardsPageTransition(), findsOneWidget); expect(findFadeUpwardsPageTransition(), findsOneWidget);
}, variant: TargetPlatformVariant.only(TargetPlatform.android), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.android),
skip: kIsWeb, // [intended] no default transitions on the web.
);
testWidgets('PageTransitionsTheme override builds a _OpenUpwardsPageTransition', (WidgetTester tester) async { testWidgets('PageTransitionsTheme override builds a _OpenUpwardsPageTransition', (WidgetTester tester) async {
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
...@@ -134,7 +140,10 @@ void main() { ...@@ -134,7 +140,10 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(find.text('page b'), findsOneWidget); expect(find.text('page b'), findsOneWidget);
expect(findOpenUpwardsPageTransition(), findsOneWidget); expect(findOpenUpwardsPageTransition(), findsOneWidget);
}, variant: TargetPlatformVariant.only(TargetPlatform.android), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.android),
skip: kIsWeb, // [intended] no default transitions on the web.
);
testWidgets('PageTransitionsTheme override builds a _ZoomPageTransition', (WidgetTester tester) async { testWidgets('PageTransitionsTheme override builds a _ZoomPageTransition', (WidgetTester tester) async {
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
...@@ -174,7 +183,10 @@ void main() { ...@@ -174,7 +183,10 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(find.text('page b'), findsOneWidget); expect(find.text('page b'), findsOneWidget);
expect(findZoomPageTransition(), findsOneWidget); expect(findZoomPageTransition(), findsOneWidget);
}, variant: TargetPlatformVariant.only(TargetPlatform.android), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.android),
skip: kIsWeb, // [intended] no default transitions on the web.
);
testWidgets('_ZoomPageTransition only cause child widget built once', (WidgetTester tester) async { testWidgets('_ZoomPageTransition only cause child widget built once', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/58345 // Regression test for https://github.com/flutter/flutter/issues/58345
...@@ -220,5 +232,8 @@ void main() { ...@@ -220,5 +232,8 @@ void main() {
await tester.tap(find.text('pop')); await tester.tap(find.text('pop'));
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(builtCount, 1); expect(builtCount, 1);
}, variant: TargetPlatformVariant.only(TargetPlatform.android), skip: kIsWeb); },
variant: TargetPlatformVariant.only(TargetPlatform.android),
skip: kIsWeb, // [intended] no default transitions on the web.
);
} }
...@@ -782,7 +782,7 @@ void main() { ...@@ -782,7 +782,7 @@ void main() {
await animationSheet.collate(20), await animationSheet.collate(20),
matchesGoldenFile('material.circular_progress_indicator.indeterminate.png'), matchesGoldenFile('material.circular_progress_indicator.indeterminate.png'),
); );
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/42767 }, skip: isBrowser); // https://github.com/flutter/flutter/issues/56001
testWidgets( testWidgets(
'Adaptive CircularProgressIndicator displays CupertinoActivityIndicator in iOS', 'Adaptive CircularProgressIndicator displays CupertinoActivityIndicator in iOS',
......
...@@ -624,7 +624,7 @@ void main() { ...@@ -624,7 +624,7 @@ void main() {
// to "4", which results in the web evaluating to the value "4" regardless of which // to "4", which results in the web evaluating to the value "4" regardless of which
// one is used. This results in a difference for doubles in debugFillProperties between // one is used. This results in a difference for doubles in debugFillProperties between
// the web and the rest of Flutter's target platforms. // the web and the rest of Flutter's target platforms.
}, skip: kIsWeb); }, skip: kIsWeb); // [intended]
} }
class NoScrollbarBehavior extends ScrollBehavior { class NoScrollbarBehavior extends ScrollBehavior {
......
...@@ -294,7 +294,10 @@ void main() { ...@@ -294,7 +294,10 @@ void main() {
expect(controller.text, ' blah2blah1'); expect(controller.text, ' blah2blah1');
expect(controller.selection, const TextSelection(baseOffset: 0, extentOffset: 0)); expect(controller.selection, const TextSelection(baseOffset: 0, extentOffset: 0));
expect(find.byType(CupertinoButton), findsNothing); expect(find.byType(CupertinoButton), findsNothing);
}, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.macOS, TargetPlatform.windows, TargetPlatform.linux }), skip: isContextMenuProvidedByPlatform); },
variant: TargetPlatformVariant.desktop(),
skip: isContextMenuProvidedByPlatform, // [intended] only applies to platforms where we supply the context menu.
);
testWidgets('Activates the text field when receives semantics focus on Mac', (WidgetTester tester) async { testWidgets('Activates the text field when receives semantics focus on Mac', (WidgetTester tester) async {
final SemanticsTester semantics = SemanticsTester(tester); final SemanticsTester semantics = SemanticsTester(tester);
...@@ -653,7 +656,7 @@ void main() { ...@@ -653,7 +656,7 @@ void main() {
selection: TextSelection.collapsed(offset: 2), selection: TextSelection.collapsed(offset: 2),
), ),
); );
}, skip: areKeyEventsHandledByPlatform); }, skip: areKeyEventsHandledByPlatform); // [intended] only applies to platforms where we handle key events.
testWidgets('text field selection toolbar renders correctly inside opacity', (WidgetTester tester) async { testWidgets('text field selection toolbar renders correctly inside opacity', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
...@@ -704,7 +707,7 @@ void main() { ...@@ -704,7 +707,7 @@ void main() {
find.byType(Overlay), find.byType(Overlay),
matchesGoldenFile('text_field_opacity_test.0.png'), matchesGoldenFile('text_field_opacity_test.0.png'),
); );
}, skip: isContextMenuProvidedByPlatform); }, skip: isContextMenuProvidedByPlatform); // [intended] only applies to platforms where we supply the context menu.
testWidgets('text field toolbar options correctly changes options', testWidgets('text field toolbar options correctly changes options',
(WidgetTester tester) async { (WidgetTester tester) async {
...@@ -754,7 +757,7 @@ void main() { ...@@ -754,7 +757,7 @@ void main() {
expect(find.text('Select All'), findsNothing); expect(find.text('Select All'), findsNothing);
}, },
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS, TargetPlatform.macOS }), variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS, TargetPlatform.macOS }),
skip: isContextMenuProvidedByPlatform, skip: isContextMenuProvidedByPlatform, // [intended] only applies to platforms where we supply the context menu.
); );
testWidgets('text selection style 1', (WidgetTester tester) async { testWidgets('text selection style 1', (WidgetTester tester) async {
...@@ -907,7 +910,7 @@ void main() { ...@@ -907,7 +910,7 @@ void main() {
TargetPlatform.linux, TargetPlatform.linux,
TargetPlatform.windows, TargetPlatform.windows,
}), }),
skip: isContextMenuProvidedByPlatform, skip: isContextMenuProvidedByPlatform, // [intended] only applies to platforms where we supply the context menu.
); );
testWidgets('cursor layout has correct width', (WidgetTester tester) async { testWidgets('cursor layout has correct width', (WidgetTester tester) async {
...@@ -1291,7 +1294,7 @@ void main() { ...@@ -1291,7 +1294,7 @@ void main() {
await tester.longPressAt(emptyPos, pointer: 7); await tester.longPressAt(emptyPos, pointer: 7);
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(find.text('Paste'), findsOneWidget); expect(find.text('Paste'), findsOneWidget);
}, skip: isContextMenuProvidedByPlatform); }, skip: isContextMenuProvidedByPlatform); // [intended] only applies to platforms where we supply the context menu.
testWidgets('Entering text hides selection handle caret', (WidgetTester tester) async { testWidgets('Entering text hides selection handle caret', (WidgetTester tester) async {
final TextEditingController controller = TextEditingController(); final TextEditingController controller = TextEditingController();
...@@ -2017,7 +2020,10 @@ void main() { ...@@ -2017,7 +2020,10 @@ void main() {
expect(controller.selection.baseOffset, 7); expect(controller.selection.baseOffset, 7);
expect(controller.value.composing.start, 4); expect(controller.value.composing.start, 4);
expect(controller.value.composing.end, 7); expect(controller.value.composing.end, 7);
}, skip: kIsWeb, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android, TargetPlatform.iOS })); },
skip: kIsWeb, // [intended] text selection is handled by the browser
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android, TargetPlatform.iOS })
);
testWidgets('Can use selection toolbar', (WidgetTester tester) async { testWidgets('Can use selection toolbar', (WidgetTester tester) async {
final TextEditingController controller = TextEditingController(); final TextEditingController controller = TextEditingController();
...@@ -2085,7 +2091,7 @@ void main() { ...@@ -2085,7 +2091,7 @@ void main() {
await tester.tap(find.text('Paste')); await tester.tap(find.text('Paste'));
await tester.pump(); await tester.pump();
expect(controller.text, 'abc d${testValue}ef ghi'); expect(controller.text, 'abc d${testValue}ef ghi');
}, skip: isContextMenuProvidedByPlatform); }, skip: isContextMenuProvidedByPlatform); // [intended] only applies to platforms where we supply the context menu.
// Show the selection menu at the given index into the text by tapping to // Show the selection menu at the given index into the text by tapping to
// place the cursor and then tapping on the handle. // place the cursor and then tapping on the handle.
...@@ -2164,7 +2170,7 @@ void main() { ...@@ -2164,7 +2170,7 @@ void main() {
textFieldTopLeft = tester.getTopLeft(find.byType(TextField)); textFieldTopLeft = tester.getTopLeft(find.byType(TextField));
expect(toolbarTopLeft.dy, lessThan(textFieldTopLeft.dy)); expect(toolbarTopLeft.dy, lessThan(textFieldTopLeft.dy));
}, },
skip: isContextMenuProvidedByPlatform, skip: isContextMenuProvidedByPlatform, // [intended] only applies to platforms where we supply the context menu.
); );
testWidgets( testWidgets(
...@@ -2235,7 +2241,7 @@ void main() { ...@@ -2235,7 +2241,7 @@ void main() {
textFieldTopLeft = tester.getTopLeft(find.byType(TextField)); textFieldTopLeft = tester.getTopLeft(find.byType(TextField));
expect(toolbarTopLeft.dy, lessThan(textFieldTopLeft.dy)); expect(toolbarTopLeft.dy, lessThan(textFieldTopLeft.dy));
}, },
skip: isContextMenuProvidedByPlatform, skip: isContextMenuProvidedByPlatform, // [intended] only applies to platforms where we supply the context menu.
); );
testWidgets( testWidgets(
...@@ -2291,7 +2297,7 @@ void main() { ...@@ -2291,7 +2297,7 @@ void main() {
expect(lastLineToolbarTopLeft.dy, lessThan(lastLineTopLeft.dy)); expect(lastLineToolbarTopLeft.dy, lessThan(lastLineTopLeft.dy));
expect(lastLineToolbarTopLeft.dy, greaterThan(penultimateLineToolbarTopLeft.dy)); expect(lastLineToolbarTopLeft.dy, greaterThan(penultimateLineToolbarTopLeft.dy));
}, },
skip: isContextMenuProvidedByPlatform, skip: isContextMenuProvidedByPlatform, // [intended] only applies to platforms where we supply the context menu.
); );
testWidgets('Selection toolbar fades in', (WidgetTester tester) async { testWidgets('Selection toolbar fades in', (WidgetTester tester) async {
...@@ -2337,7 +2343,7 @@ void main() { ...@@ -2337,7 +2343,7 @@ void main() {
expect(opacity.opacity.value, lessThan(1.0)); expect(opacity.opacity.value, lessThan(1.0));
// End the test here to ensure the animation is properly disposed of. // End the test here to ensure the animation is properly disposed of.
}, skip: isContextMenuProvidedByPlatform); }, skip: isContextMenuProvidedByPlatform); // [intended] only applies to platforms where we supply the context menu.
testWidgets('An obscured TextField is selectable by default', (WidgetTester tester) async { testWidgets('An obscured TextField is selectable by default', (WidgetTester tester) async {
// This is a regression test for // This is a regression test for
...@@ -2450,7 +2456,7 @@ void main() { ...@@ -2450,7 +2456,7 @@ void main() {
expect(find.text('Select all'), findsOneWidget); expect(find.text('Select all'), findsOneWidget);
expect(find.text('Copy'), findsNothing); expect(find.text('Copy'), findsNothing);
expect(find.text('Cut'), findsNothing); expect(find.text('Cut'), findsNothing);
}, skip: isContextMenuProvidedByPlatform); }, skip: isContextMenuProvidedByPlatform); // [intended] only applies to platforms where we supply the context menu.
testWidgets('TextField height with minLines unset', (WidgetTester tester) async { testWidgets('TextField height with minLines unset', (WidgetTester tester) async {
await tester.pumpWidget(textFieldBuilder()); await tester.pumpWidget(textFieldBuilder());
...@@ -3780,7 +3786,7 @@ void main() { ...@@ -3780,7 +3786,7 @@ void main() {
await tester.pump(); await tester.pump();
// Puts 456 before the 2 in 123. // Puts 456 before the 2 in 123.
expect(textController.text, '145623'); expect(textController.text, '145623');
}, skip: isContextMenuProvidedByPlatform); }, skip: isContextMenuProvidedByPlatform); // [intended] only applies to platforms where we supply the context menu.
testWidgets('Pasted values are formatted (deprecated names)', (WidgetTester tester) async { testWidgets('Pasted values are formatted (deprecated names)', (WidgetTester tester) async {
final TextEditingController textController = TextEditingController(); final TextEditingController textController = TextEditingController();
...@@ -3818,7 +3824,7 @@ void main() { ...@@ -3818,7 +3824,7 @@ void main() {
await tester.pump(); await tester.pump();
// Puts 456 before the 2 in 123. // Puts 456 before the 2 in 123.
expect(textController.text, '145623'); expect(textController.text, '145623');
}, skip: isContextMenuProvidedByPlatform); }, skip: isContextMenuProvidedByPlatform); // [intended] only applies to platforms where we supply the context menu.
testWidgets('Do not add LengthLimiting formatter to the user supplied list', (WidgetTester tester) async { testWidgets('Do not add LengthLimiting formatter to the user supplied list', (WidgetTester tester) async {
final List<TextInputFormatter> formatters = <TextInputFormatter>[]; final List<TextInputFormatter> formatters = <TextInputFormatter>[];
...@@ -4870,7 +4876,7 @@ void main() { ...@@ -4870,7 +4876,7 @@ void main() {
await tester.sendKeyDownEvent(LogicalKeyboardKey.arrowLeft); await tester.sendKeyDownEvent(LogicalKeyboardKey.arrowLeft);
expect(controller.selection.extentOffset - controller.selection.baseOffset, -1); expect(controller.selection.extentOffset - controller.selection.baseOffset, -1);
}, variant: KeySimulatorTransitModeVariant.all()); }, variant: KeySimulatorTransitModeVariant.all());
}, skip: areKeyEventsHandledByPlatform); }, skip: areKeyEventsHandledByPlatform); // [intended] only applies to platforms where we handle key events.
testWidgets('Copy paste test', (WidgetTester tester) async { testWidgets('Copy paste test', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(); final FocusNode focusNode = FocusNode();
...@@ -4944,7 +4950,10 @@ void main() { ...@@ -4944,7 +4950,10 @@ void main() {
const String expected = 'a biga big house\njumped over a mouse'; const String expected = 'a biga big house\njumped over a mouse';
expect(find.text(expected), findsOneWidget, reason: 'Because text contains ${controller.text}'); expect(find.text(expected), findsOneWidget, reason: 'Because text contains ${controller.text}');
}, skip: areKeyEventsHandledByPlatform, variant: KeySimulatorTransitModeVariant.all()); },
skip: areKeyEventsHandledByPlatform, // [intended] only applies to platforms where we handle key events.
variant: KeySimulatorTransitModeVariant.all()
);
testWidgets('Copy paste obscured text test', (WidgetTester tester) async { testWidgets('Copy paste obscured text test', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(); final FocusNode focusNode = FocusNode();
...@@ -5018,7 +5027,10 @@ void main() { ...@@ -5018,7 +5027,10 @@ void main() {
const String expected = 'a biga big house jumped over a mouse'; const String expected = 'a biga big house jumped over a mouse';
expect(find.text(expected), findsOneWidget, reason: 'Because text contains ${controller.text}'); expect(find.text(expected), findsOneWidget, reason: 'Because text contains ${controller.text}');
}, skip: areKeyEventsHandledByPlatform, variant: KeySimulatorTransitModeVariant.all()); },
skip: areKeyEventsHandledByPlatform, // [intended] only applies to platforms where we handle key events.
variant: KeySimulatorTransitModeVariant.all()
);
// Regressing test for https://github.com/flutter/flutter/issues/78219 // Regressing test for https://github.com/flutter/flutter/issues/78219
testWidgets('Paste does not crash when the section is inValid', (WidgetTester tester) async { testWidgets('Paste does not crash when the section is inValid', (WidgetTester tester) async {
...@@ -5145,7 +5157,10 @@ void main() { ...@@ -5145,7 +5157,10 @@ void main() {
const String expected = ' housa bige\njumped over a mouse'; const String expected = ' housa bige\njumped over a mouse';
expect(find.text(expected), findsOneWidget); expect(find.text(expected), findsOneWidget);
}, skip: areKeyEventsHandledByPlatform, variant: KeySimulatorTransitModeVariant.all()); },
skip: areKeyEventsHandledByPlatform, // [intended] only applies to platforms where we handle key events.
variant: KeySimulatorTransitModeVariant.all()
);
testWidgets('Cut obscured text test', (WidgetTester tester) async { testWidgets('Cut obscured text test', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(); final FocusNode focusNode = FocusNode();
...@@ -5269,7 +5284,10 @@ void main() { ...@@ -5269,7 +5284,10 @@ void main() {
const String expected = ''; const String expected = '';
expect(find.text(expected), findsOneWidget); expect(find.text(expected), findsOneWidget);
}, skip: areKeyEventsHandledByPlatform, variant: KeySimulatorTransitModeVariant.all()); },
skip: areKeyEventsHandledByPlatform, // [intended] only applies to platforms where we handle key events.
variant: KeySimulatorTransitModeVariant.all()
);
testWidgets('Delete test', (WidgetTester tester) async { testWidgets('Delete test', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(); final FocusNode focusNode = FocusNode();
...@@ -5321,7 +5339,10 @@ void main() { ...@@ -5321,7 +5339,10 @@ void main() {
const String expected2 = ''; const String expected2 = '';
expect(find.text(expected2), findsOneWidget); expect(find.text(expected2), findsOneWidget);
}, skip: areKeyEventsHandledByPlatform, variant: KeySimulatorTransitModeVariant.all()); },
skip: areKeyEventsHandledByPlatform, // [intended] only applies to platforms where we handle key events.
variant: KeySimulatorTransitModeVariant.all(),
);
testWidgets('Changing positions of text fields', (WidgetTester tester) async { testWidgets('Changing positions of text fields', (WidgetTester tester) async {
...@@ -5413,8 +5434,10 @@ void main() { ...@@ -5413,8 +5434,10 @@ void main() {
await tester.sendKeyUpEvent(LogicalKeyboardKey.shift); await tester.sendKeyUpEvent(LogicalKeyboardKey.shift);
expect(c1.selection.extentOffset - c1.selection.baseOffset, -10); expect(c1.selection.extentOffset - c1.selection.baseOffset, -10);
}, skip: areKeyEventsHandledByPlatform, variant: KeySimulatorTransitModeVariant.all()); },
skip: areKeyEventsHandledByPlatform, // [intended] only applies to platforms where we handle key events.
variant: KeySimulatorTransitModeVariant.all()
);
testWidgets('Changing focus test', (WidgetTester tester) async { testWidgets('Changing focus test', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(); final FocusNode focusNode = FocusNode();
...@@ -5488,7 +5511,10 @@ void main() { ...@@ -5488,7 +5511,10 @@ void main() {
expect(c1.selection.extentOffset - c1.selection.baseOffset, 0); expect(c1.selection.extentOffset - c1.selection.baseOffset, 0);
expect(c2.selection.extentOffset - c2.selection.baseOffset, -5); expect(c2.selection.extentOffset - c2.selection.baseOffset, -5);
}, skip: areKeyEventsHandledByPlatform, variant: KeySimulatorTransitModeVariant.all()); },
skip: areKeyEventsHandledByPlatform, // [intended] only applies to platforms where we handle key events.
variant: KeySimulatorTransitModeVariant.all()
);
testWidgets('Caret works when maxLines is null', (WidgetTester tester) async { testWidgets('Caret works when maxLines is null', (WidgetTester tester) async {
final TextEditingController controller = TextEditingController(); final TextEditingController controller = TextEditingController();
...@@ -6226,7 +6252,7 @@ void main() { ...@@ -6226,7 +6252,7 @@ void main() {
// On web (just like iOS), we don't check for pasteability because that // On web (just like iOS), we don't check for pasteability because that
// triggers a permission dialog in the browser. // triggers a permission dialog in the browser.
// https://github.com/flutter/flutter/pull/57139#issuecomment-629048058 // https://github.com/flutter/flutter/pull/57139#issuecomment-629048058
}, skip: isBrowser); }, skip: isBrowser); // [intended] see above.
testWidgets('TextField throws when not descended from a Material widget', (WidgetTester tester) async { testWidgets('TextField throws when not descended from a Material widget', (WidgetTester tester) async {
const Widget textField = TextField(); const Widget textField = TextField();
...@@ -6344,10 +6370,7 @@ void main() { ...@@ -6344,10 +6370,7 @@ void main() {
); );
expect(topLeft.dx, equals(160.0)); expect(topLeft.dx, equals(160.0));
});
// TODO(mdebbar): RTL support still has issues on the web.
// https://github.com/flutter/flutter/projects/159
}, skip: isBrowser);
testWidgets('TextField semantics', (WidgetTester tester) async { testWidgets('TextField semantics', (WidgetTester tester) async {
final SemanticsTester semantics = SemanticsTester(tester); final SemanticsTester semantics = SemanticsTester(tester);
...@@ -7168,7 +7191,7 @@ void main() { ...@@ -7168,7 +7191,7 @@ void main() {
expect(find.byType(TextButton), findsNWidgets(4)); expect(find.byType(TextButton), findsNWidgets(4));
}, },
variant: TargetPlatformVariant.all(), variant: TargetPlatformVariant.all(),
skip: isContextMenuProvidedByPlatform, skip: isContextMenuProvidedByPlatform, // [intended] only applies to platforms where we supply the context menu.,
); );
testWidgets( testWidgets(
...@@ -7202,7 +7225,7 @@ void main() { ...@@ -7202,7 +7225,7 @@ void main() {
expect(find.byType(CupertinoButton), findsNWidgets(3)); expect(find.byType(CupertinoButton), findsNWidgets(3));
}, },
variant: TargetPlatformVariant.all(), variant: TargetPlatformVariant.all(),
skip: isContextMenuProvidedByPlatform, skip: isContextMenuProvidedByPlatform, // [intended] only applies to platforms where we supply the context menu.,
); );
testWidgets('selectionControls is passed to EditableText', (WidgetTester tester) async { testWidgets('selectionControls is passed to EditableText', (WidgetTester tester) async {
...@@ -7305,7 +7328,7 @@ void main() { ...@@ -7305,7 +7328,7 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(find.text('Paste'), findsOneWidget); expect(find.text('Paste'), findsOneWidget);
}, },
skip: isContextMenuProvidedByPlatform, skip: isContextMenuProvidedByPlatform, // [intended] only applies to platforms where we supply the context menu.,
); );
testWidgets( testWidgets(
...@@ -7336,7 +7359,7 @@ void main() { ...@@ -7336,7 +7359,7 @@ void main() {
await tester.pump(); await tester.pump();
expect(find.text('Paste'), findsOneWidget); expect(find.text('Paste'), findsOneWidget);
}, },
skip: isContextMenuProvidedByPlatform, skip: isContextMenuProvidedByPlatform, // [intended] only applies to platforms where we supply the context menu.,
); );
testWidgets( testWidgets(
...@@ -7367,7 +7390,7 @@ void main() { ...@@ -7367,7 +7390,7 @@ void main() {
await tester.pump(); await tester.pump();
expect(find.text('Paste'), findsNothing); expect(find.text('Paste'), findsNothing);
}, },
skip: isContextMenuProvidedByPlatform, skip: isContextMenuProvidedByPlatform, // [intended] only applies to platforms where we supply the context menu.,
); );
testWidgets( testWidgets(
...@@ -7398,7 +7421,7 @@ void main() { ...@@ -7398,7 +7421,7 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(find.text('Paste'), findsOneWidget); expect(find.text('Paste'), findsOneWidget);
}, },
skip: isContextMenuProvidedByPlatform, skip: isContextMenuProvidedByPlatform, // [intended] only applies to platforms where we supply the context menu.,
); );
testWidgets( testWidgets(
...@@ -8640,9 +8663,7 @@ void main() { ...@@ -8640,9 +8663,7 @@ void main() {
const Size(800, 174), const Size(800, 174),
); );
}, },
skip: isBrowser, // TODO(mdebbar): https://github.com/flutter/flutter/issues/32243
// TODO(mdebbar): https://github.com/flutter/flutter/issues/32243
skip: isBrowser,
); );
testWidgets( testWidgets(
...@@ -8671,9 +8692,7 @@ void main() { ...@@ -8671,9 +8692,7 @@ void main() {
const Size(800, 48), const Size(800, 48),
); );
}, },
skip: isBrowser, // TODO(mdebbar): https://github.com/flutter/flutter/issues/32243
// TODO(mdebbar): https://github.com/flutter/flutter/issues/32243
skip: isBrowser,
); );
testWidgets( testWidgets(
...@@ -8704,9 +8723,7 @@ void main() { ...@@ -8704,9 +8723,7 @@ void main() {
const Size(800, 78), const Size(800, 78),
); );
}, },
skip: isBrowser, // TODO(mdebbar): https://github.com/flutter/flutter/issues/32243
// TODO(mdebbar): https://github.com/flutter/flutter/issues/32243
skip: isBrowser,
); );
testWidgets('Caret center position', (WidgetTester tester) async { testWidgets('Caret center position', (WidgetTester tester) async {
...@@ -9722,10 +9739,7 @@ void main() { ...@@ -9722,10 +9739,7 @@ void main() {
inputWidth = editable.size.width; inputWidth = editable.size.width;
expect(inputWidth, wideWidth); expect(inputWidth, wideWidth);
expect(cursorRight, inputWidth - kCaretGap); expect(cursorRight, inputWidth - kCaretGap);
});
// TODO(mdebbar): RTL support still has issues on the web.
// https://github.com/flutter/flutter/projects/159
}, skip: isBrowser);
// Regressing test for https://github.com/flutter/flutter/issues/70625 // Regressing test for https://github.com/flutter/flutter/issues/70625
testWidgets('TextFields can inherit [FloatingLabelBehaviour] from InputDecorationTheme.', (WidgetTester tester) async { testWidgets('TextFields can inherit [FloatingLabelBehaviour] from InputDecorationTheme.', (WidgetTester tester) async {
......
...@@ -112,7 +112,10 @@ void main() { ...@@ -112,7 +112,10 @@ void main() {
expect(controller.text, ' blah2blah1'); expect(controller.text, ' blah2blah1');
expect(controller.selection, const TextSelection(baseOffset: 0, extentOffset: 0)); expect(controller.selection, const TextSelection(baseOffset: 0, extentOffset: 0));
expect(find.byType(CupertinoButton), findsNothing); expect(find.byType(CupertinoButton), findsNothing);
}, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.macOS, TargetPlatform.windows, TargetPlatform.linux }), skip: kIsWeb); },
variant: TargetPlatformVariant.desktop(),
skip: kIsWeb, // [intended] we don't supply the cut/copy/paste buttons on the web.
);
testWidgets('TextFormField accepts TextField.noMaxLength as value to maxLength parameter', (WidgetTester tester) async { testWidgets('TextFormField accepts TextField.noMaxLength as value to maxLength parameter', (WidgetTester tester) async {
bool asserted; bool asserted;
...@@ -471,7 +474,7 @@ void main() { ...@@ -471,7 +474,7 @@ void main() {
await tester.pump(const Duration(milliseconds: 200)); await tester.pump(const Duration(milliseconds: 200));
expect(renderEditable, paintsExactlyCountTimes(#drawRect, 0)); expect(renderEditable, paintsExactlyCountTimes(#drawRect, 0));
}, skip: isBrowser); // We do not use Flutter-rendered context menu on the Web }, skip: isBrowser); // [intended] We do not use Flutter-rendered context menu on the Web.
testWidgets('onTap is called upon tap', (WidgetTester tester) async { testWidgets('onTap is called upon tap', (WidgetTester tester) async {
int tapCount = 0; int tapCount = 0;
......
...@@ -149,7 +149,7 @@ void main() { ...@@ -149,7 +149,7 @@ void main() {
expect(find.text('Select all'), findsOneWidget); expect(find.text('Select all'), findsOneWidget);
expect(find.byType(IconButton), findsNothing); expect(find.byType(IconButton), findsNothing);
}, },
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web skip: isBrowser, // [intended] We do not use Flutter-rendered context menu on the Web.
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }), variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }),
); );
...@@ -223,7 +223,7 @@ void main() { ...@@ -223,7 +223,7 @@ void main() {
expect(find.text('Select all'), findsNothing); expect(find.text('Select all'), findsNothing);
expect(find.byType(IconButton), findsOneWidget); expect(find.byType(IconButton), findsOneWidget);
}, },
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web skip: isBrowser, // [intended] We do not use Flutter-rendered context menu on the Web.
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }), variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }),
); );
...@@ -288,7 +288,7 @@ void main() { ...@@ -288,7 +288,7 @@ void main() {
expect(find.text('Select all'), findsNothing); expect(find.text('Select all'), findsNothing);
expect(find.byType(IconButton), findsOneWidget); expect(find.byType(IconButton), findsOneWidget);
}, },
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web skip: isBrowser, // [intended] We do not use Flutter-rendered context menu on the Web.
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }), variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }),
); );
...@@ -362,7 +362,7 @@ void main() { ...@@ -362,7 +362,7 @@ void main() {
expect(find.text('Select all'), findsNothing); expect(find.text('Select all'), findsNothing);
expect(find.byType(IconButton), findsOneWidget); expect(find.byType(IconButton), findsOneWidget);
}, },
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web skip: isBrowser, // [intended] We do not use Flutter-rendered context menu on the Web.
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }), variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }),
); );
...@@ -468,7 +468,7 @@ void main() { ...@@ -468,7 +468,7 @@ void main() {
final Offset newCutOffset = tester.getTopLeft(find.text('Cut')); final Offset newCutOffset = tester.getTopLeft(find.text('Cut'));
expect(newCutOffset, equals(cutOffset)); expect(newCutOffset, equals(cutOffset));
}, },
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web skip: isBrowser, // [intended] We do not use Flutter-rendered context menu on the Web.
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }), variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }),
); );
}); });
...@@ -542,7 +542,7 @@ void main() { ...@@ -542,7 +542,7 @@ void main() {
final Offset cutOffset = tester.getTopLeft(find.text('Cut')); final Offset cutOffset = tester.getTopLeft(find.text('Cut'));
expect(cutOffset.dy, greaterThan(bottomHandlePos.dy)); expect(cutOffset.dy, greaterThan(bottomHandlePos.dy));
}, },
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web skip: isBrowser, // [intended] We do not use Flutter-rendered context menu on the Web.
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }), variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }),
); );
}); });
...@@ -667,7 +667,10 @@ void main() { ...@@ -667,7 +667,10 @@ void main() {
expect(find.text('Cut'), findsOneWidget); expect(find.text('Cut'), findsOneWidget);
expect(find.text('Paste'), findsOneWidget); expect(find.text('Paste'), findsOneWidget);
expect(find.text('Select all'), findsOneWidget); expect(find.text('Select all'), findsOneWidget);
}, skip: isBrowser, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android })); },
skip: isBrowser, // [intended] we don't supply the cut/copy/paste buttons on the web.
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android })
);
// TODO(justinmc): https://github.com/flutter/flutter/issues/60145 // TODO(justinmc): https://github.com/flutter/flutter/issues/60145
testWidgets('Paste always appears regardless of clipboard content on iOS', (WidgetTester tester) async { testWidgets('Paste always appears regardless of clipboard content on iOS', (WidgetTester tester) async {
...@@ -719,5 +722,8 @@ void main() { ...@@ -719,5 +722,8 @@ void main() {
expect(find.text('Copy'), findsOneWidget); expect(find.text('Copy'), findsOneWidget);
expect(find.text('Cut'), findsOneWidget); expect(find.text('Cut'), findsOneWidget);
expect(find.text('Paste'), findsOneWidget); expect(find.text('Paste'), findsOneWidget);
}, skip: isBrowser, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS })); },
skip: isBrowser, // [intended] we don't supply the cut/copy/paste buttons on the web.
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS })
);
} }
...@@ -204,5 +204,5 @@ void main() { ...@@ -204,5 +204,5 @@ void main() {
expect(find.text('Copy'), findsNothing); expect(find.text('Copy'), findsNothing);
expect(find.text('Paste'), findsNothing); expect(find.text('Paste'), findsNothing);
expect(find.text('Select all'), findsNothing); expect(find.text('Select all'), findsNothing);
}, skip: kIsWeb); }, skip: kIsWeb); // [intended] We don't show the toolbar on the web.
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment