Skip to content

Commit e2de78e

Browse files
author
Artyom Razinov
committed
Fix missing fields in assertion error (#639)
1 parent 931aa8c commit e2de78e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

EarlGrey/Core/GREYElementInteraction.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -714,10 +714,10 @@ - (BOOL)grey_handleFailureOfAction:(id<GREYAction>)action
714714
[GREYError grey_nestedDescriptionForError:actionError]);
715715
} else {
716716
if ([actionError isKindOfClass:[GREYError class]]) {
717-
NSMutableDictionary *errorDetails = [[NSMutableDictionary alloc] init];
718-
errorDetails[kErrorDetailActionNameKey] = action.name;
717+
GREYError *greyError = (GREYError *)actionError;
718+
NSMutableDictionary *errorDetails = [[NSMutableDictionary alloc] initWithDictionary:greyError.errorInfo];
719719
errorDetails[kErrorDetailElementMatcherKey] = _elementMatcher.description;
720-
[(GREYError *)actionError setErrorInfo:errorDetails];
720+
[greyError setErrorInfo:errorDetails];
721721
}
722722
*userProvidedError = actionError;
723723
}

0 commit comments

Comments
 (0)