diff --git a/bin/internal/goldens.version b/bin/internal/goldens.version index 7c56447cfe..cf8c5a576c 100644 --- a/bin/internal/goldens.version +++ b/bin/internal/goldens.version @@ -1 +1 @@ -35f172d7c241a8112db53dd9ee3c29a13cf19eb8 +4948d5d7c0e07d092bd38511e5e159007425ec48 diff --git a/packages/flutter/test/cupertino/segmented_control_test.dart b/packages/flutter/test/cupertino/segmented_control_test.dart index fef16ac18e..f168176aec 100644 --- a/packages/flutter/test/cupertino/segmented_control_test.dart +++ b/packages/flutter/test/cupertino/segmented_control_test.dart @@ -1165,13 +1165,6 @@ void main() { }); testWidgets('Golden Test Placeholder Widget', (WidgetTester tester) async { - // Different machines render this content differently. Since the golden - // files are rendered on MacOS, this test should only be run on MacOS. - // If the golden files are regenerated on another OS, please change this - // test to only run on that OS. - if (Platform.isMacOS) - return; - final Map children = {}; children[0] = new Container(); children[1] = const Placeholder(); @@ -1200,16 +1193,9 @@ void main() { find.byType(RepaintBoundary), matchesGoldenFile('segmented_control_test.0.0.png'), ); - }); + }, skip: !Platform.isLinux); testWidgets('Golden Test Pressed State', (WidgetTester tester) async { - // Different machines render this content differently. Since the golden - // files are rendered on MacOS, this test should only be run on MacOS. - // If the golden files are regenerated on another OS, please change this - // test to only run on that OS. - if (!Platform.isMacOS) - return; - final Map children = {}; children[0] = const Text('A'); children[1] = const Text('B'); @@ -1242,5 +1228,5 @@ void main() { find.byType(RepaintBoundary), matchesGoldenFile('segmented_control_test.1.0.png'), ); - }); + }, skip: !Platform.isLinux); } diff --git a/packages/flutter/test/widgets/text_golden_test.dart b/packages/flutter/test/widgets/text_golden_test.dart index 5fb3444aad..51859a4782 100644 --- a/packages/flutter/test/widgets/text_golden_test.dart +++ b/packages/flutter/test/widgets/text_golden_test.dart @@ -11,8 +11,8 @@ import 'package:flutter/widgets.dart'; void main() { testWidgets('Centered text', (WidgetTester tester) async { await tester.pumpWidget( - new RepaintBoundary( - child: new Center( + new Center( + child: new RepaintBoundary( child: new Container( width: 200.0, height: 100.0, @@ -32,12 +32,11 @@ void main() { await expectLater( find.byType(Container), matchesGoldenFile('text_golden.Centered.png'), - skip: !Platform.isLinux, ); await tester.pumpWidget( - new RepaintBoundary( - child: new Center( + new Center( + child: new RepaintBoundary( child: new Container( width: 200.0, height: 100.0, @@ -57,20 +56,22 @@ void main() { await expectLater( find.byType(Container), matchesGoldenFile('text_golden.Centered.wrap.png'), - skip: !Platform.isLinux, ); - }); + }, skip: !Platform.isLinux); testWidgets('Text Foreground', (WidgetTester tester) async { const Color black = const Color(0xFF000000); const Color red = const Color(0xFFFF0000); const Color blue = const Color(0xFF0000FF); - final Shader linearGradient = const LinearGradient(colors: [red, blue]).createShader(new Rect.fromLTWH(0.0, 0.0, 50.0, 20.0)); + final Shader linearGradient = const LinearGradient( + colors: const [red, blue], + ).createShader(new Rect.fromLTWH(0.0, 0.0, 50.0, 20.0)); await tester.pumpWidget( - new RepaintBoundary( - child: new Center( + new Align( + alignment: Alignment.topLeft, + child: new RepaintBoundary( child: new Text('Hello', textDirection: TextDirection.ltr, style: new TextStyle( @@ -86,16 +87,14 @@ void main() { await expectLater( find.byType(RepaintBoundary), matchesGoldenFile('text_golden.Foreground.gradient.png'), - // this was generated on MacOS and will fail on Linux - // change to !Platform.isLinux once they're properly generated - skip: true, // !Platform.isLinux, ); await tester.pumpWidget( - new RepaintBoundary( - child: new Center( - child: new Text('Hello', - textDirection: TextDirection.ltr, + new Align( + alignment: Alignment.topLeft, + child: new RepaintBoundary( + child: new Text('Hello', + textDirection: TextDirection.ltr, style: new TextStyle( foreground: new Paint() ..color = black @@ -110,16 +109,14 @@ void main() { await expectLater( find.byType(RepaintBoundary), matchesGoldenFile('text_golden.Foreground.stroke.png'), - // this was generated on MacOS and will fail on Linux - // change to !Platform.isLinux once they're properly generated - skip: true, // !Platform.isLinux, ); await tester.pumpWidget( - new RepaintBoundary( - child: new Center( - child: new Text('Hello', - textDirection: TextDirection.ltr, + new Align( + alignment: Alignment.topLeft, + child: new RepaintBoundary( + child: new Text('Hello', + textDirection: TextDirection.ltr, style: new TextStyle( foreground: new Paint() ..color = black @@ -135,11 +132,8 @@ void main() { await expectLater( find.byType(RepaintBoundary), matchesGoldenFile('text_golden.Foreground.stroke_and_gradient.png'), - // this was generated on MacOS and will fail on Linux - // change to !Platform.isLinux once they're properly generated - skip: true, // !Platform.isLinux, ); - }); + }, skip: !Platform.isLinux); testWidgets('Text Fade', (WidgetTester tester) async { await tester.pumpWidget( @@ -174,7 +168,6 @@ void main() { await expectLater( find.byType(RepaintBoundary).first, matchesGoldenFile('text_golden.Fade.1.png'), - skip: !Platform.isLinux, ); - }); + }, skip: !Platform.isLinux); }