@@ -149,8 +149,10 @@ void main() {
149
149
);
150
150
151
151
final avatarSize = tester.getSize (find.byType (ZetaAvatar ));
152
- final typeSize = ZetaAvatar .pixelSize (tester.element (find.byType (ZetaAvatar )),
153
- size,); //TODO BK butchered this to make pixelSize reusable. Mike, is this ok?
152
+ final typeSize = ZetaAvatar .pixelSize (
153
+ tester.element (find.byType (ZetaAvatar )),
154
+ size,
155
+ ); //TODO BK butchered this to make pixelSize reusable. Mike, is this ok?
154
156
155
157
expect (avatarSize.width, equals (typeSize));
156
158
expect (avatarSize.height, equals (typeSize));
@@ -273,21 +275,24 @@ void main() {
273
275
expect (avatarBackgroundColor, equals (Colors .red));
274
276
});
275
277
276
- testWidgets ('ZetaAvatar with border colour' , (WidgetTester tester) async {
277
- await tester.pumpWidget (
278
- const TestApp (
279
- home: ZetaAvatar (
280
- borderColor: Colors .red,
278
+ for (final size in ZetaAvatarSize .values) {
279
+ testWidgets ('ZetaAvatar with border colour for $size ' , (WidgetTester tester) async {
280
+ await tester.pumpWidget (
281
+ TestApp (
282
+ home: ZetaAvatar (
283
+ borderColor: Colors .red,
284
+ size: size,
285
+ ),
281
286
),
282
- ),
283
- );
287
+ );
284
288
285
- final avatarBorderColor =
286
- (((tester.firstWidget (find.byType (Container )) as Container ).decoration! as BoxDecoration ).border! as Border )
287
- .top
288
- .color;
289
- expect (avatarBorderColor, equals (Colors .red));
290
- });
289
+ final avatarBorderColor =
290
+ (((tester.firstWidget (find.byType (Container )) as Container ).decoration! as BoxDecoration ).border! as Border )
291
+ .top
292
+ .color;
293
+ expect (avatarBorderColor, equals (Colors .red));
294
+ });
295
+ }
291
296
});
292
297
293
298
group ('ZetaAvatar Interaction Tests' , () {});
0 commit comments