Unverified Commit 5d5175b0 authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Skip Audit - Material Library (#54322)

parent 418007d1
......@@ -91,7 +91,7 @@ void main() {
findsOneWidget,
);
expect(find.text('Pirate license'), findsOneWidget);
}, skip: isBrowser);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/54385
testWidgets('About box logic defaults to executable name for app name', (WidgetTester tester) async {
await tester.pumpWidget(
......@@ -138,7 +138,7 @@ void main() {
expect(find.text('BBB'), findsOneWidget);
expect(find.text('Another package'), findsOneWidget);
expect(find.text('Another license'), findsOneWidget);
}, skip: isBrowser);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/54385
testWidgets('LicensePage control test with all properties', (WidgetTester tester) async {
const FlutterLogo logo = FlutterLogo();
......@@ -199,7 +199,7 @@ void main() {
expect(find.text('BBB'), findsOneWidget);
expect(find.text('Another package'), findsOneWidget);
expect(find.text('Another license'), findsOneWidget);
}, skip: isBrowser);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/54385
testWidgets('LicensePage respects the notch', (WidgetTester tester) async {
const double safeareaPadding = 27.0;
......@@ -224,7 +224,7 @@ void main() {
await tester.pumpAndSettle();
expect(tester.getTopLeft(find.text('DEF')), const Offset(8.0 + safeareaPadding, 287.0));
}, skip: isBrowser);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/54385
testWidgets('LicensePage returns early if unmounted', (WidgetTester tester) async {
final Completer<LicenseEntry> licenseCompleter = Completer<LicenseEntry>();
......@@ -249,7 +249,7 @@ void main() {
final FakeLicenseEntry licenseEntry = FakeLicenseEntry();
licenseCompleter.complete(licenseEntry);
expect(licenseEntry.paragraphsCalled, false);
}, skip: isBrowser);
});
testWidgets('LicensePage returns late if unmounted', (WidgetTester tester) async {
final Completer<LicenseEntry> licenseCompleter = Completer<LicenseEntry>();
......@@ -274,7 +274,7 @@ void main() {
await tester.pumpAndSettle();
expect(licenseEntry.paragraphsCalled, true);
}, skip: isBrowser);
});
testWidgets('LicensePage logic defaults to executable name for app name', (WidgetTester tester) async {
await tester.pumpWidget(
......
......@@ -79,7 +79,8 @@ void main() {
find.byKey(key),
matchesGoldenFile('bottom_app_bar.custom_shape.2.png'),
);
}, skip: isBrowser);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/51675,
// https://github.com/flutter/flutter/issues/44572
testWidgets('color defaults to Theme.bottomAppBarColor', (WidgetTester tester) async {
await tester.pumpWidget(
......
......@@ -170,7 +170,7 @@ void main() {
expect(tester.widget<Material>(find.byType(Material)).shape, shape);
expect(tester.widget<Material>(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;
......
......@@ -497,7 +497,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();
......@@ -618,7 +618,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();
......@@ -652,7 +652,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();
......@@ -876,7 +876,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();
......@@ -992,7 +992,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('Chip creates centered, unique ripple when label is tapped', (WidgetTester tester) async {
// Creates a chip with a delete button.
......@@ -1046,7 +1046,7 @@ void main() {
expect(findTooltipContainer('Delete'), findsNothing);
await gesture.up();
}, skip: isBrowser);
});
testWidgets('Delete button creates non-centered, unique ripple when tapped', (WidgetTester tester) async {
// Creates a chip with a delete button.
......@@ -1104,7 +1104,7 @@ void main() {
expect(findTooltipContainer('Delete'), findsOneWidget);
await gesture.up();
}, skip: isBrowser);
});
testWidgets('RTL delete button responds to tap on the left of the chip', (WidgetTester tester) async {
// Creates an RTL chip with a delete button.
......@@ -1134,7 +1134,7 @@ void main() {
expect(findTooltipContainer('Delete'), findsOneWidget);
await gesture.up();
}, skip: isBrowser);
});
testWidgets('Chip without delete button creates correct ripple', (WidgetTester tester) async {
// Creates a chip with a delete button.
......@@ -1188,7 +1188,7 @@ void main() {
expect(findTooltipContainer('Delete'), findsNothing);
await gesture.up();
}, skip: isBrowser);
});
testWidgets('Selection with avatar works as expected on RawChip', (WidgetTester tester) async {
bool selected = false;
......@@ -1271,7 +1271,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;
......@@ -1347,7 +1347,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;
......@@ -1472,7 +1472,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(
......@@ -2105,7 +2105,7 @@ void main() {
], excludes: <Offset>[
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
......
......@@ -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);
......
......@@ -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;
......
......@@ -2336,7 +2336,7 @@ void main() {
final Element element = tester.element(find.byKey(const ValueKey<String>('two')).last);
final FocusNode node = Focus.of(element);
expect(node.hasFocus, isTrue);
}, skip: kIsWeb);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/55320
testWidgets('Selected element is correctly focused with dropdown that more items than fit on the screen', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(debugLabel: 'DropdownButton');
......@@ -2399,7 +2399,7 @@ void main() {
final Element element = tester.element(find.byKey(const ValueKey<int>(42)).last);
final FocusNode node = Focus.of(element);
expect(node.hasFocus, isTrue);
}, skip: kIsWeb);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/55320
testWidgets("Having a focused element doesn't interrupt scroll when flung by touch", (WidgetTester tester) async {
final FocusNode focusNode = FocusNode(debugLabel: 'DropdownButton');
......@@ -2473,7 +2473,7 @@ void main() {
// Scrolling to the top again has removed the one the focus was on from the
// tree, causing it to lose focus.
expect(Focus.of(tester.element(find.byKey(const ValueKey<int>(91)).last)).hasPrimaryFocus, isFalse);
}, skip: kIsWeb);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/55320
testWidgets('DropdownButton onTap callback is called when defined', (WidgetTester tester) async {
int dropdownButtonTapCounter = 0;
......
......@@ -153,8 +153,8 @@ void main() {
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
await expectLater(tester, meetsGuideline(textContrastGuideline));
},
skip: isBrowser, // https://github.com/flutter/flutter/issues/44115
semanticsEnabled: true,
skip: isBrowser,
);
testWidgets('FlatButton with colored theme meets a11y contrast guidelines', (WidgetTester tester) async {
......@@ -218,8 +218,8 @@ void main() {
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
await expectLater(tester, meetsGuideline(textContrastGuideline));
},
skip: isBrowser, // https://github.com/flutter/flutter/issues/44115
semanticsEnabled: true,
skip: isBrowser,
);
testWidgets('FlatButton uses stateful color for text color in different states', (WidgetTester tester) async {
......@@ -571,7 +571,7 @@ void main() {
expect(tester.getSize(find.byType(FlatButton)).height, equals(48.0));
expect(tester.getSize(find.byType(Text)).width, isIn(<double>[126.0, 127.0]));
expect(tester.getSize(find.byType(Text)).height, equals(42.0));
}, skip: isBrowser);
});
testWidgets('FlatButton size is configurable by ThemeData.materialTapTargetSize', (WidgetTester tester) async {
final Key key1 = UniqueKey();
......
......@@ -216,7 +216,7 @@ void main() {
await tester.pumpWidget(buildFrame(TargetPlatform.macOS, 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) {
......@@ -284,7 +284,7 @@ void main() {
await tester.pumpWidget(buildFrame(TargetPlatform.linux, true));
expect(getTitleBottomLeft(), const Offset(390.0, 0.0));
}, skip: isBrowser);
});
}
class TestDelegate extends SliverPersistentHeaderDelegate {
......
......@@ -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);
});
}
......
......@@ -250,7 +250,7 @@ void main() {
expect(box, isNot(paints..circle()));
await gesture.up();
}, skip: isBrowser);
});
testWidgets('The InkWell widget renders an SelectAction or ActivateAction-induced ink ripple', (WidgetTester tester) async {
const Color highlightColor = Color(0xAAFF0000);
......
......@@ -3671,7 +3671,7 @@ void main() {
)
..restore(),
);
}, skip: isBrowser);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/55317
testWidgets('OutlineInputBorder radius carries over when lerping', (WidgetTester tester) async {
// This is a regression test for https://github.com/flutter/flutter/issues/23982
......
......@@ -194,7 +194,7 @@ void main() {
testChildren();
testHorizontalGeometry();
testVerticalGeometry(128.0);
}, skip: isBrowser);
});
testWidgets('ListTile geometry (RTL)', (WidgetTester tester) async {
const double leftPadding = 10.0;
......@@ -806,7 +806,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
......
......@@ -260,8 +260,8 @@ void main() {
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
await expectLater(tester, meetsGuideline(textContrastGuideline));
},
skip: isBrowser, // https://github.com/flutter/flutter/issues/44115
semanticsEnabled: true,
skip: isBrowser,
);
testWidgets('MaterialButton gets focus when autofocus is set.', (WidgetTester tester) async {
......@@ -596,7 +596,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 }) {
......
......@@ -200,8 +200,8 @@ void main() {
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
await expectLater(tester, meetsGuideline(textContrastGuideline));
},
skip: isBrowser, // https://github.com/flutter/flutter/issues/44115
semanticsEnabled: true,
skip: isBrowser,
);
testWidgets('OutlineButton with colored theme meets a11y contrast guidelines', (WidgetTester tester) async {
......@@ -265,7 +265,7 @@ void main() {
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
await expectLater(tester, meetsGuideline(textContrastGuideline));
},
skip: isBrowser,
skip: isBrowser, // https://github.com/flutter/flutter/issues/44115
semanticsEnabled: true,
);
......@@ -747,7 +747,7 @@ void main() {
clipPath: clipPath,
clipRect: clipRect,
);
}, skip: isBrowser);
});
testWidgets('OutlineButton has no clip by default', (WidgetTester tester) async {
final GlobalKey buttonKey = GlobalKey();
......@@ -882,7 +882,7 @@ void main() {
expect(tester.getSize(find.byType(FlatButton)).height, equals(48.0));
expect(tester.getSize(find.byType(Text)).width, isIn(<double>[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) {
......
......@@ -262,7 +262,7 @@ void main() {
expect(find.text('501'), findsOneWidget);
// Test that it fits:
expect(tester.getTopRight(find.text('501')).dx, greaterThanOrEqualTo(tester.getTopRight(find.text('Rows per page:')).dx + 40.0));
}, skip: isBrowser); // TODO(yjbanov): https://github.com/flutter/flutter/issues/43433
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/43433
testWidgets('PaginatedDataTable footer scrolls', (WidgetTester tester) async {
final TestDataSource source = TestDataSource();
......
......@@ -155,7 +155,7 @@ void main() {
await tester.pump(const Duration(milliseconds: 800)); // Wait for splash and highlight to be well under way.
await expectLater(tester, meetsGuideline(textContrastGuideline));
},
skip: isBrowser,
skip: isBrowser, // https://github.com/flutter/flutter/issues/44115
semanticsEnabled: true,
);
......
......@@ -1340,7 +1340,7 @@ void main() {
await gesture.up();
await tester.pumpAndSettle();
}, skip: isBrowser);
});
testWidgets('Slider respects textScaleFactor', (WidgetTester tester) async {
final Key sliderKey = UniqueKey();
......@@ -1439,7 +1439,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({
......
......@@ -607,7 +607,7 @@ void main() {
)
);
await gesture.up();
}, skip: isBrowser);
});
testWidgets('Default paddle slider value indicator shape draws correctly', (WidgetTester tester) async {
final ThemeData theme = ThemeData(
......@@ -784,7 +784,7 @@ 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);
......
......@@ -468,7 +468,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(
'Custom padding between SnackBar and its contents when set to SnackBarBehavior.fixed',
......@@ -523,9 +523,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(
......@@ -630,7 +628,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(
'Custom padding between SnackBar and its contents when set to SnackBarBehavior.floating',
......@@ -688,9 +686,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('SnackBarClosedReason', (WidgetTester tester) async {
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
......
......@@ -249,7 +249,7 @@ void main() {
);
expect(tester.renderObject<RenderParagraph>(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(
......@@ -257,7 +257,7 @@ void main() {
);
expect(tester.renderObject<RenderParagraph>(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, iconMargin and text', (WidgetTester tester) async {
await tester.pumpWidget(
......@@ -281,7 +281,7 @@ void main() {
);
expect(tester.renderObject<RenderParagraph>(find.byType(RichText)).text.style.fontFamily, 'Ahem');
expect(tester.getSize(find.byType(Tab)), const Size(210.0, 72.0));
}, skip: isBrowser);
});
testWidgets('Tab sizing - icon and child', (WidgetTester tester) async {
await tester.pumpWidget(
......@@ -289,7 +289,7 @@ void main() {
);
expect(tester.renderObject<RenderParagraph>(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 <Widget>[SizedBox.shrink()], controller: TabController(length: 1, vsync: tester));
......@@ -412,7 +412,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<String> tabs = <String>['AAAAAA', 'BBBBBB', 'CCCCCC', 'DDDDDD', 'EEEEEE'];
......@@ -1671,7 +1671,7 @@ void main() {
expect(semantics, hasSemantics(expectedSemantics));
semantics.dispose();
}, skip: isBrowser);
});
testWidgets('correct scrolling semantics', (WidgetTester tester) async {
final SemanticsTester semantics = SemanticsTester(tester);
......@@ -1939,7 +1939,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;
......
......@@ -447,7 +447,7 @@ void main() {
find.byType(Overlay),
matchesGoldenFile('text_field_opacity_test.0.png'),
);
}, skip: isBrowser);
});
testWidgets('text field toolbar options correctly changes options',
(WidgetTester tester) async {
......@@ -496,7 +496,9 @@ void main() {
expect(find.text('Copy'), findsOneWidget);
expect(find.text('Cut'), findsNothing);
expect(find.text('Select All'), findsNothing);
}, skip: isBrowser, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS, TargetPlatform.macOS }));
},
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS, TargetPlatform.macOS }),
);
testWidgets('text selection style 1', (WidgetTester tester) async {
final TextEditingController controller = TextEditingController(
......@@ -625,7 +627,14 @@ void main() {
expect(find.text('COPY'), findsOneWidget);
expect(find.text('CUT'), findsNothing);
expect(find.text('SELECT ALL'), findsNothing);
}, skip: isBrowser, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android, TargetPlatform.fuchsia, TargetPlatform.linux, TargetPlatform.windows }));
},
variant: const TargetPlatformVariant(<TargetPlatform>{
TargetPlatform.android,
TargetPlatform.fuchsia,
TargetPlatform.linux,
TargetPlatform.windows,
}),
);
testWidgets('cursor layout has correct width', (WidgetTester tester) async {
EditableText.debugDeterministicCursor = true;
......@@ -2917,7 +2926,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(
......
......@@ -303,7 +303,7 @@ void main() {
await tester.pump(const Duration(milliseconds: 200));
expect(renderEditable, paintsExactlyCountTimes(#drawRect, 0));
}, skip: isBrowser); // we do not use Flutter-rendered context menu on the Web
}, skip: isBrowser); // We do not use Flutter-rendered context menu on the Web
testWidgets('onTap is called upon tap', (WidgetTester tester) async {
int tapCount = 0;
......
......@@ -123,7 +123,10 @@ void main() {
expect(find.text('PASTE'), findsOneWidget);
expect(find.text('SELECT ALL'), findsOneWidget);
expect(find.byType(IconButton), findsNothing);
}, skip: isBrowser, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }));
},
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }),
);
testWidgets('When menu items don\'t fit, an overflow menu is used.', (WidgetTester tester) async {
// Set the screen size to more narrow, so that SELECT ALL can't fit.
......@@ -194,7 +197,10 @@ void main() {
expect(find.text('PASTE'), findsOneWidget);
expect(find.text('SELECT ALL'), findsNothing);
expect(find.byType(IconButton), findsOneWidget);
}, skip: isBrowser, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }));
},
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }),
);
testWidgets('A smaller menu bumps more items to the overflow menu.', (WidgetTester tester) async {
// Set the screen size so narrow that only CUT and COPY can fit.
......@@ -256,7 +262,10 @@ void main() {
expect(find.text('PASTE'), findsNothing);
expect(find.text('SELECT ALL'), findsNothing);
expect(find.byType(IconButton), findsOneWidget);
}, skip: isBrowser, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }));
},
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }),
);
testWidgets('When the menu renders below the text, the overflow menu back button is at the top.', (WidgetTester tester) async {
// Set the screen size to more narrow, so that SELECT ALL can't fit.
......@@ -327,7 +336,10 @@ void main() {
expect(find.text('PASTE'), findsOneWidget);
expect(find.text('SELECT ALL'), findsNothing);
expect(find.byType(IconButton), findsOneWidget);
}, skip: isBrowser, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }));
},
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }),
);
testWidgets('When the menu items change, the menu is closed and _closedWidth reset.', (WidgetTester tester) async {
// Set the screen size to more narrow, so that SELECT ALL can't fit.
......@@ -430,7 +442,10 @@ void main() {
expect(find.byType(IconButton), findsNothing);
final Offset newCutOffset = tester.getTopLeft(find.text('CUT'));
expect(newCutOffset, equals(cutOffset));
}, skip: isBrowser, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }));
},
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }),
);
});
group('menu position', () {
......@@ -501,7 +516,10 @@ void main() {
final Offset bottomHandlePos = endpoints[1].point;
final Offset cutOffset = tester.getTopLeft(find.text('CUT'));
expect(cutOffset.dy, greaterThan(bottomHandlePos.dy));
}, skip: isBrowser, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }));
},
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android }),
);
});
group('material handles', () {
......
......@@ -149,7 +149,7 @@ void main() {
);
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();
......@@ -384,7 +384,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();
......@@ -441,7 +441,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('Custom tooltip margin', (WidgetTester tester) async {
const double _customMarginValue = 10.0;
......@@ -677,7 +677,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();
......@@ -718,7 +718,7 @@ void main() {
expect(tip, paints..path(
color: const Color(0x80800000),
));
}, skip: isBrowser);
});
testWidgets('Tooltip stays after long press', (WidgetTester tester) async {
await tester.pumpWidget(
......@@ -946,7 +946,7 @@ void main() {
_findTooltipContainer(tooltipText),
);
expect(tip.size.height, equals(56.0));
}, skip: isBrowser);
});
testWidgets('Haptic feedback', (WidgetTester tester) async {
final FeedbackTester feedback = FeedbackTester();
......
......@@ -684,7 +684,7 @@ void main() {
expect(tip, paints..path(
color: const Color(0x80800000),
));
}, skip: isBrowser);
});
testWidgets('Tooltip decoration - TooltipTheme', (WidgetTester tester) async {
final GlobalKey key = GlobalKey();
......@@ -726,7 +726,7 @@ void main() {
expect(tip, paints..path(
color: const Color(0x80800000),
));
}, skip: isBrowser);
});
testWidgets('Tooltip height and padding - ThemeData.tooltipTheme', (WidgetTester tester) async {
final GlobalKey key = GlobalKey();
......@@ -773,7 +773,7 @@ void main() {
expect(tip.size.height, equals(customTooltipHeight));
expect(content.size.height, equals(customTooltipHeight - 2 * customPaddingVal));
expect(content.size.width, equals(tip.size.width - 2 * customPaddingVal));
}, skip: isBrowser);
});
testWidgets('Tooltip height and padding - TooltipTheme', (WidgetTester tester) async {
final GlobalKey key = GlobalKey();
......@@ -818,7 +818,7 @@ void main() {
expect(tip.size.height, equals(customTooltipHeight));
expect(content.size.height, equals(customTooltipHeight - 2 * customPaddingValue));
expect(content.size.width, equals(tip.size.width - 2 * customPaddingValue));
}, skip: isBrowser);
});
testWidgets('Tooltip waitDuration - ThemeData.tooltipTheme', (WidgetTester tester) async {
const Duration customWaitDuration = Duration(milliseconds: 500);
......
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