Skip to content

Commit

Permalink
test: Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Oct 15, 2024
1 parent ba1c4b1 commit 6ccd06a
Show file tree
Hide file tree
Showing 68 changed files with 13 additions and 14 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ dart sdk: ">=3.2.0 <4.0.0"
flutter: ">=3.16.0"
```

// TODO(LUKE): Update readme

## Installation

Expand Down
2 changes: 1 addition & 1 deletion example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Foundation

import path_provider_foundation
import shared_preferences_foundation
import sqflite_darwin
import sqflite
import url_launcher_macos

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
Expand Down
8 changes: 4 additions & 4 deletions lib/src/components/comms_button/comms_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,9 @@ class _ZetaCommsButtonState extends State<ZetaCommsButton> {
case ZetaCommsButtonType.negative:
return Zeta.of(context).colors.surfaceNegative;
case ZetaCommsButtonType.off:
return Zeta.of(context).colors.textDefault;
return Zeta.of(context).colors.mainDefault;
case ZetaCommsButtonType.on:
return Zeta.of(context).colors.textInverse;
return Zeta.of(context).colors.mainInverse;
case ZetaCommsButtonType.warning:
return Zeta.of(context).colors.surfaceDefault;
}
Expand All @@ -375,9 +375,9 @@ class _ZetaCommsButtonState extends State<ZetaCommsButton> {
case ZetaCommsButtonType.positive:
case ZetaCommsButtonType.negative:
case ZetaCommsButtonType.off:
return Zeta.of(context).colors.iconInverse;
return Zeta.of(context).colors.mainInverse;
case ZetaCommsButtonType.on:
return Zeta.of(context).colors.iconDefault;
return Zeta.of(context).colors.mainDefault;
case ZetaCommsButtonType.warning:
return Zeta.of(context).colors.surfaceNegative;
}
Expand Down
Binary file modified test/src/components/avatar/golden/avatar_default_l.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_default_m.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_default_s.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_default_xl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_default_xs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_default_xxl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_default_xxs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_default_xxxl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_default_xxxs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_from_name_l.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_from_name_m.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_from_name_s.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_from_name_xl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_from_name_xs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_from_name_xxl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_from_name_xxs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_from_name_xxxl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_from_name_xxxs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_image_l.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_image_m.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_image_s.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_image_xl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_image_xs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_image_xxl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_image_xxs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/src/components/avatar/golden/avatar_image_xxxl.png
Binary file modified test/src/components/avatar/golden/avatar_image_xxxs.png
Binary file modified test/src/components/avatar/golden/avatar_initials_l.png
Binary file modified test/src/components/avatar/golden/avatar_initials_m.png
Binary file modified test/src/components/avatar/golden/avatar_initials_s.png
Binary file modified test/src/components/avatar/golden/avatar_initials_xl.png
Binary file modified test/src/components/avatar/golden/avatar_initials_xs.png
Binary file modified test/src/components/avatar/golden/avatar_initials_xxl.png
Binary file modified test/src/components/avatar/golden/avatar_initials_xxs.png
Binary file modified test/src/components/avatar/golden/avatar_initials_xxxl.png
Binary file modified test/src/components/avatar/golden/avatar_initials_xxxs.png
Binary file modified test/src/components/avatar/golden/avatar_lower_badge_l.png
Binary file modified test/src/components/avatar/golden/avatar_lower_badge_m.png
Binary file modified test/src/components/avatar/golden/avatar_lower_badge_s.png
Binary file modified test/src/components/avatar/golden/avatar_lower_badge_xl.png
Binary file modified test/src/components/avatar/golden/avatar_lower_badge_xs.png
Binary file modified test/src/components/avatar/golden/avatar_lower_badge_xxl.png
Binary file modified test/src/components/avatar/golden/avatar_lower_badge_xxs.png
Binary file modified test/src/components/avatar/golden/avatar_lower_badge_xxxl.png
Binary file modified test/src/components/avatar/golden/avatar_lower_badge_xxxs.png
Binary file modified test/src/components/avatar/golden/avatar_upper_badge_l.png
Binary file modified test/src/components/avatar/golden/avatar_upper_badge_m.png
Binary file modified test/src/components/avatar/golden/avatar_upper_badge_s.png
Binary file modified test/src/components/avatar/golden/avatar_upper_badge_xl.png
Binary file modified test/src/components/avatar/golden/avatar_upper_badge_xs.png
Binary file modified test/src/components/avatar/golden/avatar_upper_badge_xxl.png
Binary file modified test/src/components/avatar/golden/avatar_upper_badge_xxs.png
Binary file modified test/src/components/avatar/golden/avatar_upper_badge_xxxl.png
Binary file modified test/src/components/avatar/golden/avatar_upper_badge_xxxs.png
16 changes: 8 additions & 8 deletions test/src/components/banner/banner_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ import '../../../test_utils/test_app.dart';
import '../../../test_utils/tolerant_comparator.dart';
import '../../../test_utils/utils.dart';

ZetaColorSwatch _backgroundColorFromType(BuildContext context, ZetaBannerStatus type) {
ZetaColorSwatch _colorFromType(BuildContext context, ZetaBannerStatus type) {
final zeta = Zeta.of(context);

switch (type) {
case ZetaBannerStatus.primary:
return zeta.colors.primary;
return zeta.colors.primitives.primary;
case ZetaBannerStatus.positive:
return zeta.colors.surfacePositive;
return zeta.colors.primitives.green;
case ZetaBannerStatus.warning:
return zeta.colors.orange;
return zeta.colors.primitives.orange;
case ZetaBannerStatus.negative:
return zeta.colors.surfaceNegative;
return zeta.colors.primitives.red;
}
}

Expand Down Expand Up @@ -278,7 +278,7 @@ void main() {
textWidget.style,
equals(
ZetaTextStyles.labelLarge.copyWith(
color: Zeta.of(tester.element(textFinder)).colors.textInverse,
color: Zeta.of(tester.element(textFinder)).colors.mainInverse,
),
),
);
Expand All @@ -303,7 +303,7 @@ void main() {
final Finder iconFinder = find.byIcon(Icons.info);

final Icon iconWidget = tester.widget(iconFinder);
expect(iconWidget.color, _backgroundColorFromType(tester.element(iconFinder), type).onColor);
expect(iconWidget.color, const ZetaSemanticColorsAA(primitives: ZetaPrimitivesLight()).mainInverse);
});

testWidgets('background colors are correct for $type', (WidgetTester tester) async {
Expand All @@ -323,7 +323,7 @@ void main() {
final Finder finder = find.byType(ZetaBanner);
final ZetaBanner widget = tester.firstWidget(finder);

expect(widget.backgroundColor, equals(_backgroundColorFromType(tester.element(finder), type)));
expect(widget.backgroundColor, equals(_colorFromType(tester.element(finder), type).shade60));
});
}
});
Expand Down
Binary file modified test/src/components/banner/golden/banner_negative.png
Binary file modified test/src/components/banner/golden/banner_positive.png
Binary file modified test/src/components/banner/golden/banner_primary.png
Binary file modified test/src/components/banner/golden/banner_warning.png
Binary file modified test/src/components/comms_button/golden/CommsButton_default.png
Binary file modified test/src/components/comms_button/golden/CommsButton_negative.png
Binary file modified test/src/components/comms_button/golden/CommsButton_off.png
Binary file modified test/src/components/comms_button/golden/CommsButton_on.png
Binary file modified test/src/components/comms_button/golden/CommsButton_positive.png
Binary file modified test/src/components/comms_button/golden/CommsButton_warning.png

0 comments on commit 6ccd06a

Please sign in to comment.