-
Notifications
You must be signed in to change notification settings - Fork 276
Closed
Labels
Description
Describe the Feature
Currently different types of queries can return either host or composite elements:
Queries returning host components (
typeof node.type === 'string'):
testId: host, matched by normalisedtestIDproprole: host, matched byaccessibilityRoleprophintText: host, matched byaccessibilityHintproplabelText: host, matched byaccessibilityLabelpropa11yState: host, matched byaccessibilityStatepropa11yValue: host, matched byaccessibilityValuepropQueries returning composite components:
text: compositeTextfrom RN, matched by normalised and flattenedchildrenpropdisplayValue: compositeTextInputfrom RN, matched by normalisedvalueordefaultValuepropplaceholderText: compositeTextInputfrom RN, matched by normalisedplaceholderpropQueries returning either host or composite components:
UNSAFE_byType: either host or composite, matched byelement.typewhich can be eitherstringor component typeUNSAFE_byProps: either host or composite, matched byelement.propsoverlap
The goal of this feature request is to make text, displayValue & placeholderText return host components. This is probably a breaking change for our users so it should warrant a major release.
Possible Implementations
Use component-tree.ts functions from #1128 to get single host child of found composite Text and TextInput components from React Native.
Related Issues
AugustinLF