Skip to content

Commit

Permalink
add png file type to GoldenFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Sep 10, 2024
1 parent cca6878 commit e13f3c8
Show file tree
Hide file tree
Showing 17 changed files with 81 additions and 81 deletions.
Binary file not shown.
10 changes: 5 additions & 5 deletions test/src/components/badge/indicator_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import '../../../test_utils/tolerant_comparator.dart';
import '../../../test_utils/utils.dart';

void main() {
const goldenFile = GoldenFinder(component: 'badge');
const goldenFile = GoldenFiles(component: 'badge');

setUpAll(() {
goldenFileComparator = TolerantComparator(goldenFile.uri);
Expand All @@ -28,7 +28,7 @@ void main() {

await expectLater(
find.byType(ZetaIndicator),
matchesGoldenFile(goldenFile.getFileUri('indicator_default.png')),
matchesGoldenFile(goldenFile.getFileUri('indicator_default')),
);
});

Expand Down Expand Up @@ -101,7 +101,7 @@ void main() {

await expectLater(
find.byType(ZetaIndicator),
matchesGoldenFile(goldenFile.getFileUri('indicator_icon_values.png')),
matchesGoldenFile(goldenFile.getFileUri('indicator_icon_values')),
);
});
testWidgets('Notification constructor initializes with correct parameters', (WidgetTester tester) async {
Expand All @@ -120,7 +120,7 @@ void main() {

await expectLater(
find.byType(ZetaIndicator),
matchesGoldenFile(goldenFile.getFileUri('indicator_notification_default.png')),
matchesGoldenFile(goldenFile.getFileUri('indicator_notification_default')),
);
});
testWidgets('Notification constructor with values', (WidgetTester tester) async {
Expand Down Expand Up @@ -149,7 +149,7 @@ void main() {

await expectLater(
find.byType(ZetaIndicator),
matchesGoldenFile(goldenFile.getFileUri('indicator_notification_values.png')),
matchesGoldenFile(goldenFile.getFileUri('indicator_notification_values')),
);
});
testWidgets('debugFillProperties works correctly', (WidgetTester tester) async {
Expand Down
16 changes: 8 additions & 8 deletions test/src/components/badge/label_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import '../../../test_utils/tolerant_comparator.dart';
import '../../../test_utils/utils.dart';

void main() {
const goldenFile = GoldenFinder(component: 'badge');
const goldenFile = GoldenFiles(component: 'badge');

setUpAll(() {
goldenFileComparator = TolerantComparator(goldenFile.uri);
Expand All @@ -22,7 +22,7 @@ void main() {
expect(label.label, 'Test Label');
expect(label.status, ZetaWidgetStatus.info);

await expectLater(find.byType(ZetaLabel), matchesGoldenFile(goldenFile.getFileUri('label_default.png')));
await expectLater(find.byType(ZetaLabel), matchesGoldenFile(goldenFile.getFileUri('label_default')));
});

testWidgets('Positive status', (WidgetTester tester) async {
Expand All @@ -33,7 +33,7 @@ void main() {

expect(label.status, ZetaWidgetStatus.positive);

await expectLater(find.byType(ZetaLabel), matchesGoldenFile(goldenFile.getFileUri('label_positive.png')));
await expectLater(find.byType(ZetaLabel), matchesGoldenFile(goldenFile.getFileUri('label_positive')));
});

testWidgets('Warning status', (WidgetTester tester) async {
Expand All @@ -44,7 +44,7 @@ void main() {

expect(label.status, ZetaWidgetStatus.warning);

await expectLater(find.byType(ZetaLabel), matchesGoldenFile(goldenFile.getFileUri('label_warning.png')));
await expectLater(find.byType(ZetaLabel), matchesGoldenFile(goldenFile.getFileUri('label_warning')));
});
testWidgets('Negative status', (WidgetTester tester) async {
await tester.pumpWidget(const TestApp(home: ZetaLabel(label: 'Test Label', status: ZetaWidgetStatus.negative)));
Expand All @@ -54,7 +54,7 @@ void main() {

expect(label.status, ZetaWidgetStatus.negative);

await expectLater(find.byType(ZetaLabel), matchesGoldenFile(goldenFile.getFileUri('label_negative.png')));
await expectLater(find.byType(ZetaLabel), matchesGoldenFile(goldenFile.getFileUri('label_negative')));
});
testWidgets('Neutral status', (WidgetTester tester) async {
await tester.pumpWidget(const TestApp(home: ZetaLabel(label: 'Test Label', status: ZetaWidgetStatus.neutral)));
Expand All @@ -64,7 +64,7 @@ void main() {

expect(label.status, ZetaWidgetStatus.neutral);

await expectLater(find.byType(ZetaLabel), matchesGoldenFile(goldenFile.getFileUri('label_neutral.png')));
await expectLater(find.byType(ZetaLabel), matchesGoldenFile(goldenFile.getFileUri('label_neutral')));
});

testWidgets('Dark mode', (WidgetTester tester) async {
Expand All @@ -80,7 +80,7 @@ void main() {

expect(label.status, ZetaWidgetStatus.info);

await expectLater(find.byType(ZetaLabel), matchesGoldenFile(goldenFile.getFileUri('label_dark.png')));
await expectLater(find.byType(ZetaLabel), matchesGoldenFile(goldenFile.getFileUri('label_dark')));
});

testWidgets('Sharp', (WidgetTester tester) async {
Expand All @@ -93,7 +93,7 @@ void main() {

expect(label.rounded, false);

await expectLater(find.byType(ZetaLabel), matchesGoldenFile(goldenFile.getFileUri('label_sharp.png')));
await expectLater(find.byType(ZetaLabel), matchesGoldenFile(goldenFile.getFileUri('label_sharp')));
});

testWidgets('debugFillProperties works correctly', (WidgetTester tester) async {
Expand Down
10 changes: 5 additions & 5 deletions test/src/components/badge/priority_pill_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import '../../../test_utils/tolerant_comparator.dart';
import '../../../test_utils/utils.dart';

void main() {
const goldenFile = GoldenFinder(component: 'badge');
const goldenFile = GoldenFiles(component: 'badge');

setUpAll(() {
goldenFileComparator = TolerantComparator(goldenFile.uri);
Expand All @@ -35,7 +35,7 @@ void main() {

await expectLater(
find.byType(ZetaPriorityPill),
matchesGoldenFile(goldenFile.getFileUri('priority_pill_default.png')),
matchesGoldenFile(goldenFile.getFileUri('priority_pill_default')),
);
});
testWidgets('High priority pill', (WidgetTester tester) async {
Expand Down Expand Up @@ -63,7 +63,7 @@ void main() {

await expectLater(
find.byType(ZetaPriorityPill),
matchesGoldenFile(goldenFile.getFileUri('priority_pill_high.png')),
matchesGoldenFile(goldenFile.getFileUri('priority_pill_high')),
);
});
testWidgets('Medium priority pill', (WidgetTester tester) async {
Expand All @@ -83,7 +83,7 @@ void main() {

await expectLater(
find.byType(ZetaPriorityPill),
matchesGoldenFile(goldenFile.getFileUri('priority_pill_medium.png')),
matchesGoldenFile(goldenFile.getFileUri('priority_pill_medium')),
);
});
testWidgets('Low priority pill', (WidgetTester tester) async {
Expand All @@ -105,7 +105,7 @@ void main() {

await expectLater(
find.byType(ZetaPriorityPill),
matchesGoldenFile(goldenFile.getFileUri('priority_pill_low.png')),
matchesGoldenFile(goldenFile.getFileUri('priority_pill_low')),
);
});
testWidgets('debugFillProperties works correctly', (WidgetTester tester) async {
Expand Down
6 changes: 3 additions & 3 deletions test/src/components/badge/status_label_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import '../../../test_utils/tolerant_comparator.dart';
import '../../../test_utils/utils.dart';

void main() {
const goldenFile = GoldenFinder(component: 'badge');
const goldenFile = GoldenFiles(component: 'badge');

setUpAll(() {
goldenFileComparator = TolerantComparator(goldenFile.uri);
Expand All @@ -24,7 +24,7 @@ void main() {

await expectLater(
find.byType(ZetaStatusLabel),
matchesGoldenFile(goldenFile.getFileUri('status_label_default.png')),
matchesGoldenFile(goldenFile.getFileUri('status_label_default')),
);
});
});
Expand All @@ -43,7 +43,7 @@ void main() {

await expectLater(
find.byType(ZetaStatusLabel),
matchesGoldenFile(goldenFile.getFileUri('status_label_custom.png')),
matchesGoldenFile(goldenFile.getFileUri('status_label_custom')),
);
});
testWidgets('debugFillProperties works correctly', (WidgetTester tester) async {
Expand Down
6 changes: 3 additions & 3 deletions test/src/components/badge/tag_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import '../../../test_utils/tolerant_comparator.dart';
import '../../../test_utils/utils.dart';

void main() {
const goldenFile = GoldenFinder(component: 'badge');
const goldenFile = GoldenFiles(component: 'badge');

setUpAll(() {
goldenFileComparator = TolerantComparator(goldenFile.uri);
Expand All @@ -24,7 +24,7 @@ void main() {

await expectLater(
find.byType(ZetaTag),
matchesGoldenFile(goldenFile.getFileUri('tag_right.png')),
matchesGoldenFile(goldenFile.getFileUri('tag_right')),
);
});

Expand All @@ -38,7 +38,7 @@ void main() {

await expectLater(
find.byType(ZetaTag),
matchesGoldenFile(goldenFile.getFileUri('tag_left.png')),
matchesGoldenFile(goldenFile.getFileUri('tag_left')),
);
});
});
Expand Down
18 changes: 9 additions & 9 deletions test/src/components/button/button_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import '../../../test_utils/tolerant_comparator.dart';
import '../../../test_utils/utils.dart';

void main() {
const goldenFile = GoldenFinder(component: 'button');
const goldenFile = GoldenFiles(component: 'button');

setUpAll(() {
goldenFileComparator = TolerantComparator(goldenFile.uri);
Expand Down Expand Up @@ -55,7 +55,7 @@ void main() {
expect(button.size, ZetaWidgetSize.medium);
expect(button.type, ZetaButtonType.primary);

await expectLater(find.byType(ZetaButton), matchesGoldenFile(goldenFile.getFileUri('button_primary.png')));
await expectLater(find.byType(ZetaButton), matchesGoldenFile(goldenFile.getFileUri('button_primary')));
});
testWidgets('Initializes secondary with correct Label', (WidgetTester tester) async {
await tester.pumpWidget(
Expand All @@ -80,7 +80,7 @@ void main() {

await expectLater(
find.byType(ZetaButton),
matchesGoldenFile(goldenFile.getFileUri('button_secondary.png')),
matchesGoldenFile(goldenFile.getFileUri('button_secondary')),
);
});
testWidgets('Initializes positive with correct Label', (WidgetTester tester) async {
Expand All @@ -101,7 +101,7 @@ void main() {

await expectLater(
find.byType(ZetaButton),
matchesGoldenFile(goldenFile.getFileUri('button_positive.png')),
matchesGoldenFile(goldenFile.getFileUri('button_positive')),
);
});
testWidgets('Initializes negative with correct Label', (WidgetTester tester) async {
Expand All @@ -122,7 +122,7 @@ void main() {

await expectLater(
find.byType(ZetaButton),
matchesGoldenFile(goldenFile.getFileUri('button_negative.png')),
matchesGoldenFile(goldenFile.getFileUri('button_negative')),
);
});
testWidgets('Initializes outline with correct Label', (WidgetTester tester) async {
Expand All @@ -141,7 +141,7 @@ void main() {
expect(button.size, ZetaWidgetSize.large);
expect(button.type, ZetaButtonType.outline);

await expectLater(find.byType(ZetaButton), matchesGoldenFile(goldenFile.getFileUri('button_outline.png')));
await expectLater(find.byType(ZetaButton), matchesGoldenFile(goldenFile.getFileUri('button_outline')));
});
testWidgets('Initializes outlineSubtle with correct Label', (WidgetTester tester) async {
await tester.pumpWidget(
Expand All @@ -161,7 +161,7 @@ void main() {

await expectLater(
find.byType(ZetaButton),
matchesGoldenFile(goldenFile.getFileUri('button_outline_subtle.png')),
matchesGoldenFile(goldenFile.getFileUri('button_outline_subtle')),
);
});
testWidgets('Initializes text with correct Label', (WidgetTester tester) async {
Expand All @@ -182,7 +182,7 @@ void main() {

await expectLater(
find.byType(ZetaButton),
matchesGoldenFile(goldenFile.getFileUri('button_text.png')),
matchesGoldenFile(goldenFile.getFileUri('button_text')),
);
});

Expand All @@ -205,7 +205,7 @@ void main() {

await expectLater(
find.byType(ZetaButton),
matchesGoldenFile(goldenFile.getFileUri('button_disabled.png')),
matchesGoldenFile(goldenFile.getFileUri('button_disabled')),
);
});
testWidgets('Interaction with button', (WidgetTester tester) async {
Expand Down
18 changes: 9 additions & 9 deletions test/src/components/chat_item/chat_item_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '../../../test_utils/tolerant_comparator.dart';
import '../../../test_utils/utils.dart';

void main() {
const goldenFile = GoldenFinder(component: 'chat_item');
const goldenFile = GoldenFiles(component: 'chat_item');

setUpAll(() {
goldenFileComparator = TolerantComparator(goldenFile.uri);
Expand Down Expand Up @@ -67,7 +67,7 @@ void main() {

await expectLater(
chatItemFinder,
matchesGoldenFile(goldenFile.getFileUri('chat_item_default.png')),
matchesGoldenFile(goldenFile.getFileUri('chat_item_default')),
);
});

Expand Down Expand Up @@ -122,7 +122,7 @@ void main() {

await expectLater(
chatItemFinder,
matchesGoldenFile(goldenFile.getFileUri('chat_item_highlighted.png')),
matchesGoldenFile(goldenFile.getFileUri('chat_item_highlighted')),
);
});

Expand Down Expand Up @@ -184,7 +184,7 @@ void main() {

await expectLater(
chatItemFinder,
matchesGoldenFile(goldenFile.getFileUri('chat_item_slidable_actions.png')),
matchesGoldenFile(goldenFile.getFileUri('chat_item_slidable_actions')),
);
});

Expand Down Expand Up @@ -238,7 +238,7 @@ void main() {

await expectLater(
chatItemFinder,
matchesGoldenFile(goldenFile.getFileUri('chat_item_pale_slidable_buttons.png')),
matchesGoldenFile(goldenFile.getFileUri('chat_item_pale_slidable_buttons')),
);
});

Expand Down Expand Up @@ -326,7 +326,7 @@ void main() {

await expectLater(
chatItemFinder,
matchesGoldenFile(goldenFile.getFileUri('chat_item_pale_and_regular_buttons.png')),
matchesGoldenFile(goldenFile.getFileUri('chat_item_pale_and_regular_buttons')),
);
});

Expand Down Expand Up @@ -370,7 +370,7 @@ void main() {

await expectLater(
chatItemFinder,
matchesGoldenFile(goldenFile.getFileUri('chat_item_custom_leading.png')),
matchesGoldenFile(goldenFile.getFileUri('chat_item_custom_leading')),
);
});

Expand Down Expand Up @@ -428,7 +428,7 @@ void main() {

await expectLater(
chatItemFinder,
matchesGoldenFile(goldenFile.getFileUri('chat_item_custom_slidable_buttons.png')),
matchesGoldenFile(goldenFile.getFileUri('chat_item_custom_slidable_buttons')),
);
});

Expand Down Expand Up @@ -544,7 +544,7 @@ void main() {

await expectLater(
chatItemFinder,
matchesGoldenFile(goldenFile.getFileUri('chat_item_small_screen_slidable_button.png')),
matchesGoldenFile(goldenFile.getFileUri('chat_item_small_screen_slidable_button')),
);
});
});
Expand Down
Loading

0 comments on commit e13f3c8

Please sign in to comment.