[React Native] Add new E2E tests

This commit is contained in:
Alex Akers 2015-07-10 03:59:29 -07:00
parent 40a043109d
commit ffaf16283f
2 changed files with 7 additions and 4 deletions

View File

@ -130,10 +130,11 @@ var TouchableFeedbackEvents = React.createClass({
},
render: function() {
return (
<View>
<View testID="touchable_feedback_events">
<View style={[styles.row, {justifyContent: 'center'}]}>
<TouchableOpacity
style={styles.wrapper}
testID="touchable_feedback_events_button"
onPress={() => this._appendEvent('press')}
onPressIn={() => this._appendEvent('pressIn')}
onPressOut={() => this._appendEvent('pressOut')}
@ -143,7 +144,7 @@ var TouchableFeedbackEvents = React.createClass({
</Text>
</TouchableOpacity>
</View>
<View style={styles.eventLogBox}>
<View testID="touchable_feedback_events_console" style={styles.eventLogBox}>
{this.state.eventLog.map((e, ii) => <Text key={ii}>{e}</Text>)}
</View>
</View>
@ -165,10 +166,11 @@ var TouchableDelayEvents = React.createClass({
},
render: function() {
return (
<View>
<View testID="touchable_delay_events">
<View style={[styles.row, {justifyContent: 'center'}]}>
<TouchableOpacity
style={styles.wrapper}
testID="touchable_delay_events_button"
onPress={() => this._appendEvent('press')}
delayPressIn={400}
onPressIn={() => this._appendEvent('pressIn - 400ms delay')}
@ -181,7 +183,7 @@ var TouchableDelayEvents = React.createClass({
</Text>
</TouchableOpacity>
</View>
<View style={styles.eventLogBox}>
<View style={styles.eventLogBox} testID="touchable_delay_events_console">
{this.state.eventLog.map((e, ii) => <Text key={ii}>{e}</Text>)}
</View>
</View>

View File

@ -190,6 +190,7 @@ class UIExplorerList extends React.Component {
onChangeText={this._search.bind(this)}
placeholder="Search..."
style={[styles.searchTextInput, platformTextInputStyle]}
testID="explorer_search"
value={this.state.searchText}
/>
</View>);