Skip to content

Commit

Permalink
fix test format
Browse files Browse the repository at this point in the history
  • Loading branch information
peixinli committed Feb 26, 2024
1 parent cfd3a43 commit 06d2761
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions packages/rfw/test/material_widgets_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,8 @@ void main() {

// Hover
final Offset center = tester.getCenter(find.byType(InkResponse));
final TestGesture gesture = await tester.createGesture(kind: PointerDeviceKind.mouse);
final TestGesture gesture =
await tester.createGesture(kind: PointerDeviceKind.mouse);
await gesture.addPointer();
addTearDown(gesture.removePointer);
await gesture.moveTo(center);
Expand All @@ -503,7 +504,8 @@ void main() {
// Tap
await gesture.down(center);
await tester.pump(); // start gesture
await tester.pump(const Duration(milliseconds: 200)); // wait for splash to be well under way
await tester.pump(const Duration(
milliseconds: 200)); // wait for splash to be well under way

await expectLater(
find.byType(RemoteWidget),
Expand Down Expand Up @@ -557,8 +559,10 @@ void main() {
'''));
await tester.pump();

expect(tester.widget<Material>(find.byType(Material)).animationDuration, const Duration(milliseconds: 300));
expect(tester.widget<Material>(find.byType(Material)).borderOnForeground, false);
expect(tester.widget<Material>(find.byType(Material)).animationDuration,
const Duration(milliseconds: 300));
expect(tester.widget<Material>(find.byType(Material)).borderOnForeground,
false);
await expectLater(
find.byType(RemoteWidget),
matchesGoldenFile('goldens/material_test.material_properties.png'),
Expand All @@ -579,6 +583,7 @@ void main() {
'''));
await tester.pump();

expect(tester.widget<Material>(find.byType(Material)).clipBehavior, Clip.antiAlias);
expect(tester.widget<Material>(find.byType(Material)).clipBehavior,
Clip.antiAlias);
});
}

0 comments on commit 06d2761

Please sign in to comment.