Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecoomber committed Jul 29, 2024
1 parent 96c9ca0 commit 483a312
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
12 changes: 10 additions & 2 deletions lib/src/components/phone_input/phone_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,24 @@ class ZetaPhoneInput extends ZetaFormField<PhoneNumber> {
super.onSaved,
super.initialValue,
super.validator,
@Deprecated('Use onChange instead. ' 'Deprecated as of 0.15.0') ValueChanged<PhoneNumber?>? onChanged,
super.onChange,
super.requirementLevel = ZetaFormFieldRequirement.none,
this.label,
@Deprecated('Use hintText instead. ' 'Deprecated as of 0.15.0') String? hint,
this.hintText,
@Deprecated('Use disabled instead. ' 'Deprecated as of 0.15.0') bool enabled = true,
super.disabled = false,
@Deprecated('Use errorText instead') bool hasError = false,
@Deprecated('Use errorText instead. ' 'Deprecated as of 0.15.0') bool hasError = false,
this.errorText,
@Deprecated('Use initialValue instead') String? initialCountry,
@Deprecated('Use initialValue instead. ' 'Deprecated as of 0.15.0') String? initialCountry,
this.countries,
this.size = ZetaWidgetSize.medium,
@Deprecated('Set this as part of the initial value instead. ' 'Deprecated as of 0.15.0') String? countryDialCode,
@Deprecated('Set this as part of the initial value instead. ' 'enabled is deprecated as of 0.15.0')
String? phoneNumber,
@Deprecated('Country search hint is deprecated as of 0.15.0') String? countrySearchHint,
@Deprecated('Deprecated as of 0.15.0') bool? useRootNavigator,
this.selectCountrySemanticLabel,
super.autovalidateMode,
}) : super(
Expand Down
2 changes: 2 additions & 0 deletions lib/src/components/search_bar/search_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ class ZetaSearchBar extends ZetaTextFormField {
disabled: disabled,
size: size,
color: zeta.colors.iconSubtle,
key: const ValueKey('search-clear-btn'),
),
),
if (showSpeechToText)
Expand All @@ -148,6 +149,7 @@ class ZetaSearchBar extends ZetaTextFormField {
child: InputIconButton(
icon: ZetaIcons.microphone,
onTap: state.onSpeechToText,
key: const ValueKey('speech-to-text-btn'),
disabled: disabled,
size: size,
color: zeta.colors.iconDefault,
Expand Down
4 changes: 1 addition & 3 deletions test/src/components/search_bar/search_bar_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ void main() {
const hint = 'Search here';
const initialValue = 'Initial value';
const disabled = true;
const showLeadingIcon = false;
const showSpeechToText = false;
const textInputAction = TextInputAction.search;

Expand All @@ -302,9 +301,8 @@ void main() {
expect(builder.findProperty('size'), size);
expect(builder.findProperty('shape'), shape);
expect(builder.findProperty('hint'), hint);
expect(builder.findProperty('enabled'), disabled);
expect(builder.findProperty('disabled'), disabled);
expect(builder.findProperty('initialValue'), initialValue);
expect(builder.findProperty('showLeadingIcon'), showLeadingIcon);
expect(builder.findProperty('showSpeechToText'), showSpeechToText);
expect(builder.findProperty('textInputAction'), textInputAction);
expect(builder.findProperty('focusNode'), null);
Expand Down

0 comments on commit 483a312

Please sign in to comment.