Skip to content

Commit

Permalink
correct tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gtalha07 committed Nov 14, 2023
1 parent c80e17a commit 2671fb3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.0.0+1"
version: "1.0.0+2"
args:
dependency: transitive
description:
Expand Down
15 changes: 9 additions & 6 deletions test/acter_avatar_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ void main() {
tester.getSize(find.byKey(TestKeys.circleAvatarKey));

// should expect specified fallback size
expect(avatarSize.height, equals(36));
expect(avatarSize.width, equals(36));
// diameter (size) is twice of radius size so we would expect x2 of specified size
expect(avatarSize.height, equals(36 * 2));
expect(avatarSize.width, equals(36 * 2));
});
testWidgets('User Circle Avatar with fallback size',
(WidgetTester tester) async {
Expand Down Expand Up @@ -225,14 +226,16 @@ void main() {
tester.getSize(find.byKey(TestKeys.stackedAvatarKey));

// should expect first avatar specified size
expect(avatarSize.height, equals(24));
expect(avatarSize.width, equals(24));
// diameter (size) is twice of radius size so we would expect x2 of specified size
expect(avatarSize.height, equals(24 * 2));
expect(avatarSize.width, equals(24 * 2));

final secondAvatarSize = tester.getSize(find.byType(Positioned));

// should expect second avatar specified size
expect(secondAvatarSize.height, equals(24));
expect(secondAvatarSize.width, equals(24));
// diameter (size) is twice of radius size so we would expect x2 of specified size
expect(secondAvatarSize.height, equals(24 * 2));
expect(secondAvatarSize.width, equals(24 * 2));
});
testWidgets('Circular Stacked Avatars with fallback size',
(WidgetTester tester) async {
Expand Down

0 comments on commit 2671fb3

Please sign in to comment.