Picker.Item missing testID
See original GitHub issueEnvironment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i7-4750HQ CPU @ 2.00GHz
Memory: 82.27 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.11.3 - /usr/local/bin/node
npm: 5.6.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
IDEs:
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.0-alpha.8af6728 => 16.6.0-alpha.8af6728
react-native: 0.57.4 => 0.57.4
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Description
As you can see PickerIOS.Item
does not have a testID
, even though Picker.Item
does.
type PickerItemProps = $ReadOnly<{|
/**
* Text to display for this item.
*/
label: string,
/**
* The value to be passed to picker's `onValueChange` callback when
* this item is selected. Can be a string or an integer.
*/
value?: any,
/**
* Color of this item's text.
* @platform android
*/
color?: ColorValue,
/**
* Used to locate the item in end-to-end tests.
*/
testID?: string,
|}>;
type ItemProps = $ReadOnly<{|
label: ?Label,
value?: ?any,
color?: ?ColorValue,
|}>;
So I can’t find the Items
using Detox
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Unable to find the element with data-testid - Stack Overflow
I am following the docs for react-testing-library to find if the element with data-testid attribute is rendered or not.
Read more >react-native-picker-picker-fix - npm package | Snyk
React Native Picker for iOS, Android, macOS, and Windows For more information ... Looks like react-native-picker-picker-fix is missing a security policy.
Read more >React Native Item
renderItem: takes an item object from data to construct . Props label color testID value Reference Props label Text to display for this...
Read more >Picker.Item - React Native
Individual selectable item in a Picker. ... testID . Used to locate the item in end-to-end tests. Type, Required. string, No. value ....
Read more >Some components ignore html data attributes
However, setting a data-testid attribute (or really any data- ... The ones for Slider, SliderLabel, MultiSelect, and DatePicker are not.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.
The “⏪Old Version” label will be removed automatically once you edit your original post with the results of running
react-native info
on a project using the latest release.Thanks!
Picker
is moving to a community repo, I moved the issue there: https://github.com/react-native-community/react-native-picker/issues/8