Skip to content

Commit

Permalink
Bug Fix: initial has no effect
Browse files Browse the repository at this point in the history
  • Loading branch information
AmosHuKe committed Sep 11, 2023
1 parent 33490d2 commit d793629
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions test/tilt_parallax_widget/tilt_parallax_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,18 @@ void main() {
final Offset outerLocation = tester.getCenter(outerFinder);
final Offset innerLocation = tester.getCenter(innerFinder);
final Offset behindLocation = tester.getCenter(behindFinder);
expect(outerLocation, const Offset(25, 15));
expect(innerLocation, const Offset(25, 15));
expect(behindLocation, const Offset(25, 15));
expect(
outerLocation,
const Offset(24.061335345163766, 14.999999999999998),
);
expect(
innerLocation,
const Offset(24.061335345163766, 14.999999999999998),
);
expect(
behindLocation,
const Offset(24.061335345163766, 14.999999999999998),
);
});
testWidgets('TiltConfig enableReverse true', (WidgetTester tester) async {
final Finder outerFinder = find.text('outer');
Expand Down Expand Up @@ -107,9 +116,18 @@ void main() {
final Offset outerLocation = tester.getCenter(outerFinder);
final Offset innerLocation = tester.getCenter(innerFinder);
final Offset behindLocation = tester.getCenter(behindFinder);
expect(outerLocation, const Offset(5, 15));
expect(innerLocation, const Offset(5, 15));
expect(behindLocation, const Offset(5, 15));
expect(
outerLocation,
const Offset(5.938664654836236, 14.999999999999995),
);
expect(
innerLocation,
const Offset(5.938664654836236, 14.999999999999995),
);
expect(
behindLocation,
const Offset(5.938664654836236, 14.999999999999995),
);
});
});
}

0 comments on commit d793629

Please sign in to comment.