Skip to content

Commit

Permalink
test(UX-1305): Update avatar test
Browse files Browse the repository at this point in the history
test: Add a log on debugFillPropertiesTest if it fails
  • Loading branch information
github-actions committed Nov 6, 2024
1 parent 440b5de commit d579fec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/src/components/avatar/avatar_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ void main() {
final debugFillProperties = {
'size': 'ZetaAvatarSize.xl',
'name': 'null',
'specialStatus': 'null',
'badge': 'null',
'upperBadge': 'null',
'lowerBadge': 'null',
'backgroundColor': 'null',
'statusColor': 'null',
'semanticUpperBadgeValue': '"upperBadge"',
Expand Down
9 changes: 8 additions & 1 deletion test/test_utils/utils.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: avoid_print

import 'dart:io';

import 'package:collection/collection.dart';
Expand Down Expand Up @@ -77,7 +79,12 @@ void debugFillPropertiesTest(Widget widget, Map<String, dynamic> properties) {
widget.debugFillProperties(diagnostics);

properties.forEach((key, value) {
expect(diagnostics.finder(key), value);
try {
expect(diagnostics.finder(key), value);
} catch (e) {
print('Error on $key');
rethrow;
}
});
});
}

0 comments on commit d579fec

Please sign in to comment.