Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Implement Xcode 9 integration using XCTAttachment API #230

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SiarheiFedartsou
Copy link

XCTest in Xcode 9 has a great new feature called attachments. It allows to add attachments to test results. So we can add our captured, reference and diff images to test if it was failed(see example on screenshot).
screen shot 2017-06-13 at 13 00 54

}

return nil;
}

- (void) addAttachementsWithErrors:(NSArray<NSError*>*)errors identifier:(NSString*)identifier {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Attachements/Attachments

}

return nil;
}

- (void) addAttachementsWithErrors:(NSArray<NSError*>*)errors identifier:(NSString*)identifier {
#ifdef __IPHONE_11_0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work on macOS? FBSnapshotTestCase supports both.

- (void) addAttachementsWithErrors:(NSArray<NSError*>*)errors identifier:(NSString*)identifier {
#ifdef __IPHONE_11_0
if (self.recordMode) {
UIImage* image = [_snapshotController referenceImageForSelector:self.invocation.selector identifier:identifier error:nil];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the repo uses a different style for asterisk–alignment, I think you should match it.

@SiarheiFedartsou
Copy link
Author

@alanzeino Thanks for your response! Just updated my pull request. Also I think that you meant tvOS, not macOS?

@alanzeino
Copy link
Contributor

Yep, I meant tvOS. Sorry! Hopefully the project maintainer merges this one soon.

@jakeatoms
Copy link

Is there a plan to merge and release this? Would love to start using it now!

@fassko
Copy link

fassko commented Sep 19, 2017

Where are maintainers of this library? :(

@remirobert
Copy link

remirobert commented Nov 19, 2017

@fassko the project is in the facebookarchive.
Does that mean there are no maintainers?

@alanzeino
Copy link
Contributor

Hey there! We just moved the repo over here:

https://github.com/uber/ios-snapshot-test-case

Sorry to make you do this, but if you recreate the pull request we'll review it in the new repo.

Thanks!

@delebedev
Copy link
Contributor

@SiarheiFedartsou are you still keen to have it merged? I could do it for you, just need to figure how I do "commit together" to leave the credits in git history.

I'm currently using own fork with this change applied and it's a tad inconvinient.

@SiarheiFedartsou
Copy link
Author

@garnett yes, still want to merge it, but I’m procrastinating to recreate the PR :) will be very thankful if you will do it for me 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants