diff --git a/dev/bots/test.dart b/dev/bots/test.dart index 2e14aac514..477c31b663 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart @@ -350,6 +350,7 @@ Future _runWebTests() async { 'test/scheduler/', 'test/widgets/', 'test/semantics/', + 'test/material/', ]); } diff --git a/packages/flutter/lib/src/material/slider_theme.dart b/packages/flutter/lib/src/material/slider_theme.dart index 393c7c5915..e930b42e25 100644 --- a/packages/flutter/lib/src/material/slider_theme.dart +++ b/packages/flutter/lib/src/material/slider_theme.dart @@ -810,7 +810,7 @@ class SliderThemeData extends Diagnosticable { void debugFillProperties(DiagnosticPropertiesBuilder properties) { super.debugFillProperties(properties); const SliderThemeData defaultData = SliderThemeData(); - properties.add(DiagnosticsProperty('trackHeight', trackHeight, defaultValue: defaultData.trackHeight)); + properties.add(DoubleProperty('trackHeight', trackHeight, defaultValue: defaultData.trackHeight)); properties.add(DiagnosticsProperty('activeTrackColor', activeTrackColor, defaultValue: defaultData.activeTrackColor)); properties.add(DiagnosticsProperty('activeTrackColor', activeTrackColor, defaultValue: defaultData.activeTrackColor)); properties.add(DiagnosticsProperty('inactiveTrackColor', inactiveTrackColor, defaultValue: defaultData.inactiveTrackColor)); diff --git a/packages/flutter/test/material/about_test.dart b/packages/flutter/test/material/about_test.dart index a8da27fe94..172d0928cb 100644 --- a/packages/flutter/test/material/about_test.dart +++ b/packages/flutter/test/material/about_test.dart @@ -63,7 +63,7 @@ void main() { await tester.pumpAndSettle(const Duration(milliseconds: 100)); expect(find.text('Pirate license'), findsOneWidget); - }); + }, skip: isBrowser); testWidgets('About box logic defaults to executable name for app name', (WidgetTester tester) async { await tester.pumpWidget( @@ -107,7 +107,7 @@ void main() { expect(find.text('BBB'), findsOneWidget); expect(find.text('Another package'), findsOneWidget); expect(find.text('Another license'), findsOneWidget); - }); + }, skip: isBrowser); testWidgets('LicensePage respects the notch', (WidgetTester tester) async { const double safeareaPadding = 27.0; @@ -132,5 +132,5 @@ void main() { await tester.pumpAndSettle(); expect(tester.getTopLeft(find.text('DEF')), const Offset(8.0 + safeareaPadding, 527.0)); - }); + }, skip: isBrowser); } diff --git a/packages/flutter/test/material/bottom_app_bar_test.dart b/packages/flutter/test/material/bottom_app_bar_test.dart index 92929cfe40..0551e298bd 100644 --- a/packages/flutter/test/material/bottom_app_bar_test.dart +++ b/packages/flutter/test/material/bottom_app_bar_test.dart @@ -74,14 +74,16 @@ void main() { await expectLater( find.byKey(key), matchesGoldenFile('bottom_app_bar.custom_shape.1.png'), + skip: !Platform.isLinux, ); await pump(FloatingActionButtonLocation.centerDocked); await tester.pumpAndSettle(); await expectLater( find.byKey(key), matchesGoldenFile('bottom_app_bar.custom_shape.2.png'), + skip: !Platform.isLinux, ); - }, skip: !Platform.isLinux); + }, skip: isBrowser); testWidgets('color defaults to Theme.bottomAppBarColor', (WidgetTester tester) async { await tester.pumpWidget( diff --git a/packages/flutter/test/material/bottom_app_bar_theme_test.dart b/packages/flutter/test/material/bottom_app_bar_theme_test.dart index 4328e73320..7c0df934d6 100644 --- a/packages/flutter/test/material/bottom_app_bar_theme_test.dart +++ b/packages/flutter/test/material/bottom_app_bar_theme_test.dart @@ -83,7 +83,7 @@ void main() { matchesGoldenFile('bottom_app_bar_theme.custom_shape.png'), skip: !isLinux, ); - }); + }, skip: isBrowser); testWidgets('BAB theme does not affect defaults', (WidgetTester tester) async { await tester.pumpWidget(const MaterialApp( diff --git a/packages/flutter/test/material/bottom_navigation_bar_test.dart b/packages/flutter/test/material/bottom_navigation_bar_test.dart index cf67350fe5..5673944ff5 100644 --- a/packages/flutter/test/material/bottom_navigation_bar_test.dart +++ b/packages/flutter/test/material/bottom_navigation_bar_test.dart @@ -891,7 +891,7 @@ void main() { await tester.tap(find.text('Alarm')); await tester.pump(const Duration(seconds: 1)); expect(Theme.of(tester.element(find.text('Alarm'))).brightness, equals(Brightness.dark)); - }); + }, skip: isBrowser); testWidgets('BottomNavigationBar iconSize test', (WidgetTester tester) async { double builderIconSize; @@ -1001,7 +1001,7 @@ void main() { final RenderBox box = tester.renderObject(find.byType(BottomNavigationBar)); expect(box.size.height, equals(66.0)); - }); + }, skip: isBrowser); testWidgets('BottomNavigationBar limits width of tiles with long titles', (WidgetTester tester) async { final Text longTextA = Text(''.padLeft(100, 'A')); @@ -1033,7 +1033,7 @@ void main() { expect(itemBoxA.size, equals(const Size(400.0, 14.0))); final RenderBox itemBoxB = tester.renderObject(find.text(longTextB.data)); expect(itemBoxB.size, equals(const Size(400.0, 14.0))); - }); + }, skip: isBrowser); testWidgets('BottomNavigationBar paints circles', (WidgetTester tester) async { await tester.pumpWidget( @@ -1103,7 +1103,7 @@ void main() { ..translate(x: 400.0) ..circle(x: 200.0), ); - }); + }, skip: isBrowser); testWidgets('BottomNavigationBar inactiveIcon shown', (WidgetTester tester) async { const Key filled = Key('filled'); @@ -1438,7 +1438,7 @@ void main() { skip: !isLinux, ); } - }); + }, skip: isBrowser); testWidgets('BottomNavigationBar item title should not be nullable', (WidgetTester tester) async { expect(() { diff --git a/packages/flutter/test/material/button_theme_test.dart b/packages/flutter/test/material/button_theme_test.dart index f0fabbe570..5599248fa2 100644 --- a/packages/flutter/test/material/button_theme_test.dart +++ b/packages/flutter/test/material/button_theme_test.dart @@ -170,7 +170,7 @@ void main() { expect(tester.widget(find.byType(Material)).shape, shape); expect(tester.widget(find.byType(Material)).color, disabledColor); expect(tester.getSize(find.byType(Material)), const Size(88.0, 48.0)); - }); + }, skip: isBrowser); testWidgets('Theme buttonTheme ButtonTheme overrides', (WidgetTester tester) async { ButtonTextTheme textTheme; diff --git a/packages/flutter/test/material/buttons_test.dart b/packages/flutter/test/material/buttons_test.dart index 7e221a5acb..b491b8b864 100644 --- a/packages/flutter/test/material/buttons_test.dart +++ b/packages/flutter/test/material/buttons_test.dart @@ -681,7 +681,7 @@ void main() { expect(tester.getSize(find.byType(FlatButton)).height, equals(48.0)); expect(tester.getSize(find.byType(Text)).width, isIn([126.0, 127.0])); expect(tester.getSize(find.byType(Text)).height, equals(42.0)); - }); + }, skip: isBrowser); // This test is very similar to the '...explicit splashColor and highlightColor' test // in icon_button_test.dart. If you change this one, you may want to also change that one. @@ -924,7 +924,7 @@ void main() { semantics.dispose(); - }); + }, skip: isBrowser); testWidgets('MaterialButton minWidth and height parameters', (WidgetTester tester) async { Widget buildFrame({ double minWidth, double height, EdgeInsets padding = EdgeInsets.zero, Widget child }) { diff --git a/packages/flutter/test/material/card_theme_test.dart b/packages/flutter/test/material/card_theme_test.dart index 670f1bd33d..388a4b8736 100644 --- a/packages/flutter/test/material/card_theme_test.dart +++ b/packages/flutter/test/material/card_theme_test.dart @@ -140,7 +140,7 @@ void main() { matchesGoldenFile('card_theme.custom_shape.png'), skip: !isLinux, ); - }); + }, skip: isBrowser); } CardTheme _cardTheme() { diff --git a/packages/flutter/test/material/chip_test.dart b/packages/flutter/test/material/chip_test.dart index 2185bcaf7a..a506daba89 100644 --- a/packages/flutter/test/material/chip_test.dart +++ b/packages/flutter/test/material/chip_test.dart @@ -356,7 +356,7 @@ void main() { ); expect(tester.getSize(find.byType(Text)), const Size(40.0, 10.0)); expect(tester.getSize(find.byType(Chip)), const Size(800.0, 48.0)); - }); + }, skip: isBrowser); testWidgets('Chip elements are ordered horizontally for locale', (WidgetTester tester) async { final UniqueKey iconKey = UniqueKey(); @@ -477,7 +477,7 @@ void main() { expect(tester.getSize(find.byType(Chip).first).width, anyOf(318.0, 319.0)); expect(tester.getSize(find.byType(Chip).first).height, equals(50.0)); expect(tester.getSize(find.byType(Chip).last), anyOf(const Size(132.0, 48.0), const Size(131.0, 48.0))); - }); + }, skip: isBrowser); testWidgets('Labels can be non-text widgets', (WidgetTester tester) async { final Key keyA = GlobalKey(); @@ -511,7 +511,7 @@ void main() { anyOf(const Size(132.0, 48.0), const Size(131.0, 48.0)), ); expect(tester.getSize(find.byType(Chip).last), const Size(58.0, 48.0)); - }); + }, skip: isBrowser); testWidgets('Avatars can be non-circle avatar widgets', (WidgetTester tester) async { final Key keyA = GlobalKey(); @@ -735,7 +735,7 @@ void main() { expect(tester.getSize(find.byType(RawChip)), equals(const Size(80.0, 48.0))); expect(tester.getTopLeft(find.byKey(labelKey)), equals(const Offset(12.0, 17.0))); expect(find.byKey(avatarKey), findsNothing); - }); + }, skip: isBrowser); testWidgets('Delete button drawer works as expected on RawChip', (WidgetTester tester) async { final UniqueKey labelKey = UniqueKey(); @@ -851,7 +851,7 @@ void main() { expect(tester.getSize(find.byType(RawChip)), equals(const Size(80.0, 48.0))); expect(tester.getTopLeft(find.byKey(labelKey)), equals(const Offset(12.0, 17.0))); expect(find.byKey(deleteButtonKey), findsNothing); - }); + }, skip: isBrowser); testWidgets('Selection with avatar works as expected on RawChip', (WidgetTester tester) async { bool selected = false; @@ -934,7 +934,7 @@ void main() { expect(getSelectProgress(tester), equals(0.0)); expect(getAvatarDrawerProgress(tester), equals(1.0)); expect(getDeleteDrawerProgress(tester), equals(0.0)); - }); + }, skip: isBrowser); testWidgets('Selection without avatar works as expected on RawChip', (WidgetTester tester) async { bool selected = false; @@ -1010,7 +1010,7 @@ void main() { expect(getSelectProgress(tester), equals(0.0)); expect(getAvatarDrawerProgress(tester), equals(0.0)); expect(getDeleteDrawerProgress(tester), equals(0.0)); - }); + }, skip: isBrowser); testWidgets('Activation works as expected on RawChip', (WidgetTester tester) async { bool selected = false; @@ -1135,7 +1135,7 @@ void main() { ); expect(tester.getSize(find.byKey(key2)), const Size(80.0, 32.0)); - }); + }, skip: isBrowser); testWidgets('Chip uses the right theme colors for the right components', (WidgetTester tester) async { final ThemeData themeData = ThemeData( @@ -1721,7 +1721,7 @@ void main() { ], excludes: [ const Offset(4, 4), ])); - }); + }, skip: isBrowser); testWidgets('Chips should use InkWell instead of InkResponse.', (WidgetTester tester) async { // Regression test for https://github.com/flutter/flutter/issues/28646 diff --git a/packages/flutter/test/material/chip_theme_test.dart b/packages/flutter/test/material/chip_theme_test.dart index 75ce9beeb9..86a874090f 100644 --- a/packages/flutter/test/material/chip_theme_test.dart +++ b/packages/flutter/test/material/chip_theme_test.dart @@ -164,7 +164,7 @@ void main() { expect(materialBox, paints..path(color: Color(customTheme.backgroundColor.value))); expect(material.elevation, customTheme.elevation); expect(material.shadowColor, customTheme.shadowColor); - }); + }, skip: isBrowser); testWidgets('ChipThemeData generates correct opacities for defaults', (WidgetTester tester) async { const Color customColor1 = Color(0xcafefeed); diff --git a/packages/flutter/test/material/circle_avatar_test.dart b/packages/flutter/test/material/circle_avatar_test.dart index 62f9e98d7a..d2b24c4810 100644 --- a/packages/flutter/test/material/circle_avatar_test.dart +++ b/packages/flutter/test/material/circle_avatar_test.dart @@ -186,7 +186,7 @@ void main() { ), ); expect(tester.getSize(find.text('Z')), equals(const Size(16.0, 16.0))); - }); + }, skip: isBrowser); testWidgets('CircleAvatar respects minRadius', (WidgetTester tester) async { final Color backgroundColor = Colors.blue.shade900; diff --git a/packages/flutter/test/material/date_picker_test.dart b/packages/flutter/test/material/date_picker_test.dart index 26be766466..06799ba2d9 100644 --- a/packages/flutter/test/material/date_picker_test.dart +++ b/packages/flutter/test/material/date_picker_test.dart @@ -19,7 +19,7 @@ void main() { }, // Skip on Windows because this test is quite flaky when run on Windows, // until https://github.com/flutter/flutter/issues/19696 is fixed. - skip: isWindows, + skip: isWindows || isBrowser, ); } diff --git a/packages/flutter/test/material/dialog_theme_test.dart b/packages/flutter/test/material/dialog_theme_test.dart index 4ba5014ae9..932375b390 100644 --- a/packages/flutter/test/material/dialog_theme_test.dart +++ b/packages/flutter/test/material/dialog_theme_test.dart @@ -133,7 +133,7 @@ void main() { matchesGoldenFile('dialog_theme.dialog_with_custom_border.png'), skip: !isLinux, ); - }); + }, skip: isBrowser); testWidgets('Custom Title Text Style - Constructor Param', (WidgetTester tester) async { const String titleText = 'Title'; diff --git a/packages/flutter/test/material/dropdown_test.dart b/packages/flutter/test/material/dropdown_test.dart index 1837f29b6e..4e6acaccec 100644 --- a/packages/flutter/test/material/dropdown_test.dart +++ b/packages/flutter/test/material/dropdown_test.dart @@ -143,7 +143,7 @@ void main() { matchesGoldenFile('dropdown_test.default.0.png'), skip: !isLinux, ); - }); + }, skip: isBrowser); testWidgets('Expanded dropdown golden', (WidgetTester tester) async { final Key buttonKey = UniqueKey(); @@ -156,7 +156,7 @@ void main() { matchesGoldenFile('dropdown_test.expanded.0.png'), skip: !isLinux, ); - }); + }, skip: isBrowser); testWidgets('Dropdown button control test', (WidgetTester tester) async { String value = 'one'; diff --git a/packages/flutter/test/material/flat_button_test.dart b/packages/flutter/test/material/flat_button_test.dart index 3837ca5b3e..cb87cf2e57 100644 --- a/packages/flutter/test/material/flat_button_test.dart +++ b/packages/flutter/test/material/flat_button_test.dart @@ -76,6 +76,7 @@ void main() { await gesture.removePointer(); }, semanticsEnabled: true, + skip: isBrowser, ); testWidgets('FlatButton with colored theme meets a11y contrast guidelines', (WidgetTester tester) async { @@ -140,6 +141,7 @@ void main() { await gesture.removePointer(); }, semanticsEnabled: true, + skip: isBrowser, ); testWidgets('FlatButton uses stateful color for text color in different states', (WidgetTester tester) async { diff --git a/packages/flutter/test/material/flexible_space_bar_test.dart b/packages/flutter/test/material/flexible_space_bar_test.dart index 079c284b68..e2b20edb98 100644 --- a/packages/flutter/test/material/flexible_space_bar_test.dart +++ b/packages/flutter/test/material/flexible_space_bar_test.dart @@ -154,7 +154,7 @@ void main() { await tester.pumpWidget(buildFrame(TargetPlatform.iOS, false)); expect(getTitleBottomLeft(), const Offset(72.0, 16.0)); - }); + }, skip: isBrowser); testWidgets('FlexibleSpaceBar test titlePadding override', (WidgetTester tester) async { Widget buildFrame(TargetPlatform platform, bool centerTitle) { @@ -195,7 +195,7 @@ void main() { await tester.pumpWidget(buildFrame(TargetPlatform.iOS, false)); expect(getTitleBottomLeft(), Offset.zero); - }); + }, skip: isBrowser); } class TestDelegate extends SliverPersistentHeaderDelegate { diff --git a/packages/flutter/test/material/floating_action_button_location_test.dart b/packages/flutter/test/material/floating_action_button_location_test.dart index a3a9fc577e..788da3b794 100644 --- a/packages/flutter/test/material/floating_action_button_location_test.dart +++ b/packages/flutter/test/material/floating_action_button_location_test.dart @@ -213,7 +213,7 @@ void main() { ), ); await tester.pumpAndSettle(); - }); + }, skip: isBrowser); testWidgets('interrupting entrance of a new fab.', (WidgetTester tester) async { await tester.pumpWidget( @@ -238,7 +238,7 @@ void main() { ); await tester.pumpAndSettle(); }); - }); + }, skip: isBrowser); }); testWidgets('Docked floating action button locations', (WidgetTester tester) async { @@ -274,7 +274,7 @@ void main() { ); await tester.pumpAndSettle(); expect(tester.getCenter(find.byType(FloatingActionButton)), const Offset(756.0, 500.0)); - }); + }, skip: isBrowser); testWidgets('Docked floating action button locations: no BAB, small BAB', (WidgetTester tester) async { await tester.pumpWidget( @@ -293,7 +293,7 @@ void main() { ), ); expect(tester.getCenter(find.byType(FloatingActionButton)), const Offset(756.0, 572.0)); - }); + }, skip: isBrowser); testWidgets('Mini-start-top floating action button location', (WidgetTester tester) async { await tester.pumpWidget( @@ -314,7 +314,7 @@ void main() { ); expect(tester.getCenter(find.byType(FloatingActionButton)).dx, tester.getCenter(find.byType(CircleAvatar)).dx); expect(tester.getCenter(find.byType(FloatingActionButton)).dy, kToolbarHeight); - }); + }, skip: isBrowser); testWidgets('Start-top floating action button location LTR', (WidgetTester tester) async { await tester.pumpWidget( @@ -327,7 +327,7 @@ void main() { ), ); expect(tester.getRect(find.byType(FloatingActionButton)), rectMoreOrLessEquals(const Rect.fromLTWH(16.0, 28.0, 56.0, 56.0))); - }); + }, skip: isBrowser); testWidgets('End-top floating action button location RTL', (WidgetTester tester) async { await tester.pumpWidget( @@ -343,7 +343,7 @@ void main() { ), ); expect(tester.getRect(find.byType(FloatingActionButton)), rectMoreOrLessEquals(const Rect.fromLTWH(16.0, 28.0, 56.0, 56.0))); - }); + }, skip: isBrowser); testWidgets('Start-top floating action button location RTL', (WidgetTester tester) async { await tester.pumpWidget( @@ -359,7 +359,7 @@ void main() { ), ); expect(tester.getRect(find.byType(FloatingActionButton)), rectMoreOrLessEquals(const Rect.fromLTWH(800.0 - 56.0 - 16.0, 28.0, 56.0, 56.0))); - }); + }, skip: isBrowser); testWidgets('End-top floating action button location LTR', (WidgetTester tester) async { await tester.pumpWidget( @@ -372,7 +372,7 @@ void main() { ), ); expect(tester.getRect(find.byType(FloatingActionButton)), rectMoreOrLessEquals(const Rect.fromLTWH(800.0 - 56.0 - 16.0, 28.0, 56.0, 56.0))); - }); + }, skip: isBrowser); } diff --git a/packages/flutter/test/material/floating_action_button_test.dart b/packages/flutter/test/material/floating_action_button_test.dart index a1fed6f1cd..c644ead2f9 100644 --- a/packages/flutter/test/material/floating_action_button_test.dart +++ b/packages/flutter/test/material/floating_action_button_test.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +@TestOn('!chrome') // whole file needs triage. import 'dart:ui'; import 'package:flutter/material.dart'; diff --git a/packages/flutter/test/material/ink_paint_test.dart b/packages/flutter/test/material/ink_paint_test.dart index 27398e988a..aa267dc74c 100644 --- a/packages/flutter/test/material/ink_paint_test.dart +++ b/packages/flutter/test/material/ink_paint_test.dart @@ -223,7 +223,7 @@ void main() { expect(box, isNot(paints..circle())); await gesture.up(); - }); + }, skip: isBrowser); testWidgets('Cancel an InkRipple that was disposed when its animation ended', (WidgetTester tester) async { // Regression test for https://github.com/flutter/flutter/issues/14391 diff --git a/packages/flutter/test/material/input_decorator_test.dart b/packages/flutter/test/material/input_decorator_test.dart index 142e98fec9..9ad15d8a90 100644 --- a/packages/flutter/test/material/input_decorator_test.dart +++ b/packages/flutter/test/material/input_decorator_test.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +@TestOn('!chrome') // needs substantial triage. import 'dart:async'; import 'package:flutter/material.dart'; @@ -1437,7 +1438,7 @@ void main() { expect(tester.getTopLeft(find.text('text')).dy, 12.0); expect(getBorderBottom(tester), 40.0); expect(getBorderWeight(tester), 1.0); - }); + }, skip: isBrowser); testWidgets('InputDecorator.collapsed', (WidgetTester tester) async { await tester.pumpWidget( @@ -1476,7 +1477,7 @@ void main() { expect(tester.getSize(find.text('hint')).height, 16.0); expect(tester.getTopLeft(find.text('hint')).dy, 0.0); expect(getBorderWeight(tester), 0.0); - }); + }, skip: isBrowser); testWidgets('InputDecorator with baseStyle', (WidgetTester tester) async { // Setting the baseStyle of the InputDecoration and the style of the input @@ -1517,7 +1518,7 @@ void main() { expect(tester.getTopLeft(find.text('hint')).dy, 23.5); expect(tester.getTopLeft(find.text('label')).dy, 17.75); expect(tester.getTopLeft(find.text('text')).dy, 23.5); - }); + }, skip: isBrowser); testWidgets('InputDecorator with empty style overrides', (WidgetTester tester) async { // Same as not specifying any style overrides @@ -1559,7 +1560,7 @@ void main() { expect(getBorderWeight(tester), 1.0); expect(tester.getTopLeft(find.text('helper')), const Offset(12.0, 64.0)); expect(tester.getTopRight(find.text('counter')), const Offset(788.0, 64.0)); - }); + }, skip: isBrowser); testWidgets('InputDecoration outline shape with no border and no floating placeholder', (WidgetTester tester) async { await tester.pumpWidget( @@ -1611,7 +1612,7 @@ void main() { // The label should not be seen. expect(getOpacity(tester, 'label'), 0.0); - }); + }, skip: isBrowser); testWidgets('InputDecorationTheme outline border', (WidgetTester tester) async { await tester.pumpWidget( @@ -1636,7 +1637,7 @@ void main() { expect(tester.getBottomLeft(find.text('label')).dy, 36.0); expect(getBorderBottom(tester), 56.0); expect(getBorderWeight(tester), 1.0); - }); + }, skip: isBrowser); testWidgets('InputDecorationTheme outline border, dense layout', (WidgetTester tester) async { await tester.pumpWidget( diff --git a/packages/flutter/test/material/list_tile_test.dart b/packages/flutter/test/material/list_tile_test.dart index 3194961036..e3777a4ef6 100644 --- a/packages/flutter/test/material/list_tile_test.dart +++ b/packages/flutter/test/material/list_tile_test.dart @@ -190,7 +190,7 @@ void main() { testChildren(); testHorizontalGeometry(); testVerticalGeometry(128.0); - }); + }, skip: isBrowser); testWidgets('ListTile geometry (RTL)', (WidgetTester tester) async { const double leftPadding = 10.0; @@ -784,7 +784,7 @@ void main() { expect(tester.getRect(find.byType(ListTile).at(1)), const Rect.fromLTWH( 0.0, 216.0 , 800.0, 56.0)); expect(tester.getRect(find.byType(Placeholder).at(2)), const Rect.fromLTWH( 16.0, 216.0 + 16.0, 24.0, 12.0)); expect(tester.getRect(find.byType(Placeholder).at(3)), const Rect.fromLTWH(800.0 - 24.0 - 16.0, 216.0 + 16.0, 24.0, 24.0)); - }); + }, skip: isBrowser); testWidgets('ListTile leading icon height does not exceed ListTile height', (WidgetTester tester) async { // regression test for https://github.com/flutter/flutter/issues/28765 diff --git a/packages/flutter/test/material/material_button_test.dart b/packages/flutter/test/material/material_button_test.dart index c31676c18c..9d65e340ad 100644 --- a/packages/flutter/test/material/material_button_test.dart +++ b/packages/flutter/test/material/material_button_test.dart @@ -32,6 +32,7 @@ void main() { await expectLater(tester, meetsGuideline(textContrastGuideline)); }, semanticsEnabled: true, + skip: isBrowser, ); } diff --git a/packages/flutter/test/material/material_test.dart b/packages/flutter/test/material/material_test.dart index 74e8dd542c..36fcadee1a 100644 --- a/packages/flutter/test/material/material_test.dart +++ b/packages/flutter/test/material/material_test.dart @@ -619,7 +619,7 @@ void main() { matchesGoldenFile('material.border_paint_above.png'), skip: !isLinux, ); - }); + }, skip: isBrowser); testWidgets('border is painted below child when specified', (WidgetTester tester) async { final Key painterKey = UniqueKey(); @@ -660,6 +660,6 @@ void main() { matchesGoldenFile('material.border_paint_below.png'), skip: !isLinux, ); - }); + }, skip: isBrowser); }); } diff --git a/packages/flutter/test/material/outline_button_test.dart b/packages/flutter/test/material/outline_button_test.dart index 475381c85d..c07bbd0440 100644 --- a/packages/flutter/test/material/outline_button_test.dart +++ b/packages/flutter/test/material/outline_button_test.dart @@ -79,6 +79,7 @@ void main() { await gesture.removePointer(); }, semanticsEnabled: true, + skip: isBrowser, ); testWidgets('OutlineButton with colored theme meets a11y contrast guidelines', (WidgetTester tester) async { @@ -142,6 +143,7 @@ void main() { await expectLater(tester, meetsGuideline(textContrastGuideline)); await gesture.removePointer(); }, + skip: isBrowser, semanticsEnabled: true, ); @@ -480,7 +482,7 @@ void main() { clipPath: clipPath, clipRect: clipRect, ); - }); + }, skip: isBrowser); testWidgets('OutlineButton has no clip by default', (WidgetTester tester) async { final GlobalKey buttonKey = GlobalKey(); @@ -614,7 +616,7 @@ void main() { expect(tester.getSize(find.byType(FlatButton)).height, equals(48.0)); expect(tester.getSize(find.byType(Text)).width, isIn([126.0, 127.0])); expect(tester.getSize(find.byType(Text)).height, equals(42.0)); - }); + }, skip: isBrowser); testWidgets('OutlineButton pressed fillColor default', (WidgetTester tester) async { Widget buildFrame(ThemeData theme) { diff --git a/packages/flutter/test/material/radio_test.dart b/packages/flutter/test/material/radio_test.dart index db183c41df..b493ab6391 100644 --- a/packages/flutter/test/material/radio_test.dart +++ b/packages/flutter/test/material/radio_test.dart @@ -279,6 +279,6 @@ void main() { matchesGoldenFile('radio.ink_ripple.png'), skip: !isLinux, ); - }); + }, skip: isBrowser); } diff --git a/packages/flutter/test/material/raised_button_test.dart b/packages/flutter/test/material/raised_button_test.dart index b9d2487172..54f0feaf87 100644 --- a/packages/flutter/test/material/raised_button_test.dart +++ b/packages/flutter/test/material/raised_button_test.dart @@ -75,6 +75,7 @@ void main() { await expectLater(tester, meetsGuideline(textContrastGuideline)); await gesture.removePointer(); }, + skip: isBrowser, semanticsEnabled: true, ); diff --git a/packages/flutter/test/material/slider_test.dart b/packages/flutter/test/material/slider_test.dart index 7367f1f6af..d7b30daa95 100644 --- a/packages/flutter/test/material/slider_test.dart +++ b/packages/flutter/test/material/slider_test.dart @@ -991,7 +991,7 @@ void main() { await gesture.up(); await tester.pumpAndSettle(); - }); + }, skip: isBrowser); testWidgets('Tick marks are skipped when they are too dense', (WidgetTester tester) async { Widget buildSlider({ diff --git a/packages/flutter/test/material/slider_theme_test.dart b/packages/flutter/test/material/slider_theme_test.dart index fe6393d41b..c315788570 100644 --- a/packages/flutter/test/material/slider_theme_test.dart +++ b/packages/flutter/test/material/slider_theme_test.dart @@ -529,7 +529,8 @@ void main() { ), ); await gesture.up(); - }); + }, skip: isBrowser + ); testWidgets('The slider track height can be overridden', (WidgetTester tester) async { final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith(trackHeight: 16); diff --git a/packages/flutter/test/material/snack_bar_test.dart b/packages/flutter/test/material/snack_bar_test.dart index 281257d434..1aa4630af3 100644 --- a/packages/flutter/test/material/snack_bar_test.dart +++ b/packages/flutter/test/material/snack_bar_test.dart @@ -386,7 +386,7 @@ void main() { expect(actionTextBottomLeft.dx - textBottomRight.dx, 24.0); expect(snackBarBottomRight.dx - actionTextBottomRight.dx, 24.0 + 30.0); // margin + right padding expect(snackBarBottomRight.dy - actionTextBottomRight.dy, 17.0 + 40.0); // margin + bottom padding - }); + }, skip: isBrowser); testWidgets('SnackBar is positioned above BottomNavigationBar', (WidgetTester tester) async { await tester.pumpWidget(MaterialApp( @@ -439,7 +439,7 @@ void main() { expect(actionTextBottomLeft.dx - textBottomRight.dx, 24.0); expect(snackBarBottomRight.dx - actionTextBottomRight.dx, 24.0 + 30.0); // margin + right padding expect(snackBarBottomRight.dy - actionTextBottomRight.dy, 17.0); // margin (with no bottom padding) - }); + }, skip: isBrowser); testWidgets('SnackBar should push FloatingActionButton above', (WidgetTester tester) async { await tester.pumpWidget(MaterialApp( @@ -536,7 +536,7 @@ void main() { expect(actionTextBottomLeft.dx - textBottomRight.dx, 16.0); expect(snackBarBottomRight.dx - actionTextBottomRight.dx, 31.0 + 30.0); // margin + right padding expect(snackBarBottomRight.dy - actionTextBottomRight.dy, 27.0); // margin (with no bottom padding) - }); + }, skip: isBrowser); testWidgets('Floating SnackBar is positioned above BottomNavigationBar', (WidgetTester tester) async { await tester.pumpWidget(MaterialApp( @@ -592,7 +592,7 @@ void main() { expect(actionTextBottomLeft.dx - textBottomRight.dx, 16.0); expect(snackBarBottomRight.dx - actionTextBottomRight.dx, 31.0 + 30.0); // margin + right padding expect(snackBarBottomRight.dy - actionTextBottomRight.dy, 27.0); // margin (with no bottom padding) - }); + }, skip: isBrowser); testWidgets('Floating SnackBar is positioned above FloatingActionButton', (WidgetTester tester) async { await tester.pumpWidget(MaterialApp( diff --git a/packages/flutter/test/material/tab_bar_theme_test.dart b/packages/flutter/test/material/tab_bar_theme_test.dart index 1fedb224f4..cb13c2db56 100644 --- a/packages/flutter/test/material/tab_bar_theme_test.dart +++ b/packages/flutter/test/material/tab_bar_theme_test.dart @@ -270,7 +270,7 @@ void main() { matchesGoldenFile('tab_bar_theme.tab_indicator_size_tab.png'), skip: !isLinux, ); - }); + }, skip: isBrowser); testWidgets('Tab bar theme overrides tab indicator size (label)', (WidgetTester tester) async { const TabBarTheme tabBarTheme = TabBarTheme(indicatorSize: TabBarIndicatorSize.label); @@ -282,7 +282,7 @@ void main() { matchesGoldenFile('tab_bar_theme.tab_indicator_size_label.png'), skip: !isLinux, ); - }); + }, skip: isBrowser); testWidgets('Tab bar theme - custom tab indicator', (WidgetTester tester) async { final TabBarTheme tabBarTheme = TabBarTheme( @@ -299,7 +299,7 @@ void main() { matchesGoldenFile('tab_bar_theme.custom_tab_indicator.png'), skip: !isLinux, ); - }); + }, skip: isBrowser); testWidgets('Tab bar theme - beveled rect indicator', (WidgetTester tester) async { final TabBarTheme tabBarTheme = TabBarTheme( @@ -316,5 +316,5 @@ void main() { matchesGoldenFile('tab_bar_theme.beveled_rect_indicator.png'), skip: !isLinux, ); - }); + }, skip: isBrowser); } diff --git a/packages/flutter/test/material/tabs_test.dart b/packages/flutter/test/material/tabs_test.dart index dfbefe3062..5e6a38f9e7 100644 --- a/packages/flutter/test/material/tabs_test.dart +++ b/packages/flutter/test/material/tabs_test.dart @@ -244,7 +244,7 @@ void main() { ); expect(tester.renderObject(find.byType(RichText)).text.style.fontFamily, 'Ahem'); expect(tester.getSize(find.byType(Tab)), const Size(14.0, 46.0)); - }); + }, skip: isBrowser); testWidgets('Tab sizing - icon and text', (WidgetTester tester) async { await tester.pumpWidget( @@ -252,7 +252,7 @@ void main() { ); expect(tester.renderObject(find.byType(RichText)).text.style.fontFamily, 'Ahem'); expect(tester.getSize(find.byType(Tab)), const Size(14.0, 72.0)); - }); + }, skip: isBrowser); testWidgets('Tab sizing - icon and child', (WidgetTester tester) async { await tester.pumpWidget( @@ -260,7 +260,7 @@ void main() { ); expect(tester.renderObject(find.byType(RichText)).text.style.fontFamily, 'Ahem'); expect(tester.getSize(find.byType(Tab)), const Size(14.0, 72.0)); - }); + }, skip: isBrowser); testWidgets('Tab color - normal', (WidgetTester tester) async { final Widget tabBar = TabBar(tabs: const [SizedBox.shrink()], controller: TabController(length: 1, vsync: tester)); @@ -383,7 +383,7 @@ void main() { // Scrolling the TabBar doesn't change the selection expect(controller.index, 0); - }); + }, skip: isBrowser); testWidgets('TabBarView maintains state', (WidgetTester tester) async { final List tabs = ['AAAAAA', 'BBBBBB', 'CCCCCC', 'DDDDDD', 'EEEEEE']; @@ -1639,7 +1639,7 @@ void main() { expect(semantics, hasSemantics(expectedSemantics)); semantics.dispose(); - }); + }, skip: isBrowser); testWidgets('correct scrolling semantics', (WidgetTester tester) async { final SemanticsTester semantics = SemanticsTester(tester); @@ -1903,7 +1903,7 @@ void main() { expect(semantics, hasSemantics(expectedSemantics)); semantics.dispose(); - }); + }, skip: isBrowser); testWidgets('can be notified of TabBar onTap behavior', (WidgetTester tester) async { int tabIndex = -1; diff --git a/packages/flutter/test/material/text_field_test.dart b/packages/flutter/test/material/text_field_test.dart index 32e8297193..9a1b8fc02a 100644 --- a/packages/flutter/test/material/text_field_test.dart +++ b/packages/flutter/test/material/text_field_test.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +@TestOn('!chrome') // This whole test suite needs triage. import 'dart:async'; import 'dart:math' as math; import 'dart:ui' as ui show window; @@ -490,7 +491,7 @@ void main() { matchesGoldenFile('text_field_opacity_test.0.2.png'), skip: !isLinux, ); - }); + }, skip: isBrowser); // TODO(hansmuller): restore these tests after the fix for #24876 has landed. /* @@ -2635,7 +2636,7 @@ void main() { // and the left edge of the input and label. expect(iconRight + 28.0, equals(tester.getTopLeft(find.text('label')).dx)); expect(iconRight + 28.0, equals(tester.getTopLeft(find.byType(EditableText)).dx)); - }); + }, skip: isBrowser); testWidgets('Collapsed hint text placement', (WidgetTester tester) async { await tester.pumpWidget( diff --git a/packages/flutter/test/material/time_picker_test.dart b/packages/flutter/test/material/time_picker_test.dart index 6e9cc73a35..8cacc1e896 100644 --- a/packages/flutter/test/material/time_picker_test.dart +++ b/packages/flutter/test/material/time_picker_test.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +@TestOn('!chrome') // entire file needs triage. import 'dart:async'; import 'dart:ui' as ui; diff --git a/packages/flutter/test/material/tooltip_test.dart b/packages/flutter/test/material/tooltip_test.dart index d84a6a0523..b03a0a4c97 100644 --- a/packages/flutter/test/material/tooltip_test.dart +++ b/packages/flutter/test/material/tooltip_test.dart @@ -139,7 +139,7 @@ void main() { final RenderBox tip = tester.renderObject(find.text(tooltipText)).parent.parent.parent.parent.parent; expect(tip.size.height, equals(24.0)); // 14.0 height + 5.0 padding * 2 (top, bottom) expect(tip.localToGlobal(tip.size.topLeft(Offset.zero)), equals(const Offset(10.0, 20.0))); - }); + }, skip: isBrowser); testWidgets('Does tooltip end up in the right place - center prefer above fits', (WidgetTester tester) async { final GlobalKey key = GlobalKey(); @@ -366,7 +366,7 @@ void main() { expect(tip.localToGlobal(tip.size.topLeft(Offset.zero)).dy, equals(310.0)); expect(tip.localToGlobal(tip.size.bottomRight(Offset.zero)).dx, equals(790.0)); expect(tip.localToGlobal(tip.size.bottomRight(Offset.zero)).dy, equals(324.0)); - }); + }, skip: isBrowser); testWidgets('Does tooltip end up in the right place - near the edge', (WidgetTester tester) async { final GlobalKey key = GlobalKey(); @@ -421,7 +421,7 @@ void main() { expect(tip.localToGlobal(tip.size.topLeft(Offset.zero)).dy, equals(310.0)); expect(tip.localToGlobal(tip.size.bottomRight(Offset.zero)).dx, equals(790.0)); expect(tip.localToGlobal(tip.size.bottomRight(Offset.zero)).dy, equals(324.0)); - }); + }, skip: isBrowser); testWidgets('Does tooltip end up with the right default size, shape, and color', (WidgetTester tester) async { final GlobalKey key = GlobalKey(); @@ -457,7 +457,7 @@ void main() { rrect: RRect.fromRectAndRadius(tip.paintBounds, const Radius.circular(4.0)), color: const Color(0xe6616161), )); - }); + }, skip: isBrowser); testWidgets('Can tooltip decoration be customized', (WidgetTester tester) async { final GlobalKey key = GlobalKey(); @@ -497,7 +497,7 @@ void main() { expect(tip, paints..path( color: const Color(0x80800000), )); - }); + }, skip: isBrowser); testWidgets('Tooltip stays around', (WidgetTester tester) async { await tester.pumpWidget( @@ -707,7 +707,7 @@ void main() { expect(tester.getSize(find.text(tooltipText)), equals(const Size(168.0, 56.0))); tip = tester.renderObject(find.text(tooltipText)).parent; expect(tip.size.height, equals(56.0)); - }); + }, skip: isBrowser); testWidgets('Haptic feedback', (WidgetTester tester) async { final FeedbackTester feedback = FeedbackTester(); diff --git a/packages/flutter/test/widgets/image_test.dart b/packages/flutter/test/widgets/image_test.dart index 290a959f53..cd68b981a8 100644 --- a/packages/flutter/test/widgets/image_test.dart +++ b/packages/flutter/test/widgets/image_test.dart @@ -1056,7 +1056,7 @@ void main() { expect(chunkEvents.length, 4); expect(find.byType(Text), findsNothing); expect(find.byType(RawImage), findsOneWidget); - }); + }, skip: isBrowser); testWidgets('Image doesn\'t rebuild on chunk events if loadingBuilder is null', (WidgetTester tester) async { final ui.Image image = await tester.runAsync(createTestImage); @@ -1109,7 +1109,7 @@ void main() { expect(find.byType(RawImage), findsOneWidget); expect(tester.widget
(find.byType(Center)).child, isInstanceOf()); expect(tester.widget(find.byType(Padding)).child, isInstanceOf()); - }); + }, skip: isBrowser); testWidgets('Image state handles loadingBuilder update from null to non-null', (WidgetTester tester) async { final TestImageStreamCompleter streamCompleter = TestImageStreamCompleter(); @@ -1141,7 +1141,7 @@ void main() { await tester.pump(); expect(find.byType(Center), findsOneWidget); expect(find.byType(RawImage), findsOneWidget); - }); + }, skip: isBrowser); testWidgets('Image state handles loadingBuilder update from non-null to null', (WidgetTester tester) async { final TestImageStreamCompleter streamCompleter = TestImageStreamCompleter(); @@ -1174,7 +1174,7 @@ void main() { expect(tester.state(find.byType(Image)), same(state)); streamCompleter.setData(chunkEvent: const ImageChunkEvent(cumulativeBytesLoaded: 10, expectedTotalBytes: 100)); expect(tester.binding.hasScheduledFrame, isFalse); - }); + }, skip: isBrowser); } class TestImageProvider extends ImageProvider {