[ReactNative] Fix sample app tests
Summary: @public After the refactor on RCTText, update the SampleApp's test to use the accessibilityLabel instead of attributedText Test Plan: Run the SampleApp tets
This commit is contained in:
parent
21b3304a95
commit
71216de931
|
@ -50,11 +50,8 @@
|
|||
redboxError = [[RCTRedBox sharedInstance] currentErrorMessage];
|
||||
|
||||
foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
|
||||
if ([view respondsToSelector:@selector(attributedText)]) {
|
||||
NSString *text = [(id)view attributedText].string;
|
||||
if ([text isEqualToString:TEXT_TO_LOOK_FOR]) {
|
||||
return YES;
|
||||
}
|
||||
if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}];
|
||||
|
|
Loading…
Reference in New Issue