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 9d5e95b
Show file tree
Hide file tree
Showing 7 changed files with 7 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/search_bar/golden/search_bar_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/search_bar/golden/search_bar_full.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/search_bar/golden/search_bar_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/search_bar/golden/search_bar_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/search_bar/golden/search_bar_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions test/src/components/search_bar/search_bar_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,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 +178,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 +194,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 +231,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 +263,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 +280,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

0 comments on commit 9d5e95b

Please sign in to comment.