[React Native] Add E2E tests for Catalyst that test login, app launcher, and opening UIExplorer, MAdMan, Groups

This commit is contained in:
Alex Akers 2015-05-29 05:18:42 -07:00
parent 03889780b9
commit 40da2c7e08
2 changed files with 7 additions and 3 deletions

View File

@ -409,13 +409,13 @@ var TextInput = React.createClass({
render: function() { render: function() {
if (Platform.OS === 'ios') { if (Platform.OS === 'ios') {
return this._renderIOs(); return this._renderIOS();
} else if (Platform.OS === 'android') { } else if (Platform.OS === 'android') {
return this._renderAndroid(); return this._renderAndroid();
} }
}, },
_renderIOs: function() { _renderIOS: function() {
var textContainer; var textContainer;
var autoCapitalize = autoCapitalizeConsts[this.props.autoCapitalize]; var autoCapitalize = autoCapitalizeConsts[this.props.autoCapitalize];
@ -515,7 +515,8 @@ var TextInput = React.createClass({
return ( return (
<TouchableWithoutFeedback <TouchableWithoutFeedback
onPress={this._onPress} onPress={this._onPress}
rejectResponderTermination={true}> rejectResponderTermination={true}
testID={this.props.testID}>
{textContainer} {textContainer}
</TouchableWithoutFeedback> </TouchableWithoutFeedback>
); );

View File

@ -58,6 +58,7 @@
[_rootView addSubview:_stackTraceTableView]; [_rootView addSubview:_stackTraceTableView];
UIButton *dismissButton = [UIButton buttonWithType:UIButtonTypeCustom]; UIButton *dismissButton = [UIButton buttonWithType:UIButtonTypeCustom];
dismissButton.accessibilityIdentifier = @"redbox-dismiss";
dismissButton.titleLabel.font = [UIFont systemFontOfSize:14]; dismissButton.titleLabel.font = [UIFont systemFontOfSize:14];
[dismissButton setTitle:@"Dismiss (ESC)" forState:UIControlStateNormal]; [dismissButton setTitle:@"Dismiss (ESC)" forState:UIControlStateNormal];
[dismissButton setTitleColor:[[UIColor whiteColor] colorWithAlphaComponent:0.5] forState:UIControlStateNormal]; [dismissButton setTitleColor:[[UIColor whiteColor] colorWithAlphaComponent:0.5] forState:UIControlStateNormal];
@ -65,6 +66,7 @@
[dismissButton addTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside]; [dismissButton addTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside];
UIButton *reloadButton = [UIButton buttonWithType:UIButtonTypeCustom]; UIButton *reloadButton = [UIButton buttonWithType:UIButtonTypeCustom];
reloadButton.accessibilityIdentifier = @"redbox-reload";
reloadButton.titleLabel.font = [UIFont systemFontOfSize:14]; reloadButton.titleLabel.font = [UIFont systemFontOfSize:14];
[reloadButton setTitle:@"Reload JS (\u2318R)" forState:UIControlStateNormal]; [reloadButton setTitle:@"Reload JS (\u2318R)" forState:UIControlStateNormal];
[reloadButton setTitleColor:[[UIColor whiteColor] colorWithAlphaComponent:0.5] forState:UIControlStateNormal]; [reloadButton setTitleColor:[[UIColor whiteColor] colorWithAlphaComponent:0.5] forState:UIControlStateNormal];
@ -172,6 +174,7 @@
{ {
if (!cell) { if (!cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"msg-cell"]; cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"msg-cell"];
cell.textLabel.accessibilityIdentifier = @"redbox-error";
cell.textLabel.textColor = [UIColor whiteColor]; cell.textLabel.textColor = [UIColor whiteColor];
cell.textLabel.font = [UIFont boldSystemFontOfSize:16]; cell.textLabel.font = [UIFont boldSystemFontOfSize:16];
cell.textLabel.lineBreakMode = NSLineBreakByWordWrapping; cell.textLabel.lineBreakMode = NSLineBreakByWordWrapping;