You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 30, 2020. It is now read-only.
I tried using the selector option for one of my custom queries
What happened:
Reproduction:
Example:
test.only('selector? bug',()=>{const{ baseElement, debug }=ntlRender(<TextaccessibilityLabel="Hi"accessibilityStates={['disabled']}>
Hi
</Text>);// always finds because selector is not recognized as a filterconstalwaysFinds=getByLabelText(baseElement,'Hi',{selector: ({ props })=>props.acessibilityStates.includes('selected'),});debug(alwaysFinds);constwillFind=getByLabelText(baseElement,'Hi',{// @ts-ignorefilter: ({ props })=>props.accessibilityStates.includes('disabled'),});debug(willFind);// throws as expected:constwillNotFind=getByLabelText(baseElement,'Hi',{// @ts-ignorefilter: ({ props })=>props.accessibilityStates.includes('selected'),});debug(willNotFind);});
Problem description:
I think this is just a naming issue between filter and selector
Suggested solution:
Either update the implementation to change the named parameter to be selector or update the typings / docs to reflect that the name should be filter
Can you help us fix this issue by submitting a pull request?
Yup
The text was updated successfully, but these errors were encountered:
yup no problem -- do you prefer keeping the filter option or should I change it to selector? when i checked there was only ~3 functions with the filter named argument to update
Uh oh!
There was an error while loading. Please reload this page.
Looks like this option is implemented with the namespace 'filter' rather than selector, and the typescript definition flags this.
e.g in query-helpers.js:
Relevant code or config:
What you did:
I tried using the selector option for one of my custom queries
What happened:
Reproduction:
Example:
Problem description:
I think this is just a naming issue between
filter
andselector
Suggested solution:
Either update the implementation to change the named parameter to be
selector
or update the typings / docs to reflect that the name should befilter
Can you help us fix this issue by submitting a pull request?
Yup
The text was updated successfully, but these errors were encountered: