Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pass down accessible from Card props to Touchable for Appium tests #812

Merged
merged 1 commit into from
Feb 21, 2019
Merged

fix: pass down accessible from Card props to Touchable for Appium tests #812

merged 1 commit into from
Feb 21, 2019

Conversation

t-d-o-g
Copy link
Contributor

@t-d-o-g t-d-o-g commented Feb 5, 2019

Motivation

The testID prop is not accessible on children of the TouchableWithoutFeedback component without explicitly setting accessible={false}. So accessible needs to be passed to touchable to find elements by testID value for Appium testing.

Test plan

TextInput in Card component will be made accessible by setting accessible={false} on Card

<Card style={styles.container} accessible={false}>
  <TextInput 
    style={styles.inputContainerStyle}
    testID='text-input'
    mode='outlined'
  />
</Card>

Test will validate that TextInput field is accessible

it('test that text input field is accessible', () => {
  $('~text-input').addValue('foo')
});

@callstack-bot
Copy link

Hey @t-d-o-g, thank you for your pull request 🤗. The documentation from this branch can be viewed here. Please remember to update Typescript types if you changed API.

@ferrannp ferrannp merged commit d29eb93 into callstack:master Feb 21, 2019
@BoazWarshawsky
Copy link

Hi, I am also having this issue with TouchableHighlight which they are children of SafeAreaView
Any idea how to solve it? adding accessible={false} into SafeAreaView did not solve the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants