diff --git a/FBSnapshotTestCase/FBSnapshotTestController.m b/FBSnapshotTestCase/FBSnapshotTestController.m index 4fcd614..cbc3e02 100644 --- a/FBSnapshotTestCase/FBSnapshotTestController.m +++ b/FBSnapshotTestCase/FBSnapshotTestController.m @@ -13,7 +13,8 @@ #import #import -#import +@import UIKit; +@import XCTest; NSString *const FBSnapshotTestControllerErrorDomain = @"FBSnapshotTestControllerErrorDomain"; NSString *const FBReferenceImageFilePathKey = @"FBReferenceImageFilePathKey"; @@ -184,6 +185,11 @@ - (BOOL)saveFailedReferenceImage:(UIImage *)referenceImage NSData *referencePNGData = UIImagePNGRepresentation(referenceImage); NSData *testPNGData = UIImagePNGRepresentation(testImage); + [XCTContext runActivityNamed:identifier block:^(id _Nonnull activity) { + [activity addAttachment:[XCTAttachment attachmentWithImage:referenceImage]]; + [activity addAttachment:[XCTAttachment attachmentWithImage:testImage]]; + }]; + NSString *referencePath = [self _failedFilePathForSelector:selector identifier:identifier fileNameType:FBTestSnapshotFileNameTypeFailedReference];