From d579fec2429f53c2fa2157fcab68ee2b7775b5ac Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 6 Nov 2024 14:20:10 +0000 Subject: [PATCH] test(UX-1305): Update avatar test test: Add a log on debugFillPropertiesTest if it fails --- test/src/components/avatar/avatar_test.dart | 4 ++-- test/test_utils/utils.dart | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/test/src/components/avatar/avatar_test.dart b/test/src/components/avatar/avatar_test.dart index 10ab2880..528d5aca 100644 --- a/test/src/components/avatar/avatar_test.dart +++ b/test/src/components/avatar/avatar_test.dart @@ -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"', diff --git a/test/test_utils/utils.dart b/test/test_utils/utils.dart index ec5c9704..406d598e 100644 --- a/test/test_utils/utils.dart +++ b/test/test_utils/utils.dart @@ -1,3 +1,5 @@ +// ignore_for_file: avoid_print + import 'dart:io'; import 'package:collection/collection.dart'; @@ -77,7 +79,12 @@ void debugFillPropertiesTest(Widget widget, Map 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; + } }); }); }