Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion FBSnapshotTestCase/FBSnapshotTestController.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
#import <FBSnapshotTestCase/UIImage+Diff.h>
#import <FBSnapshotTestCase/UIImage+Snapshot.h>

#import <UIKit/UIKit.h>
@import UIKit;
@import XCTest;

NSString *const FBSnapshotTestControllerErrorDomain = @"FBSnapshotTestControllerErrorDomain";
NSString *const FBReferenceImageFilePathKey = @"FBReferenceImageFilePathKey";
Expand Down Expand Up @@ -184,6 +185,11 @@ - (BOOL)saveFailedReferenceImage:(UIImage *)referenceImage
NSData *referencePNGData = UIImagePNGRepresentation(referenceImage);
NSData *testPNGData = UIImagePNGRepresentation(testImage);

[XCTContext runActivityNamed:identifier block:^(id<XCTActivity> _Nonnull activity) {
[activity addAttachment:[XCTAttachment attachmentWithImage:referenceImage]];
[activity addAttachment:[XCTAttachment attachmentWithImage:testImage]];
}];

NSString *referencePath = [self _failedFilePathForSelector:selector
identifier:identifier
fileNameType:FBTestSnapshotFileNameTypeFailedReference];
Expand Down