Commit 8c59c524 authored by Kate Lovett's avatar Kate Lovett

Swapping out matchesGoldenFile for matchesSkiaGoldFile for framework tests.

parent beebd5c4
...@@ -801,12 +801,13 @@ void main() { ...@@ -801,12 +801,13 @@ void main() {
await expectLater( await expectLater(
find.byType(RepaintBoundary).last, 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 // TODO(xster): remove once https://github.com/flutter/flutter/issues/17483
// is fixed. // is fixed.
skip: !Platform.isLinux, // skip: !Platform.isLinux,
); );
testWidgets( testWidgets(
...@@ -835,12 +836,13 @@ void main() { ...@@ -835,12 +836,13 @@ void main() {
await expectLater( await expectLater(
find.byType(RepaintBoundary).last, 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 // TODO(xster): remove once https://github.com/flutter/flutter/issues/17483
// is fixed. // is fixed.
skip: !Platform.isLinux, // skip: !Platform.isLinux,
); );
......
...@@ -1327,9 +1327,11 @@ void main() { ...@@ -1327,9 +1327,11 @@ void main() {
await expectLater( await expectLater(
find.byType(RepaintBoundary), 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 { testWidgets('Golden Test Pressed State', (WidgetTester tester) async {
final Map<int, Widget> children = <int, Widget>{}; final Map<int, Widget> children = <int, Widget>{};
...@@ -1365,7 +1367,10 @@ void main() { ...@@ -1365,7 +1367,10 @@ void main() {
await expectLater( await expectLater(
find.byType(RepaintBoundary), 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);
} }
...@@ -73,15 +73,19 @@ void main() { ...@@ -73,15 +73,19 @@ void main() {
await pump(FloatingActionButtonLocation.endDocked); await pump(FloatingActionButtonLocation.endDocked);
await expectLater( await expectLater(
find.byKey(key), 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 pump(FloatingActionButtonLocation.centerDocked);
await tester.pumpAndSettle(); await tester.pumpAndSettle();
await expectLater( await expectLater(
find.byKey(key), 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 { testWidgets('color defaults to Theme.bottomAppBarColor', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
......
...@@ -82,8 +82,9 @@ void main() { ...@@ -82,8 +82,9 @@ void main() {
await expectLater( await expectLater(
find.byKey(_painterKey), find.byKey(_painterKey),
matchesGoldenFile('bottom_app_bar_theme.custom_shape.png'), matchesSkiaGoldFile('bottom_app_bar_theme.custom_shape.png'),
skip: !Platform.isLinux, //matchesGoldenFile('bottom_app_bar_theme.custom_shape.png'),
//skip: !Platform.isLinux,
); );
}); });
......
...@@ -1148,8 +1148,9 @@ void main() { ...@@ -1148,8 +1148,9 @@ void main() {
await tester.pump(const Duration(milliseconds: 30)); await tester.pump(const Duration(milliseconds: 30));
await expectLater( await expectLater(
find.byType(BottomNavigationBar), find.byType(BottomNavigationBar),
matchesGoldenFile('bottom_navigation_bar.shifting_transition.2.$pump.png'), matchesSkiaGoldFile('bottom_navigation_bar.shifting_transition.$pump.png'),
skip: !Platform.isLinux, // matchesGoldenFile('bottom_navigation_bar.shifting_transition.2.$pump.png'),
// skip: !Platform.isLinux,
); );
} }
}); });
......
...@@ -139,8 +139,9 @@ void main() { ...@@ -139,8 +139,9 @@ void main() {
await expectLater( await expectLater(
find.byKey(painterKey), find.byKey(painterKey),
matchesGoldenFile('card_theme.custom_shape.png'), matchesSkiaGoldFile('card_theme.custom_shape.png'),
skip: !Platform.isLinux, // matchesGoldenFile('card_theme.custom_shape.png'),
// skip: !Platform.isLinux,
); );
}); });
} }
......
...@@ -132,8 +132,9 @@ void main() { ...@@ -132,8 +132,9 @@ void main() {
await expectLater( await expectLater(
find.byKey(_painterKey), find.byKey(_painterKey),
matchesGoldenFile('dialog_theme.dialog_with_custom_border.png'), matchesSkiaGoldFile('dialog_theme.dialog_with_custom_border.png'),
skip: !Platform.isLinux, // matchesGoldenFile('dialog_theme.dialog_with_custom_border.png'),
// skip: !Platform.isLinux,
); );
}); });
......
...@@ -141,8 +141,9 @@ void main() { ...@@ -141,8 +141,9 @@ void main() {
assert(tester.renderObject(buttonFinder).attached); assert(tester.renderObject(buttonFinder).attached);
await expectLater( await expectLater(
find.ancestor(of: buttonFinder, matching: find.byType(RepaintBoundary)).first, find.ancestor(of: buttonFinder, matching: find.byType(RepaintBoundary)).first,
matchesGoldenFile('dropdown_test.default.0.png'), matchesSkiaGoldFile('dropdown_test.default.png'),
skip: !Platform.isLinux, // matchesGoldenFile('dropdown_test.default.0.png'),
// skip: !Platform.isLinux,
); );
}); });
...@@ -154,8 +155,9 @@ void main() { ...@@ -154,8 +155,9 @@ void main() {
assert(tester.renderObject(buttonFinder).attached); assert(tester.renderObject(buttonFinder).attached);
await expectLater( await expectLater(
find.ancestor(of: buttonFinder, matching: find.byType(RepaintBoundary)).first, find.ancestor(of: buttonFinder, matching: find.byType(RepaintBoundary)).first,
matchesGoldenFile('dropdown_test.expanded.0.png'), matchesSkiaGoldFile('dropdown_test.expanded.png'),
skip: !Platform.isLinux, // matchesGoldenFile('dropdown_test.expanded.0.png'),
// skip: !Platform.isLinux,
); );
}); });
......
...@@ -681,8 +681,9 @@ void main() { ...@@ -681,8 +681,9 @@ void main() {
await tester.pump(const Duration(milliseconds: 1000)); await tester.pump(const Duration(milliseconds: 1000));
await expectLater( await expectLater(
find.byKey(key), find.byKey(key),
matchesGoldenFile('floating_action_button_test.clip.2.png'), // .clip.1.png is obsolete and can be removed matchesSkiaGoldFile('floating_action_button_test.clip.png'),
skip: !Platform.isLinux, // matchesGoldenFile('floating_action_button_test.clip.2.png'), // .clip.1.png is obsolete and can be removed
// skip: !Platform.isLinux,
); );
}); });
......
...@@ -2020,15 +2020,17 @@ void main() { ...@@ -2020,15 +2020,17 @@ void main() {
await tester.pumpWidget(buildFrame(TextDirection.ltr)); await tester.pumpWidget(buildFrame(TextDirection.ltr));
await expectLater( await expectLater(
find.byType(InputDecorator), find.byType(InputDecorator),
matchesGoldenFile('input_decorator.outline_icon_label.ltr.png'), matchesSkiaGoldFile('input_decorator.outline_icon_label.ltr.png'),
skip: !Platform.isLinux, // matchesGoldenFile('input_decorator.outline_icon_label.ltr.png'),
// skip: !Platform.isLinux,
); );
await tester.pumpWidget(buildFrame(TextDirection.rtl)); await tester.pumpWidget(buildFrame(TextDirection.rtl));
await expectLater( await expectLater(
find.byType(InputDecorator), find.byType(InputDecorator),
matchesGoldenFile('input_decorator.outline_icon_label.rtl.png'), matchesSkiaGoldFile('input_decorator.outline_icon_label.rtl.png'),
skip: !Platform.isLinux, // matchesGoldenFile('input_decorator.outline_icon_label.rtl.png'),
// skip: !Platform.isLinux,
); );
}, },
skip: !Platform.isLinux, skip: !Platform.isLinux,
......
...@@ -618,8 +618,9 @@ void main() { ...@@ -618,8 +618,9 @@ void main() {
await expectLater( await expectLater(
find.byKey(painterKey), find.byKey(painterKey),
matchesGoldenFile('material.border_paint_above.png'), matchesSkiaGoldFile('material.border_paint_above.png'),
skip: !Platform.isLinux, // matchesGoldenFile('material.border_paint_above.png'),
// skip: !Platform.isLinux,
); );
}); });
...@@ -659,8 +660,9 @@ void main() { ...@@ -659,8 +660,9 @@ void main() {
await expectLater( await expectLater(
find.byKey(painterKey), find.byKey(painterKey),
matchesGoldenFile('material.border_paint_below.png'), matchesSkiaGoldFile('material.border_paint_below.png'),
skip: !Platform.isLinux, // matchesGoldenFile('material.border_paint_below.png'),
// skip: !Platform.isLinux,
); );
}); });
}); });
......
...@@ -277,8 +277,9 @@ void main() { ...@@ -277,8 +277,9 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
await expectLater( await expectLater(
find.byKey(painterKey), find.byKey(painterKey),
matchesGoldenFile('radio.ink_ripple.png'), matchesSkiaGoldFile('radio.ink_ripple.png'),
skip: !Platform.isLinux, // matchesGoldenFile('radio.ink_ripple.png'),
// skip: !Platform.isLinux,
); );
}); });
} }
......
...@@ -269,8 +269,9 @@ void main() { ...@@ -269,8 +269,9 @@ void main() {
await expectLater( await expectLater(
find.byKey(_painterKey), find.byKey(_painterKey),
matchesGoldenFile('tab_bar_theme.tab_indicator_size_tab.png'), matchesSkiaGoldFile('tab_bar_theme.tab_indicator_size_tab.png'),
skip: !Platform.isLinux, // matchesGoldenFile('tab_bar_theme.tab_indicator_size_tab.png'),
// skip: !Platform.isLinux,
); );
}); });
...@@ -281,8 +282,9 @@ void main() { ...@@ -281,8 +282,9 @@ void main() {
await expectLater( await expectLater(
find.byKey(_painterKey), find.byKey(_painterKey),
matchesGoldenFile('tab_bar_theme.tab_indicator_size_label.png'), matchesSkiaGoldFile('tab_bar_theme.tab_indicator_size_label.png'),
skip: !Platform.isLinux, // matchesGoldenFile('tab_bar_theme.tab_indicator_size_label.png'),
// skip: !Platform.isLinux,
); );
}); });
...@@ -298,8 +300,9 @@ void main() { ...@@ -298,8 +300,9 @@ void main() {
await expectLater( await expectLater(
find.byKey(_painterKey), find.byKey(_painterKey),
matchesGoldenFile('tab_bar_theme.custom_tab_indicator.png'), matchesSkiaGoldFile('tab_bar_theme.custom_tab_indicator.png'),
skip: !Platform.isLinux, // matchesGoldenFile('tab_bar_theme.custom_tab_indicator.png'),
// skip: !Platform.isLinux,
); );
}); });
...@@ -315,8 +318,9 @@ void main() { ...@@ -315,8 +318,9 @@ void main() {
await expectLater( await expectLater(
find.byKey(_painterKey), find.byKey(_painterKey),
matchesGoldenFile('tab_bar_theme.beveled_rect_indicator.png'), matchesSkiaGoldFile('tab_bar_theme.beveled_rect_indicator.png'),
skip: !Platform.isLinux, // matchesGoldenFile('tab_bar_theme.beveled_rect_indicator.png'),
// skip: !Platform.isLinux,
); );
}); });
} }
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