Skip to content

Commit

Permalink
Fix/ Pass testID to native PickerDialog (#1304)
Browse files Browse the repository at this point in the history
* Fix/ Pass testID to native PickerDialog

* update testID
  • Loading branch information
lidord-wix authored and ethanshar committed May 13, 2021
1 parent d3e240f commit 6906731
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/picker/PickerDialog.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ class PickerDialog extends BaseComponent {
}

renderPicker() {
const {children, onValueChange, selectedValue, renderNativePicker, wheelPickerProps} = this.props;
const {children, onValueChange, selectedValue, renderNativePicker, wheelPickerProps, testID} = this.props;
if (_.isFunction(renderNativePicker)) {
return renderNativePicker(this.props);
}
return (
<WheelPicker selectedValue={selectedValue} onChange={onValueChange} {...wheelPickerProps}>
<WheelPicker selectedValue={selectedValue} onChange={onValueChange} {...wheelPickerProps} testID={`${testID}.wheelPicker`}>
{children}
</WheelPicker>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/picker/PickerDialog.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ class PickerDialog extends BaseComponent {
}

renderPicker() {
const {children, onValueChange, selectedValue, renderNativePicker, pickerStyle} = this.props;
const {children, onValueChange, selectedValue, renderNativePicker, pickerStyle, testID} = this.props;
if (_.isFunction(renderNativePicker)) {
return renderNativePicker(this.props);
}
return (
<WheelPicker style={pickerStyle} selectedValue={selectedValue} onChange={onValueChange}>
<WheelPicker style={pickerStyle} selectedValue={selectedValue} onChange={onValueChange} testID={`${testID}.wheelPicker`}>
{children}
</WheelPicker>
);
Expand Down

0 comments on commit 6906731

Please sign in to comment.