Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecoomber committed Oct 14, 2024
1 parent e34257d commit 0a7b40c
Show file tree
Hide file tree
Showing 67 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Widget searchBarUseCase(BuildContext context) {
size: size,
shape: shape,
disabled: disabled,
hintText: hint,
placeholder: hint,
showSpeechToText: showSpeechToText,
onChange: (value) {
if (value == null) return;
Expand Down
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_initials_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/badge/golden/indicator_default.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/badge/golden/indicator_icon_default.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/badge/golden/indicator_icon_values.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/badge/golden/indicator_notification_default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/badge/golden/label_dark.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/badge/golden/label_default.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/badge/golden/label_negative.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/badge/golden/label_neutral.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/badge/golden/label_positive.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/badge/golden/label_sharp.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/badge/golden/label_warning.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/badge/golden/priority_pill_default.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/badge/golden/priority_pill_high.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/badge/golden/priority_pill_low.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/badge/golden/priority_pill_medium.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/badge/golden/status_label_custom.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/badge/golden/status_label_default.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/badge/golden/tag_left.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/badge/golden/tag_right.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/button/golden/button_disabled.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/button/golden/button_negative.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/button/golden/button_outline.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/button/golden/button_outline_subtle.png
Binary file modified test/src/components/button/golden/button_positive.png
Binary file modified test/src/components/button/golden/button_primary.png
Binary file modified test/src/components/button/golden/button_secondary.png
Binary file modified test/src/components/button/golden/button_text.png
Binary file modified test/src/components/chat_item/golden/chat_item_custom_leading.png
Binary file modified test/src/components/chat_item/golden/chat_item_default.png
Binary file modified test/src/components/chat_item/golden/chat_item_highlighted.png
Binary file modified test/src/components/checkbox/golden/checkbox_disabled.png
Binary file modified test/src/components/checkbox/golden/checkbox_enabled.png
Binary file modified test/src/components/checkbox/golden/checkbox_hover.png
Binary file modified test/src/components/dialpad/golden/dialpad_disabled.png
Binary file modified test/src/components/dialpad/golden/dialpad_enabled.png
Binary file modified test/src/components/dialpad/golden/dialpadbutton.png
Binary file modified test/src/components/fab/golden/FAB_default.png
Binary file modified test/src/components/fab/golden/FAB_disabled.png
Binary file modified test/src/components/fab/golden/FAB_inverse.png
Binary file modified test/src/components/fab/golden/FAB_pressed.png
Binary file modified test/src/components/fab/golden/FAB_secondary.png
Binary file modified test/src/components/password/golden/password_default.png
Binary file modified test/src/components/password/golden/password_error.png
Binary file modified test/src/components/search_bar/golden/search_bar_default.png
Binary file modified test/src/components/search_bar/golden/search_bar_full.png
Binary file modified test/src/components/search_bar/golden/search_bar_medium.png
Binary file modified test/src/components/search_bar/golden/search_bar_sharp.png
Binary file modified test/src/components/search_bar/golden/search_bar_small.png
13 changes: 7 additions & 6 deletions test/src/components/search_bar/search_bar_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:zeta_flutter/src/components/text_input/internal_text_input.dart';
import 'package:zeta_flutter/zeta_flutter.dart';

import '../../../test_utils/test_app.dart';
Expand Down Expand Up @@ -47,7 +48,7 @@ void main() {
);

await tester.pumpAndSettle();
expect(find.byType(TextFormField), findsOneWidget);
expect(find.byType(TextField), findsOneWidget);
});

testWidgets('golden: renders initializes correctly', (WidgetTester tester) async {
Expand Down Expand Up @@ -178,7 +179,7 @@ void main() {
);

await tester.pumpAndSettle();
await tester.enterText(find.byType(TextFormField), 'New text');
await tester.enterText(find.byType(TextField), 'New text');
await tester.pump();

verify(callbacks.onChange.call('New text')).called(1);
Expand All @@ -194,7 +195,7 @@ void main() {
);

await tester.pumpAndSettle();
await tester.enterText(find.byType(TextFormField), 'Submit text');
await tester.enterText(find.byType(TextField), 'Submit text');
await tester.testTextInput.receiveAction(TextInputAction.done);
await tester.pump();

Expand Down Expand Up @@ -231,7 +232,7 @@ void main() {
);

await tester.pumpAndSettle();
await tester.enterText(find.byType(TextFormField), 'Disabled input');
await tester.enterText(find.byType(TextField), 'Disabled input');
await tester.pump();

expect(find.text('Disabled input'), findsNothing);
Expand Down Expand Up @@ -263,7 +264,7 @@ void main() {
);

await tester.pumpAndSettle();
await tester.enterText(find.byType(TextFormField), 'New text');
await tester.enterText(find.byType(TextField), 'New text');
await tester.pump();

verify(callbacks.onChange.call('New text')).called(1);
Expand All @@ -280,7 +281,7 @@ void main() {

expect(diagnostics.finder('size'), 'medium');
expect(diagnostics.finder('shape'), 'rounded');
expect(diagnostics.finder('hintText'), 'null');
expect(diagnostics.finder('placeholder'), 'null');
expect(diagnostics.finder('textInputAction'), 'null');
expect(diagnostics.finder('onSpeechToText'), 'null');
expect(diagnostics.finder('showSpeechToText'), 'true');
Expand Down
Binary file modified test/src/components/tooltip/golden/arrow_down.png
Binary file modified test/src/components/tooltip/golden/arrow_left.png
Binary file modified test/src/components/tooltip/golden/arrow_right.png
Binary file modified test/src/components/tooltip/golden/arrow_up.png

0 comments on commit 0a7b40c

Please sign in to comment.