Skip to content

Commit

Permalink
Fix test impacted by ScaleEffect fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gskinner committed Nov 19, 2023
1 parent 31709e9 commit 48e30ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/effects/then_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ import '../tester_extensions.dart';
void main() {
testWidgets('ThenEffect: core', (tester) async {
final animation =
const FlutterLogo().animate().fadeIn(duration: 500.ms).then().scale();
const FlutterLogo().animate().fadeIn(duration: 500.ms).then().scaleXY(begin: 0.50);

// Wait 500ms, check that opacity has started, but scale has not
await tester.pumpAnimation(animation, initialDelay: 250.ms);
tester.expectWidgetWithDouble<FadeTransition>(
(o) => o.opacity.value, 0.5, 'opacity @ 25%');

Matrix4 expectedMatrix = Transform.scale(scale: 0).transform;
Matrix4 expectedMatrix = Transform.scale(scale: 0.5).transform;
tester.expectWidgetWithBool<Transform>(
(o) => o.transform == expectedMatrix, true, 'scale @ 25%');
(o) => o.transform == expectedMatrix, true, 'scale @ 50%');

// Wait another 1s and check that scale is now halfway
await tester.pumpAnimation(animation, initialDelay: 500.ms);
expectedMatrix = Transform.scale(scale: 0.5).transform;
expectedMatrix = Transform.scale(scale: 0.75).transform;
tester.expectWidgetWithBool<Transform>(
(o) => o.transform == expectedMatrix, true, 'scale @ 75%');
});
Expand Down

0 comments on commit 48e30ba

Please sign in to comment.