Commit c5ba689e authored by Kate Lovett's avatar Kate Lovett

Commented out skips in golden framework tests and transitioned from...

Commented out skips in golden framework tests and transitioned from matchesGoldenFile to matchesSkiaGoldFile.
parent 8c59c524
...@@ -2033,7 +2033,7 @@ void main() { ...@@ -2033,7 +2033,7 @@ void main() {
// skip: !Platform.isLinux, // skip: !Platform.isLinux,
); );
}, },
skip: !Platform.isLinux, // skip: !Platform.isLinux,
); );
testWidgets('InputDecorationTheme.toString()', (WidgetTester tester) async { testWidgets('InputDecorationTheme.toString()', (WidgetTester tester) async {
......
...@@ -72,8 +72,9 @@ void main() { ...@@ -72,8 +72,9 @@ void main() {
await expectLater( await expectLater(
find.byType(RepaintBoundary), find.byType(RepaintBoundary),
matchesGoldenFile('continuous_rectangle_border.golden_test_even_radii.png'), matchesSkiaGoldFile('continuous_rectangle_border.golden_test_even_radii.png'),
skip: !Platform.isLinux, // matchesGoldenFile('continuous_rectangle_border.golden_test_even_radii.png'),
// skip: !Platform.isLinux,
); );
}); });
...@@ -94,8 +95,9 @@ void main() { ...@@ -94,8 +95,9 @@ void main() {
await expectLater( await expectLater(
find.byType(RepaintBoundary), find.byType(RepaintBoundary),
matchesGoldenFile('continuous_rectangle_border.golden_test_varying_radii.png'), matchesSkiaGoldFile('continuous_rectangle_border.golden_test_varying_radii.png'),
skip: !Platform.isLinux, // matchesGoldenFile('continuous_rectangle_border.golden_test_varying_radii.png'),
// skip: !Platform.isLinux,
); );
}); });
...@@ -113,8 +115,9 @@ void main() { ...@@ -113,8 +115,9 @@ void main() {
await expectLater( await expectLater(
find.byType(RepaintBoundary), find.byType(RepaintBoundary),
matchesGoldenFile('continuous_rectangle_border.golden_test_large_radii.png'), matchesSkiaGoldFile('continuous_rectangle_border.golden_test_large_radii.png'),
skip: !Platform.isLinux, // matchesGoldenFile('continuous_rectangle_border.golden_test_large_radii.png'),
// skip: !Platform.isLinux,
); );
}); });
......
...@@ -51,10 +51,11 @@ void main() { ...@@ -51,10 +51,11 @@ void main() {
await expectLater( await expectLater(
find.byType(RichText), find.byType(RichText),
matchesGoldenFile('localized_fonts.rich_text.styled_text_span.png'), matchesSkiaGoldFile('localized_fonts.rich_text.styled_text_span.png'),
// matchesGoldenFile('localized_fonts.rich_text.styled_text_span.png'),
); );
}, },
skip: !Platform.isLinux, //skip: !Platform.isLinux,
); );
testWidgets( testWidgets(
...@@ -103,10 +104,11 @@ void main() { ...@@ -103,10 +104,11 @@ void main() {
await expectLater( await expectLater(
find.byType(Row), find.byType(Row),
matchesGoldenFile('localized_fonts.text_ambient_locale.chars.png'), matchesSkiaGoldFile('localized_fonts.text_ambient_locale.chars.png'),
// matchesGoldenFile('localized_fonts.text_ambient_locale.chars.png'),
); );
}, },
skip: !Platform.isLinux, // skip: !Platform.isLinux,
); );
testWidgets( testWidgets(
...@@ -147,10 +149,11 @@ void main() { ...@@ -147,10 +149,11 @@ void main() {
await expectLater( await expectLater(
find.byType(Row), find.byType(Row),
matchesGoldenFile('localized_fonts.text_explicit_locale.chars.png'), matchesSkiaGoldFile('localized_fonts.text_explicit_locale.chars.png'),
// matchesGoldenFile('localized_fonts.text_explicit_locale.chars.png'),
); );
}, },
skip: !Platform.isLinux, // skip: !Platform.isLinux,
); );
} }
...@@ -43,8 +43,9 @@ void main() { ...@@ -43,8 +43,9 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('backdrop_filter_test.cull_rect.1.png'), matchesSkiaGoldFile('backdrop_filter_test.cull_rect.png')
skip: !Platform.isLinux, // matchesGoldenFile('backdrop_filter_test.cull_rect.1.png'),
// skip: !Platform.isLinux,
); );
}); });
} }
...@@ -288,7 +288,8 @@ void main() { ...@@ -288,7 +288,8 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('clip.ClipRect.1.png'), matchesSkiaGoldFile('clip.ClipRect.png'),
// matchesGoldenFile('clip.ClipRect.1.png'),
); );
}); });
...@@ -328,7 +329,8 @@ void main() { ...@@ -328,7 +329,8 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('clip.ClipRectOverlay.1.png'), matchesSkiaGoldFile('clip.ClipRectOverlay.png')
// matchesGoldenFile('clip.ClipRectOverlay.1.png'),
); );
}); });
...@@ -377,7 +379,8 @@ void main() { ...@@ -377,7 +379,8 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('clip.ClipRRect.1.png'), matchesSkiaGoldFile('clip.ClipRRect.png'),
// matchesGoldenFile('clip.ClipRRect.1.png'),
); );
}); });
...@@ -420,7 +423,8 @@ void main() { ...@@ -420,7 +423,8 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('clip.ClipOval.1.png'), matchesSkiaGoldFile('clip.ClipOval.png'),
// matchesGoldenFile('clip.ClipOval.1.png'),
); );
}); });
...@@ -468,7 +472,8 @@ void main() { ...@@ -468,7 +472,8 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('clip.ClipPath.1.png'), matchesSkiaGoldFile('clip.ClipPath.png'),
// matchesGoldenFile('clip.ClipPath.1.png'),
); );
}); });
...@@ -513,7 +518,8 @@ void main() { ...@@ -513,7 +518,8 @@ void main() {
await tester.pumpWidget(genPhysicalModel(Clip.antiAlias)); await tester.pumpWidget(genPhysicalModel(Clip.antiAlias));
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('clip.PhysicalModel.antiAlias.1.png'), matchesSkiaGoldFile('clip.PhysicalModel.antiAlias.png'),
// matchesGoldenFile('clip.PhysicalModel.antiAlias.1.png'),
); );
}); });
...@@ -521,7 +527,8 @@ void main() { ...@@ -521,7 +527,8 @@ void main() {
await tester.pumpWidget(genPhysicalModel(Clip.hardEdge)); await tester.pumpWidget(genPhysicalModel(Clip.hardEdge));
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('clip.PhysicalModel.hardEdge.1.png'), matchesSkiaGoldFile('clip.PhysicalModel.hardEdge.png'),
// matchesGoldenFile('clip.PhysicalModel.hardEdge.1.png'),
); );
}); });
...@@ -531,7 +538,8 @@ void main() { ...@@ -531,7 +538,8 @@ void main() {
await tester.pumpWidget(genPhysicalModel(Clip.antiAliasWithSaveLayer)); await tester.pumpWidget(genPhysicalModel(Clip.antiAliasWithSaveLayer));
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('clip.PhysicalModel.antiAliasWithSaveLayer.png'), matchesSkiaGoldFile('clip.PhysicalModel.antiAliasWithSaveLayer.png'),
// matchesGoldenFile('clip.PhysicalModel.antiAliasWithSaveLayer.png'),
); );
}); });
...@@ -573,7 +581,8 @@ void main() { ...@@ -573,7 +581,8 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('clip.PhysicalModel.default.1.png'), matchesSkiaGoldFile('clip.PhysicalModel.default.png'),
// matchesGoldenFile('clip.PhysicalModel.default.1.png'),
); );
}); });
...@@ -622,7 +631,8 @@ void main() { ...@@ -622,7 +631,8 @@ void main() {
await tester.pumpWidget(genPhysicalShape(Clip.antiAlias)); await tester.pumpWidget(genPhysicalShape(Clip.antiAlias));
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('clip.PhysicalShape.antiAlias.1.png'), matchesSkiaGoldFile('clip.PhysicalShape.antiAlias.png'),
// matchesGoldenFile('clip.PhysicalShape.antiAlias.1.png'),
); );
}); });
...@@ -630,7 +640,8 @@ void main() { ...@@ -630,7 +640,8 @@ void main() {
await tester.pumpWidget(genPhysicalShape(Clip.hardEdge)); await tester.pumpWidget(genPhysicalShape(Clip.hardEdge));
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('clip.PhysicalShape.hardEdge.1.png'), matchesSkiaGoldFile('clip.PhysicalShape.hardEdge.png'),
// matchesGoldenFile('clip.PhysicalShape.hardEdge.1.png'),
); );
}); });
...@@ -638,7 +649,8 @@ void main() { ...@@ -638,7 +649,8 @@ void main() {
await tester.pumpWidget(genPhysicalShape(Clip.antiAliasWithSaveLayer)); await tester.pumpWidget(genPhysicalShape(Clip.antiAliasWithSaveLayer));
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('clip.PhysicalShape.antiAliasWithSaveLayer.png'), matchesSkiaGoldFile('clip.PhysicalShape.antiAliasWithSaveLayer.png'),
// matchesGoldenFile('clip.PhysicalShape.antiAliasWithSaveLayer.png'),
); );
}); });
...@@ -684,7 +696,8 @@ void main() { ...@@ -684,7 +696,8 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('clip.PhysicalShape.default.1.png'), matchesSkiaGoldFile('clip.PhysicalShape.default.png'),
// matchesGoldenFile('clip.PhysicalShape.default.1.png'),
); );
}); });
......
...@@ -91,9 +91,12 @@ void main() { ...@@ -91,9 +91,12 @@ void main() {
await expectLater( await expectLater(
find.byKey(const ValueKey<int>(1)), find.byKey(const ValueKey<int>(1)),
matchesGoldenFile('editable_text_test.0.0.png'), matchesSkiaGoldFile('editable_text_test.0.png'),
// matchesGoldenFile('editable_text_test.0.0.png'),
); );
}, skip: !Platform.isLinux); },
//skip: !Platform.isLinux
);
testWidgets('cursor layout has correct radius', (WidgetTester tester) async { testWidgets('cursor layout has correct radius', (WidgetTester tester) async {
final GlobalKey<EditableTextState> editableTextKey = GlobalKey<EditableTextState>(); final GlobalKey<EditableTextState> editableTextKey = GlobalKey<EditableTextState>();
...@@ -142,9 +145,11 @@ void main() { ...@@ -142,9 +145,11 @@ void main() {
await expectLater( await expectLater(
find.byKey(const ValueKey<int>(1)), find.byKey(const ValueKey<int>(1)),
matchesGoldenFile('editable_text_test.1.0.png'), matchesSkiaGoldFile('editable_text_test.1.png'),
// matchesGoldenFile('editable_text_test.1.0.png'),
); );
}, skip: !Platform.isLinux); }, //skip: !Platform.isLinux
);
testWidgets('Cursor animates on iOS', (WidgetTester tester) async { testWidgets('Cursor animates on iOS', (WidgetTester tester) async {
final Widget widget = MaterialApp( final Widget widget = MaterialApp(
......
...@@ -22,8 +22,9 @@ void main() { ...@@ -22,8 +22,9 @@ void main() {
await expectLater( await expectLater(
find.byType(RepaintBoundary), find.byType(RepaintBoundary),
matchesGoldenFile('invert_colors_test.0.png'), matchesSkiaGoldFile('invert_colors_test.0.png')
skip: !Platform.isLinux, // matchesGoldenFile('invert_colors_test.0.png'),
// skip: !Platform.isLinux,
); );
}); });
...@@ -41,8 +42,9 @@ void main() { ...@@ -41,8 +42,9 @@ void main() {
await expectLater( await expectLater(
find.byType(RepaintBoundary), find.byType(RepaintBoundary),
matchesGoldenFile('invert_colors_test.1.png'), matchesSkiaGoldFile('invert_colors_test.1.png'),
skip: !Platform.isLinux, // matchesGoldenFile('invert_colors_test.1.png'),
// skip: !Platform.isLinux,
); );
}); });
} }
......
...@@ -492,8 +492,9 @@ void main() { ...@@ -492,8 +492,9 @@ void main() {
await expectLater( await expectLater(
find.byKey(const Key('list_wheel_scroll_view')), find.byKey(const Key('list_wheel_scroll_view')),
matchesGoldenFile('list_wheel_scroll_view.center_child.magnified.png'), matchesSkiaGoldFile('list_wheel_scroll_view.center_child.magnified.png'),
skip: !Platform.isLinux, // matchesGoldenFile('list_wheel_scroll_view.center_child.magnified.png'),
// skip: !Platform.isLinux,
); );
}); });
...@@ -547,8 +548,9 @@ void main() { ...@@ -547,8 +548,9 @@ void main() {
await expectLater( await expectLater(
find.byKey(const Key('list_wheel_scroll_view')), find.byKey(const Key('list_wheel_scroll_view')),
matchesGoldenFile('list_wheel_scroll_view.curved_wheel.left.png'), matchesSkiaGoldFile('list_wheel_scroll_view.curved_wheel.left.png'),
skip: !Platform.isLinux, // matchesGoldenFile('list_wheel_scroll_view.curved_wheel.left.png'),
// skip: !Platform.isLinux,
); );
}); });
......
...@@ -179,8 +179,9 @@ void main() { ...@@ -179,8 +179,9 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('opacity_test.offset.1.png'), matchesSkiaGoldFile('opacity_test.offset.png'),
skip: !Platform.isLinux, // matchesGoldenFile('opacity_test.offset.1.png'),
// skip: !Platform.isLinux,
); );
}); });
} }
...@@ -66,8 +66,9 @@ void main() { ...@@ -66,8 +66,9 @@ void main() {
expect(tester.takeException(), startsWith('A RenderFlex overflowed by ')); expect(tester.takeException(), startsWith('A RenderFlex overflowed by '));
await expectLater( await expectLater(
find.byKey(key), find.byKey(key),
matchesGoldenFile('physical_model_overflow.png'), matchesSkiaGoldFile('physical_model_overflow.png'),
skip: !Platform.isLinux, // matchesGoldenFile('physical_model_overflow.png'),
// skip: !Platform.isLinux,
); );
}); });
......
...@@ -25,18 +25,18 @@ void main() { ...@@ -25,18 +25,18 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
matchesGoldenFile('shadow.BoxDecoration.disabled.png'), matchesSkiaGoldFile('shadow.BoxDecoration.disabled.png'),
// matchesGoldenFile('shadow.BoxDecoration.disabled.png'),
); );
debugDisableShadows = false; debugDisableShadows = false;
tester.binding.reassembleApplication(); tester.binding.reassembleApplication();
await tester.pump(); await tester.pump();
if (Platform.isLinux) { // TODO(ianh): [May no longer apply] use the skip argument instead once that doesn't hang, https://github.com/dart-lang/test/issues/830
// TODO(ianh): use the skip argument instead once that doesn't hang, https://github.com/dart-lang/test/issues/830 await expectLater(
await expectLater( find.byType(Container),
find.byType(Container), matchesSkiaGoldFile('shadow.BoxDecoration.enabled.png'),
matchesGoldenFile('shadow.BoxDecoration.enabled.png'), // matchesGoldenFile('shadow.BoxDecoration.enabled.png'),
); // shadows render differently on different platforms );
}
debugDisableShadows = true; debugDisableShadows = true;
}); });
...@@ -61,11 +61,14 @@ void main() { ...@@ -61,11 +61,14 @@ void main() {
await tester.pumpWidget(build(elevation)); await tester.pumpWidget(build(elevation));
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
matchesGoldenFile('shadow.ShapeDecoration.$elevation.png'), matchesSkiaGoldFile('shadow.ShapeDecoration.$elevation.png'),
// matchesGoldenFile('shadow.ShapeDecoration.$elevation.png'),
); );
} }
debugDisableShadows = true; debugDisableShadows = true;
}, skip: !Platform.isLinux); // shadows render differently on different platforms },
// skip: !Platform.isLinux
); // shadows render differently on different platforms
testWidgets('Shadows with PhysicalLayer', (WidgetTester tester) async { testWidgets('Shadows with PhysicalLayer', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
...@@ -88,18 +91,18 @@ void main() { ...@@ -88,18 +91,18 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
matchesGoldenFile('shadow.PhysicalModel.disabled.png'), matchesSkiaGoldFile('shadow.PhysicalModel.disabled.png'),
// matchesGoldenFile('shadow.PhysicalModel.disabled.png'),
); );
debugDisableShadows = false; debugDisableShadows = false;
tester.binding.reassembleApplication(); tester.binding.reassembleApplication();
await tester.pump(); await tester.pump();
if (Platform.isLinux) { // TODO(ianh): [May no longer apply] use the skip argument instead once that doesn't hang, https://github.com/dart-lang/test/issues/830
// TODO(ianh): use the skip argument instead once that doesn't hang, https://github.com/dart-lang/test/issues/830 await expectLater(
await expectLater( find.byType(Container),
find.byType(Container), matchesSkiaGoldFile('shadow.PhysicalModel.enabled.png'),
matchesGoldenFile('shadow.PhysicalModel.enabled.png'), // matchesGoldenFile('shadow.PhysicalModel.enabled.png'),
); // shadows render differently on different platforms );
}
debugDisableShadows = true; debugDisableShadows = true;
}); });
...@@ -128,9 +131,11 @@ void main() { ...@@ -128,9 +131,11 @@ void main() {
await tester.pumpWidget(build(elevation.toDouble())); await tester.pumpWidget(build(elevation.toDouble()));
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
matchesGoldenFile('shadow.PhysicalShape.$elevation.1.png'), matchesSkiaGoldFile('shadow.PhysicalModel.disabled.png'),
// matchesGoldenFile('shadow.PhysicalModel.disabled.png'),
); );
} }
debugDisableShadows = true; debugDisableShadows = true;
}, skip: !Platform.isLinux); // shadows render differently on different platforms },
} // skip: !Platform.isLinux
);
\ No newline at end of file
...@@ -31,7 +31,8 @@ void main() { ...@@ -31,7 +31,8 @@ void main() {
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
matchesGoldenFile('text_golden.Centered.png'), matchesSkiaGoldFile('text_golden.Centered.png'),
// matchesGoldenFile('text_golden.Centered.png'),
); );
await tester.pumpWidget( await tester.pumpWidget(
...@@ -55,9 +56,12 @@ void main() { ...@@ -55,9 +56,12 @@ void main() {
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
matchesGoldenFile('text_golden.Centered.wrap.png'), matchesSkiaGoldFile('text_golden.Centered.wrap.png'),
// matchesGoldenFile('text_golden.Centered.wrap.png'),
); );
}, skip: !Platform.isLinux); },
// skip: !Platform.isLinux
);
testWidgets('Text Foreground', (WidgetTester tester) async { testWidgets('Text Foreground', (WidgetTester tester) async {
...@@ -86,7 +90,8 @@ void main() { ...@@ -86,7 +90,8 @@ void main() {
await expectLater( await expectLater(
find.byType(RepaintBoundary), find.byType(RepaintBoundary),
matchesGoldenFile('text_golden.Foreground.gradient.png'), matchesSkiaGoldFile('text_golden.Foreground.gradient.png'),
// matchesGoldenFile('text_golden.Foreground.gradient.png'),
); );
await tester.pumpWidget( await tester.pumpWidget(
...@@ -108,7 +113,8 @@ void main() { ...@@ -108,7 +113,8 @@ void main() {
await expectLater( await expectLater(
find.byType(RepaintBoundary), find.byType(RepaintBoundary),
matchesGoldenFile('text_golden.Foreground.stroke.png'), matchesSkiaGoldFile('text_golden.Foreground.stroke.png'),
// matchesGoldenFile('text_golden.Foreground.stroke.png'),
); );
await tester.pumpWidget( await tester.pumpWidget(
...@@ -131,9 +137,12 @@ void main() { ...@@ -131,9 +137,12 @@ void main() {
await expectLater( await expectLater(
find.byType(RepaintBoundary), find.byType(RepaintBoundary),
matchesGoldenFile('text_golden.Foreground.stroke_and_gradient.png'), matchesSkiaGoldFile('text_golden.Foreground.stroke_and_gradient.png'),
// matchesGoldenFile('text_golden.Foreground.stroke_and_gradient.png'),
); );
}, skip: !Platform.isLinux); },
// skip: !Platform.isLinux
);
// TODO(garyq): This test requires an update when the background // TODO(garyq): This test requires an update when the background
// drawing from the beginning of the line bug is fixed. The current // drawing from the beginning of the line bug is fixed. The current
...@@ -181,9 +190,12 @@ void main() { ...@@ -181,9 +190,12 @@ void main() {
await expectLater( await expectLater(
find.byType(RepaintBoundary), find.byType(RepaintBoundary),
matchesGoldenFile('text_golden.Background.png'), matchesSkiaGoldFile('text_golden.Background.png'),
// matchesGoldenFile('text_golden.Background.png'),
); );
}, skip: !Platform.isLinux); },
// skip: !Platform.isLinux
);
testWidgets('Text Fade', (WidgetTester tester) async { testWidgets('Text Fade', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
...@@ -217,9 +229,12 @@ void main() { ...@@ -217,9 +229,12 @@ void main() {
await expectLater( await expectLater(
find.byType(RepaintBoundary).first, find.byType(RepaintBoundary).first,
matchesGoldenFile('text_golden.Fade.1.png'), matchesSkiaGoldFile('text_golden.Fade.1.png'),
// matchesGoldenFile('text_golden.Fade.1.png'),
); );
}, skip: !Platform.isLinux); },
// skip: !Platform.isLinux
);
testWidgets('Default Strut text', (WidgetTester tester) async { testWidgets('Default Strut text', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
...@@ -242,10 +257,13 @@ void main() { ...@@ -242,10 +257,13 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
matchesGoldenFile('text_golden.StrutDefault.png'), matchesSkiaGoldFile('text_golden.StrutDefault.png'),
// matchesGoldenFile('text_golden.StrutDefault.png'),
); );
}, skip: true); // Should only be on linux (skip: !Platform.isLinux). },
// Disabled for now until font inconsistency is resolved. // skip: true // Should only be on linux (skip: !Platform.isLinux).
// Disabled for now until font inconsistency is resolved.
);
testWidgets('Strut text 1', (WidgetTester tester) async { testWidgets('Strut text 1', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
...@@ -270,10 +288,12 @@ void main() { ...@@ -270,10 +288,12 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
matchesGoldenFile('text_golden.Strut.1.1.png'), matchesSkiaGoldFile('text_golden.Strut.1.png')
// matchesGoldenFile('text_golden.Strut.1.1.png'),
); );
}, skip: true); // Should only be on linux (skip: !Platform.isLinux). },
// Disabled for now until font inconsistency is resolved. // skip: true // Should only be on linux (skip: !Platform.isLinux).
); // Disabled for now until font inconsistency is resolved.
testWidgets('Strut text 2', (WidgetTester tester) async { testWidgets('Strut text 2', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
...@@ -299,10 +319,12 @@ void main() { ...@@ -299,10 +319,12 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
matchesGoldenFile('text_golden.Strut.2.1.png'), matchesSkiaGoldFile('text_golden.Strut.2.png')
// matchesGoldenFile('text_golden.Strut.2.1.png'),
); );
}, skip: true); // Should only be on linux (skip: !Platform.isLinux). },
// Disabled for now until font inconsistency is resolved. // skip: true // Should only be on linux (skip: !Platform.isLinux).
); // Disabled for now until font inconsistency is resolved.
testWidgets('Strut text rich', (WidgetTester tester) async { testWidgets('Strut text rich', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
...@@ -351,10 +373,12 @@ void main() { ...@@ -351,10 +373,12 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
matchesGoldenFile('text_golden.Strut.3.1.png'), matchesSkiaGoldFile('text_golden.Strut.3.png')
// matchesGoldenFile('text_golden.Strut.3.1.png'),
); );
}, skip: true); // Should only be on linux (skip: !Platform.isLinux). },
// Disabled for now until font inconsistency is resolved. // skip: true // Should only be on linux (skip: !Platform.isLinux).
); // Disabled for now until font inconsistency is resolved.
testWidgets('Strut text font fallback', (WidgetTester tester) async { testWidgets('Strut text font fallback', (WidgetTester tester) async {
// Font Fallback // Font Fallback
...@@ -387,10 +411,12 @@ void main() { ...@@ -387,10 +411,12 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
matchesGoldenFile('text_golden.Strut.4.1.png'), matchesSkiaGoldFile('text_golden.Strut.4.png')
// matchesGoldenFile('text_golden.Strut.4.1.png'),
); );
}, skip: true); // Should only be on linux (skip: !Platform.isLinux). },
// Disabled for now until font inconsistency is resolved. // skip: true // Should only be on linux (skip: !Platform.isLinux).
); // Disabled for now until font inconsistency is resolved.
testWidgets('Strut text rich forceStrutHeight', (WidgetTester tester) async { testWidgets('Strut text rich forceStrutHeight', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
...@@ -439,10 +465,12 @@ void main() { ...@@ -439,10 +465,12 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
matchesGoldenFile('text_golden.StrutForce.1.1.png'), matchesSkiaGoldFile('text_golden.StrutForce.1.png')
// matchesGoldenFile('text_golden.StrutForce.1.1.png'),
); );
}, skip: true); // Should only be on linux (skip: !Platform.isLinux). },
// Disabled for now until font inconsistency is resolved. // skip: true // Should only be on linux (skip: !Platform.isLinux).
); // Disabled for now until font inconsistency is resolved.
testWidgets('Decoration thickness', (WidgetTester tester) async { testWidgets('Decoration thickness', (WidgetTester tester) async {
final TextDecoration allDecorations = TextDecoration.combine( final TextDecoration allDecorations = TextDecoration.combine(
...@@ -478,9 +506,12 @@ void main() { ...@@ -478,9 +506,12 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
matchesGoldenFile('text_golden.Decoration.1.0.png'), matchesSkiaGoldFile('text_golden.Decoration.1.png'),
// matchesGoldenFile('text_golden.Decoration.1.0.png'),
); );
}, skip: !Platform.isLinux); // Coretext uses different thicknesses for decoration },
// skip: !Platform.isLinux
); // Coretext uses different thicknesses for decoration
testWidgets('Decoration thickness', (WidgetTester tester) async { testWidgets('Decoration thickness', (WidgetTester tester) async {
final TextDecoration allDecorations = TextDecoration.combine( final TextDecoration allDecorations = TextDecoration.combine(
...@@ -517,7 +548,10 @@ void main() { ...@@ -517,7 +548,10 @@ void main() {
); );
await expectLater( await expectLater(
find.byType(Container), find.byType(Container),
matchesGoldenFile('text_golden.DecorationThickness.1.0.png'), matchesSkiaGoldFile('text_golden.DecorationThickness.1.png'),
// matchesGoldenFile('text_golden.DecorationThickness.1.0.png'),
); );
}, skip: !Platform.isLinux); // Coretext uses different thicknesses for decoration },
// skip: !Platform.isLinux
); // Coretext uses different thicknesses for decoration
} }
...@@ -1828,8 +1828,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -1828,8 +1828,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
expect(expectedChildLayerCount, equals(2)); expect(expectedChildLayerCount, equals(2));
await expectLater( await expectLater(
layer.toImage(renderObject.semanticBounds.inflate(50.0)), layer.toImage(renderObject.semanticBounds.inflate(50.0)),
matchesGoldenFile('inspector.repaint_boundary_margin.png'), matchesSkiaGoldFile('inspector.repaint_boundary_margin.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.repaint_boundary_margin.png'),
// skip: !Platform.isLinux,
); );
// Regression test for how rendering with a pixel scale other than 1.0 // Regression test for how rendering with a pixel scale other than 1.0
...@@ -1839,8 +1840,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -1839,8 +1840,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
renderObject.semanticBounds.inflate(50.0), renderObject.semanticBounds.inflate(50.0),
pixelRatio: 0.5, pixelRatio: 0.5,
), ),
matchesGoldenFile('inspector.repaint_boundary_margin_small.png'), matchesSkiaGoldFile('inspector.repaint_boundary_margin_small.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.repaint_boundary_margin_small.png'),
// skip: !Platform.isLinux,
); );
await expectLater( await expectLater(
...@@ -1848,8 +1850,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -1848,8 +1850,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
renderObject.semanticBounds.inflate(50.0), renderObject.semanticBounds.inflate(50.0),
pixelRatio: 2.0, pixelRatio: 2.0,
), ),
matchesGoldenFile('inspector.repaint_boundary_margin_large.png'), matchesSkiaGoldFile('inspector.repaint_boundary_margin_large.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.repaint_boundary_margin_large.png'),
// skip: !Platform.isLinux,
); );
final Layer layerParent = layer.parent; final Layer layerParent = layer.parent;
...@@ -1864,8 +1867,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -1864,8 +1867,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
width: 300.0, width: 300.0,
height: 300.0, height: 300.0,
), ),
matchesGoldenFile('inspector.repaint_boundary.png'), matchesSkiaGoldFile('inspector.repaint_boundary.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.repaint_boundary.png'),
// skip: !Platform.isLinux,
); );
// Verify that taking a screenshot didn't change the layers associated with // Verify that taking a screenshot didn't change the layers associated with
...@@ -1882,8 +1886,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -1882,8 +1886,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height: 500.0, height: 500.0,
margin: 50.0, margin: 50.0,
), ),
matchesGoldenFile('inspector.repaint_boundary_margin.png'), matchesSkiaGoldFile('inspector.repaint_boundary_margin.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.repaint_boundary_margin.png'),
// skip: !Platform.isLinux,
); );
// Verify that taking a screenshot didn't change the layers associated with // Verify that taking a screenshot didn't change the layers associated with
...@@ -1903,8 +1908,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -1903,8 +1908,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height: 300.0, height: 300.0,
debugPaint: true, debugPaint: true,
), ),
matchesGoldenFile('inspector.repaint_boundary_debugPaint.png'), matchesSkiaGoldFile('inspector.repaint_boundary_debugPaint.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.repaint_boundary_debugPaint.png'),
// skip: !Platform.isLinux,
); );
// Verify that taking a screenshot with debug paint on did not change // Verify that taking a screenshot with debug paint on did not change
// the number of children the layer has. // the number of children the layer has.
...@@ -1914,8 +1920,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -1914,8 +1920,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
// hasn't changed the regular render of the widget. // hasn't changed the regular render of the widget.
await expectLater( await expectLater(
find.byType(RepaintBoundaryWithDebugPaint), find.byType(RepaintBoundaryWithDebugPaint),
matchesGoldenFile('inspector.repaint_boundary.png'), matchesSkiaGoldFile('inspector.repaint_boundary.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.repaint_boundary.png'),
// skip: !Platform.isLinux,
); );
expect(renderObject.debugLayer, equals(layer)); expect(renderObject.debugLayer, equals(layer));
...@@ -1928,8 +1935,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -1928,8 +1935,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
width: 100.0, width: 100.0,
height: 100.0, height: 100.0,
), ),
matchesGoldenFile('inspector.container.png'), matchesSkiaGoldFile('inspector.container.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.container.png'),
// skip: !Platform.isLinux,
); );
await expectLater( await expectLater(
...@@ -1939,8 +1947,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -1939,8 +1947,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height: 100.0, height: 100.0,
debugPaint: true, debugPaint: true,
), ),
matchesGoldenFile('inspector.container_debugPaint.png'), matchesSkiaGoldFile('inspector.container_debugPaint.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.container_debugPaint.png'),
// skip: !Platform.isLinux,
); );
{ {
...@@ -1960,8 +1969,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -1960,8 +1969,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height: 100.0, height: 100.0,
debugPaint: true, debugPaint: true,
), ),
matchesGoldenFile('inspector.container_debugPaint.png'), matchesSkiaGoldFile('inspector.container_debugPaint.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.container_debugPaint.png'),
// skip: !Platform.isLinux,
); );
expect(container.debugNeedsLayout, isFalse); expect(container.debugNeedsLayout, isFalse);
} }
...@@ -1973,8 +1983,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -1973,8 +1983,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
width: 50.0, width: 50.0,
height: 100.0, height: 100.0,
), ),
matchesGoldenFile('inspector.container_small.png'), matchesSkiaGoldFile('inspector.container_small.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.container_small.png'),
// skip: !Platform.isLinux,
); );
await expectLater( await expectLater(
...@@ -1984,8 +1995,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -1984,8 +1995,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height: 400.0, height: 400.0,
maxPixelRatio: 3.0, maxPixelRatio: 3.0,
), ),
matchesGoldenFile('inspector.container_large.png'), matchesSkiaGoldFile('inspector.container_large.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.container_large.png'),
// skip: !Platform.isLinux,
); );
// This screenshot will show the clip rect debug paint but no other // This screenshot will show the clip rect debug paint but no other
...@@ -1997,8 +2009,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -1997,8 +2009,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height: 100.0, height: 100.0,
debugPaint: true, debugPaint: true,
), ),
matchesGoldenFile('inspector.clipRect_debugPaint.png'), matchesSkiaGoldFile('inspector.clipRect_debugPaint.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.clipRect_debugPaint.png'),
// skip: !Platform.isLinux,
); );
final Element clipRect = find.byType(ClipRRect).evaluate().single; final Element clipRect = find.byType(ClipRRect).evaluate().single;
...@@ -2014,8 +2027,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -2014,8 +2027,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
// This golden image is platform dependent due to the clip icon. // This golden image is platform dependent due to the clip icon.
await expectLater( await expectLater(
clipRectScreenshot, clipRectScreenshot,
matchesGoldenFile('inspector.clipRect_debugPaint_margin.png'), matchesSkiaGoldFile('inspector.clipRect_debugPaint_margin.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.clipRect_debugPaint_margin.png'),
// skip: !Platform.isLinux,
); );
// Verify we get the same image if we go through the service extension // Verify we get the same image if we go through the service extension
...@@ -2054,8 +2068,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -2054,8 +2068,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height: 300.0, height: 300.0,
debugPaint: true, debugPaint: true,
), ),
matchesGoldenFile('inspector.padding_debugPaint.png'), matchesSkiaGoldFile('inspector.padding_debugPaint.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.padding_debugPaint.png'),
// skip: !Platform.isLinux,
); );
// The bounds for this box crop its rendered content. // The bounds for this box crop its rendered content.
...@@ -2066,8 +2081,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -2066,8 +2081,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
height: 300.0, height: 300.0,
debugPaint: true, debugPaint: true,
), ),
matchesGoldenFile('inspector.sizedBox_debugPaint.png'), matchesSkiaGoldFile('inspector.sizedBox_debugPaint.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.sizedBox_debugPaint.png'),
// skip: !Platform.isLinux,
); );
// Verify that setting a margin includes the previously cropped content. // Verify that setting a margin includes the previously cropped content.
...@@ -2079,8 +2095,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -2079,8 +2095,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
margin: 50.0, margin: 50.0,
debugPaint: true, debugPaint: true,
), ),
matchesGoldenFile('inspector.sizedBox_debugPaint_margin.png'), matchesSkiaGoldFile('inspector.sizedBox_debugPaint_margin.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.sizedBox_debugPaint_margin.png'),
// skip: !Platform.isLinux,
); );
}); });
...@@ -2151,8 +2168,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -2151,8 +2168,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
await expectLater( await expectLater(
find.byKey(mainStackKey), find.byKey(mainStackKey),
matchesGoldenFile('inspector.composited_transform.only_offsets.png'), matchesSkiaGoldFile('inspector.composited_transform.only_offsets.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.composited_transform.only_offsets.png'),
// skip: !Platform.isLinux,
); );
await expectLater( await expectLater(
...@@ -2161,14 +2179,16 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -2161,14 +2179,16 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
width: 5000.0, width: 5000.0,
height: 500.0, height: 500.0,
), ),
matchesGoldenFile('inspector.composited_transform.only_offsets_follower.png'), matchesSkiaGoldFile('inspector.composited_transform.only_offsets_follower.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.composited_transform.only_offsets_follower.png'),
// skip: !Platform.isLinux,
); );
await expectLater( await expectLater(
WidgetInspectorService.instance.screenshot(find.byType(Stack).evaluate().first, width: 300.0, height: 300.0), WidgetInspectorService.instance.screenshot(find.byType(Stack).evaluate().first, width: 300.0, height: 300.0),
matchesGoldenFile('inspector.composited_transform.only_offsets_small.1.png'), matchesSkiaGoldFile('inspector.composited_transform.only_offsets_small.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.composited_transform.only_offsets_small.1.png'),
// skip: !Platform.isLinux,
); );
await expectLater( await expectLater(
...@@ -2177,8 +2197,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -2177,8 +2197,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
width: 500.0, width: 500.0,
height: 500.0, height: 500.0,
), ),
matchesGoldenFile('inspector.composited_transform.only_offsets_target.png'), matchesSkiaGoldFile('inspector.composited_transform.only_offsets_target.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.composited_transform.only_offsets_target.png'),
// skip: !Platform.isLinux,
); );
}); });
...@@ -2250,8 +2271,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -2250,8 +2271,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
// screenshots of specific subtrees are reasonable. // screenshots of specific subtrees are reasonable.
await expectLater( await expectLater(
find.byKey(mainStackKey), find.byKey(mainStackKey),
matchesGoldenFile('inspector.composited_transform.with_rotations.png'), matchesSkiaGoldFile('inspector.composited_transform.with_rotations.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.composited_transform.with_rotations.png'),
// skip: !Platform.isLinux,
); );
await expectLater( await expectLater(
...@@ -2260,8 +2282,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -2260,8 +2282,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
width: 500.0, width: 500.0,
height: 500.0, height: 500.0,
), ),
matchesGoldenFile('inspector.composited_transform.with_rotations_small.png'), matchesSkiaGoldFile('inspector.composited_transform.with_rotations_small.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.composited_transform.with_rotations_small.png'),
// skip: !Platform.isLinux,
); );
await expectLater( await expectLater(
...@@ -2270,8 +2293,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -2270,8 +2293,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
width: 500.0, width: 500.0,
height: 500.0, height: 500.0,
), ),
matchesGoldenFile('inspector.composited_transform.with_rotations_target.png'), matchesSkiaGoldFile('inspector.composited_transform.with_rotations_target.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.composited_transform.with_rotations_target.png'),
// skip: !Platform.isLinux,
); );
await expectLater( await expectLater(
...@@ -2280,8 +2304,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService { ...@@ -2280,8 +2304,9 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
width: 500.0, width: 500.0,
height: 500.0, height: 500.0,
), ),
matchesGoldenFile('inspector.composited_transform.with_rotations_follower.png'), matchesSkiaGoldFile('inspector.composited_transform.with_rotations_follower.png'),
skip: !Platform.isLinux, // matchesGoldenFile('inspector.composited_transform.with_rotations_follower.png'),
// skip: !Platform.isLinux,
); );
// Make sure taking screenshots hasn't modified the positions of the // Make sure taking screenshots hasn't modified the positions of the
......
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