Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

67: Use XCTContext runActivityNamed:block: to insert the step's title in the report #72

Merged
merged 8 commits into from
Jul 18, 2017
Merged

67: Use XCTContext runActivityNamed:block: to insert the step's title in the report #72

merged 8 commits into from
Jul 18, 2017

Conversation

TitouanVanBelle
Copy link
Contributor

This pull request tries to answer issue #67's needs and adds step titles in the report. It uses Xcode 9's new class XCTContext and therefore doesn't work on Xcode 9.

Here's how it looks on Xcode 9

screen shot 2017-06-21 at 17 36 47

Here's how it looks on Xcode 8

screen shot 2017-06-21 at 17 39 33

Let me know what you think

@brentleyjones brentleyjones self-requested a review June 26, 2017 13:47
@brentleyjones
Copy link
Collaborator

I'll get to this after the 4th of July. Busy at work and then a small vacation.

if (xctContextClass) {
SEL aSelector = NSSelectorFromString(@"runActivityNamed:block:");

id block = ^(id activity) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You an pull out this block before the check and then execute it in the else case. That way if we need to change what it does we only change it in one spot. Also, it makes the if case have a single responsibility of wrapping the activity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. Done

@brentleyjones brentleyjones merged commit 7726a9e into Ahmed-Ali:develop Jul 18, 2017
@brentleyjones
Copy link
Collaborator

Thanks @TitouanVanBelle!

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

Successfully merging this pull request may close these issues.

2 participants