Skip to content

Commit 71216de

Browse files
committed
[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
1 parent 21b3304 commit 71216de

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

Examples/SampleApp/SampleAppTests/SampleAppTests.m

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,8 @@ - (void)testRendersWelcomeScreen {
5050
redboxError = [[RCTRedBox sharedInstance] currentErrorMessage];
5151

5252
foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
53-
if ([view respondsToSelector:@selector(attributedText)]) {
54-
NSString *text = [(id)view attributedText].string;
55-
if ([text isEqualToString:TEXT_TO_LOOK_FOR]) {
56-
return YES;
57-
}
53+
if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
54+
return YES;
5855
}
5956
return NO;
6057
}];

0 commit comments

Comments
 (0)