From 8c59c524c9e629c5396789f70476cbf27b4896d8 Mon Sep 17 00:00:00 2001 From: Kate Lovett Date: Tue, 23 Apr 2019 17:18:23 -0700 Subject: [PATCH] Swapping out matchesGoldenFile for matchesSkiaGoldFile for framework tests. --- .../flutter/test/cupertino/nav_bar_test.dart | 10 ++++++---- .../cupertino/segmented_control_test.dart | 13 ++++++++---- .../test/material/bottom_app_bar_test.dart | 10 +++++++--- .../material/bottom_app_bar_theme_test.dart | 5 +++-- .../material/bottom_navigation_bar_test.dart | 5 +++-- .../test/material/card_theme_test.dart | 5 +++-- .../test/material/dialog_theme_test.dart | 5 +++-- .../flutter/test/material/dropdown_test.dart | 10 ++++++---- .../material/floating_action_button_test.dart | 5 +++-- .../test/material/input_decorator_test.dart | 10 ++++++---- .../flutter/test/material/material_test.dart | 10 ++++++---- .../flutter/test/material/radio_test.dart | 5 +++-- .../test/material/tab_bar_theme_test.dart | 20 +++++++++++-------- 13 files changed, 70 insertions(+), 43 deletions(-) diff --git a/packages/flutter/test/cupertino/nav_bar_test.dart b/packages/flutter/test/cupertino/nav_bar_test.dart index 09419a0393..981abbd880 100644 --- a/packages/flutter/test/cupertino/nav_bar_test.dart +++ b/packages/flutter/test/cupertino/nav_bar_test.dart @@ -801,12 +801,13 @@ void main() { await expectLater( find.byType(RepaintBoundary).last, - matchesGoldenFile('nav_bar_test.standard_title.1.png'), + //matchesGoldenFile('nav_bar_test.standard_title.1.png'), + matchesSkiaGoldFile('nav_bar_test.standard_title.png'), ); }, // TODO(xster): remove once https://github.com/flutter/flutter/issues/17483 // is fixed. - skip: !Platform.isLinux, + // skip: !Platform.isLinux, ); testWidgets( @@ -835,12 +836,13 @@ void main() { await expectLater( find.byType(RepaintBoundary).last, - matchesGoldenFile('nav_bar_test.large_title.1.png'), + // matchesGoldenFile('nav_bar_test.large_title.1.png'), + matchesSkiaGoldFile('nav_bar_test.large_title.png'), ); }, // TODO(xster): remove once https://github.com/flutter/flutter/issues/17483 // is fixed. - skip: !Platform.isLinux, + // skip: !Platform.isLinux, ); diff --git a/packages/flutter/test/cupertino/segmented_control_test.dart b/packages/flutter/test/cupertino/segmented_control_test.dart index 1214541640..479d7d1b7e 100644 --- a/packages/flutter/test/cupertino/segmented_control_test.dart +++ b/packages/flutter/test/cupertino/segmented_control_test.dart @@ -1327,9 +1327,11 @@ void main() { await expectLater( find.byType(RepaintBoundary), - matchesGoldenFile('segmented_control_test.0.0.png'), + // matchesGoldenFile('segmented_control_test.0.0.png'), + matchesSkiaGoldFile('segmented_control_test.0.png'), ); - }, skip: !Platform.isLinux); + }, //skip: !Platform.isLinux + ); testWidgets('Golden Test Pressed State', (WidgetTester tester) async { final Map children = {}; @@ -1365,7 +1367,10 @@ void main() { await expectLater( find.byType(RepaintBoundary), - matchesGoldenFile('segmented_control_test.1.0.png'), + // matchesGoldenFile('segmented_control_test.1.0.png'), + matchesSkiaGoldFile('segmented_control_test.1.png'), ); - }, skip: !Platform.isLinux); + }, + // skip: !Platform.isLinux + ); } diff --git a/packages/flutter/test/material/bottom_app_bar_test.dart b/packages/flutter/test/material/bottom_app_bar_test.dart index 92929cfe40..6f9ace8c55 100644 --- a/packages/flutter/test/material/bottom_app_bar_test.dart +++ b/packages/flutter/test/material/bottom_app_bar_test.dart @@ -73,15 +73,19 @@ void main() { await pump(FloatingActionButtonLocation.endDocked); await expectLater( find.byKey(key), - matchesGoldenFile('bottom_app_bar.custom_shape.1.png'), + // matchesGoldenFile('bottom_app_bar.custom_shape.1.png'), + matchesSkiaGoldFile('bottom_app_bar.custom_shape.1.png'), ); await pump(FloatingActionButtonLocation.centerDocked); await tester.pumpAndSettle(); await expectLater( find.byKey(key), - matchesGoldenFile('bottom_app_bar.custom_shape.2.png'), + // matchesGoldenFile('bottom_app_bar.custom_shape.2.png'), + matchesSkiaGoldFile('bottom_app_bar.custom_shape.2.png'), ); - }, skip: !Platform.isLinux); + }, + // skip: !Platform.isLinux + ); 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 0dd0fb77cc..ff456aba12 100644 --- a/packages/flutter/test/material/bottom_app_bar_theme_test.dart +++ b/packages/flutter/test/material/bottom_app_bar_theme_test.dart @@ -82,8 +82,9 @@ void main() { await expectLater( find.byKey(_painterKey), - matchesGoldenFile('bottom_app_bar_theme.custom_shape.png'), - skip: !Platform.isLinux, + matchesSkiaGoldFile('bottom_app_bar_theme.custom_shape.png'), + //matchesGoldenFile('bottom_app_bar_theme.custom_shape.png'), + //skip: !Platform.isLinux, ); }); diff --git a/packages/flutter/test/material/bottom_navigation_bar_test.dart b/packages/flutter/test/material/bottom_navigation_bar_test.dart index 76f1206de4..2d205ffdd6 100644 --- a/packages/flutter/test/material/bottom_navigation_bar_test.dart +++ b/packages/flutter/test/material/bottom_navigation_bar_test.dart @@ -1148,8 +1148,9 @@ void main() { await tester.pump(const Duration(milliseconds: 30)); await expectLater( find.byType(BottomNavigationBar), - matchesGoldenFile('bottom_navigation_bar.shifting_transition.2.$pump.png'), - skip: !Platform.isLinux, + matchesSkiaGoldFile('bottom_navigation_bar.shifting_transition.$pump.png'), + // matchesGoldenFile('bottom_navigation_bar.shifting_transition.2.$pump.png'), + // skip: !Platform.isLinux, ); } }); diff --git a/packages/flutter/test/material/card_theme_test.dart b/packages/flutter/test/material/card_theme_test.dart index d45de99831..10904f4c85 100644 --- a/packages/flutter/test/material/card_theme_test.dart +++ b/packages/flutter/test/material/card_theme_test.dart @@ -139,8 +139,9 @@ void main() { await expectLater( find.byKey(painterKey), - matchesGoldenFile('card_theme.custom_shape.png'), - skip: !Platform.isLinux, + matchesSkiaGoldFile('card_theme.custom_shape.png'), + // matchesGoldenFile('card_theme.custom_shape.png'), + // skip: !Platform.isLinux, ); }); } diff --git a/packages/flutter/test/material/dialog_theme_test.dart b/packages/flutter/test/material/dialog_theme_test.dart index c682fdcd3e..9979452618 100644 --- a/packages/flutter/test/material/dialog_theme_test.dart +++ b/packages/flutter/test/material/dialog_theme_test.dart @@ -132,8 +132,9 @@ void main() { await expectLater( find.byKey(_painterKey), - matchesGoldenFile('dialog_theme.dialog_with_custom_border.png'), - skip: !Platform.isLinux, + matchesSkiaGoldFile('dialog_theme.dialog_with_custom_border.png'), + // matchesGoldenFile('dialog_theme.dialog_with_custom_border.png'), + // skip: !Platform.isLinux, ); }); diff --git a/packages/flutter/test/material/dropdown_test.dart b/packages/flutter/test/material/dropdown_test.dart index a5730c66c6..a6eaf3912a 100644 --- a/packages/flutter/test/material/dropdown_test.dart +++ b/packages/flutter/test/material/dropdown_test.dart @@ -141,8 +141,9 @@ void main() { assert(tester.renderObject(buttonFinder).attached); await expectLater( find.ancestor(of: buttonFinder, matching: find.byType(RepaintBoundary)).first, - matchesGoldenFile('dropdown_test.default.0.png'), - skip: !Platform.isLinux, + matchesSkiaGoldFile('dropdown_test.default.png'), + // matchesGoldenFile('dropdown_test.default.0.png'), + // skip: !Platform.isLinux, ); }); @@ -154,8 +155,9 @@ void main() { assert(tester.renderObject(buttonFinder).attached); await expectLater( find.ancestor(of: buttonFinder, matching: find.byType(RepaintBoundary)).first, - matchesGoldenFile('dropdown_test.expanded.0.png'), - skip: !Platform.isLinux, + matchesSkiaGoldFile('dropdown_test.expanded.png'), + // matchesGoldenFile('dropdown_test.expanded.0.png'), + // skip: !Platform.isLinux, ); }); diff --git a/packages/flutter/test/material/floating_action_button_test.dart b/packages/flutter/test/material/floating_action_button_test.dart index b72eff8172..9bdd294108 100644 --- a/packages/flutter/test/material/floating_action_button_test.dart +++ b/packages/flutter/test/material/floating_action_button_test.dart @@ -681,8 +681,9 @@ void main() { await tester.pump(const Duration(milliseconds: 1000)); await expectLater( find.byKey(key), - matchesGoldenFile('floating_action_button_test.clip.2.png'), // .clip.1.png is obsolete and can be removed - skip: !Platform.isLinux, + matchesSkiaGoldFile('floating_action_button_test.clip.png'), + // matchesGoldenFile('floating_action_button_test.clip.2.png'), // .clip.1.png is obsolete and can be removed + // skip: !Platform.isLinux, ); }); diff --git a/packages/flutter/test/material/input_decorator_test.dart b/packages/flutter/test/material/input_decorator_test.dart index 6697d22483..1df2e5b5bd 100644 --- a/packages/flutter/test/material/input_decorator_test.dart +++ b/packages/flutter/test/material/input_decorator_test.dart @@ -2020,15 +2020,17 @@ void main() { await tester.pumpWidget(buildFrame(TextDirection.ltr)); await expectLater( find.byType(InputDecorator), - matchesGoldenFile('input_decorator.outline_icon_label.ltr.png'), - skip: !Platform.isLinux, + matchesSkiaGoldFile('input_decorator.outline_icon_label.ltr.png'), + // matchesGoldenFile('input_decorator.outline_icon_label.ltr.png'), + // skip: !Platform.isLinux, ); await tester.pumpWidget(buildFrame(TextDirection.rtl)); await expectLater( find.byType(InputDecorator), - matchesGoldenFile('input_decorator.outline_icon_label.rtl.png'), - skip: !Platform.isLinux, + matchesSkiaGoldFile('input_decorator.outline_icon_label.rtl.png'), + // matchesGoldenFile('input_decorator.outline_icon_label.rtl.png'), + // skip: !Platform.isLinux, ); }, skip: !Platform.isLinux, diff --git a/packages/flutter/test/material/material_test.dart b/packages/flutter/test/material/material_test.dart index 2299e9b3ef..6b2db35815 100644 --- a/packages/flutter/test/material/material_test.dart +++ b/packages/flutter/test/material/material_test.dart @@ -618,8 +618,9 @@ void main() { await expectLater( find.byKey(painterKey), - matchesGoldenFile('material.border_paint_above.png'), - skip: !Platform.isLinux, + matchesSkiaGoldFile('material.border_paint_above.png'), + // matchesGoldenFile('material.border_paint_above.png'), + // skip: !Platform.isLinux, ); }); @@ -659,8 +660,9 @@ void main() { await expectLater( find.byKey(painterKey), - matchesGoldenFile('material.border_paint_below.png'), - skip: !Platform.isLinux, + matchesSkiaGoldFile('material.border_paint_below.png'), + // matchesGoldenFile('material.border_paint_below.png'), + // skip: !Platform.isLinux, ); }); }); diff --git a/packages/flutter/test/material/radio_test.dart b/packages/flutter/test/material/radio_test.dart index 3be3d203f9..0c7d88119a 100644 --- a/packages/flutter/test/material/radio_test.dart +++ b/packages/flutter/test/material/radio_test.dart @@ -277,8 +277,9 @@ void main() { await tester.pumpAndSettle(); await expectLater( find.byKey(painterKey), - matchesGoldenFile('radio.ink_ripple.png'), - skip: !Platform.isLinux, + matchesSkiaGoldFile('radio.ink_ripple.png'), + // matchesGoldenFile('radio.ink_ripple.png'), + // skip: !Platform.isLinux, ); }); } diff --git a/packages/flutter/test/material/tab_bar_theme_test.dart b/packages/flutter/test/material/tab_bar_theme_test.dart index 23fef94a1b..83aacd1474 100644 --- a/packages/flutter/test/material/tab_bar_theme_test.dart +++ b/packages/flutter/test/material/tab_bar_theme_test.dart @@ -269,8 +269,9 @@ void main() { await expectLater( find.byKey(_painterKey), - matchesGoldenFile('tab_bar_theme.tab_indicator_size_tab.png'), - skip: !Platform.isLinux, + matchesSkiaGoldFile('tab_bar_theme.tab_indicator_size_tab.png'), + // matchesGoldenFile('tab_bar_theme.tab_indicator_size_tab.png'), + // skip: !Platform.isLinux, ); }); @@ -281,8 +282,9 @@ void main() { await expectLater( find.byKey(_painterKey), - matchesGoldenFile('tab_bar_theme.tab_indicator_size_label.png'), - skip: !Platform.isLinux, + matchesSkiaGoldFile('tab_bar_theme.tab_indicator_size_label.png'), + // matchesGoldenFile('tab_bar_theme.tab_indicator_size_label.png'), + // skip: !Platform.isLinux, ); }); @@ -298,8 +300,9 @@ void main() { await expectLater( find.byKey(_painterKey), - matchesGoldenFile('tab_bar_theme.custom_tab_indicator.png'), - skip: !Platform.isLinux, + matchesSkiaGoldFile('tab_bar_theme.custom_tab_indicator.png'), + // matchesGoldenFile('tab_bar_theme.custom_tab_indicator.png'), + // skip: !Platform.isLinux, ); }); @@ -315,8 +318,9 @@ void main() { await expectLater( find.byKey(_painterKey), - matchesGoldenFile('tab_bar_theme.beveled_rect_indicator.png'), - skip: !Platform.isLinux, + matchesSkiaGoldFile('tab_bar_theme.beveled_rect_indicator.png'), + // matchesGoldenFile('tab_bar_theme.beveled_rect_indicator.png'), + // skip: !Platform.isLinux, ); }); }