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

Remove deviceAgnostic, agnosticOptions, add new replacement called fileNameOptions #64

Merged
merged 1 commit into from Jan 22, 2019

Conversation

alanzeino
Copy link
Collaborator

@alanzeino alanzeino commented Jan 10, 2019

We wanted to simply deprecate agnosticOptions and add fileNameOptions in a non–breaking way, but it made the implementation a bit too difficult. So if you're here trying to figure out where agnosticOptions went, we renamed it to fileNameOptions. Screen Scale is now part of the file options mask, so if you want to remove screen scale from your file names you can do so.

Fixes #30
Fixes #52

@alanzeino alanzeino changed the title Remove deviceAgnostic, deprecate agnosticOptions, add new replacement… Remove deviceAgnostic, agnosticOptions, add new replacement called fileNameOptions Jan 10, 2019
Copy link

@reidmain reidmain left a comment

Choose a reason for hiding this comment

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

Big fan of removing both of those properties in a single PR. The migration is incredibly straightforward and gets us to a much cleaner and understandable codebase.

@@ -151,9 +151,9 @@
B31987FF1AB782D100B0A900 /* Tests */,
B31987F11AB782D000B0A900 /* Products */,
);
indentWidth = 2;

Choose a reason for hiding this comment

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

👍
You're doing God's work.

@@ -95,23 +95,25 @@ - (void)testCompareReferenceImageWithDifferentSizes
XCTAssertEqual(error.code, FBSnapshotTestControllerErrorCodeImagesDifferentSizes);
}

- (void)testFailedImageWithDeviceAgnosticShouldHaveModelOnName
- (void)testFailedImageWithFileNameOptionShouldHaveModelOnName

Choose a reason for hiding this comment

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

Can we add three additional tests for other file name options to get code coverage for this method up to 100%?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added a test that covers all the file name options with a for loop, and added a test that covers all the file name options in one file name at the same time.

@alanzeino alanzeino force-pushed the options branch 2 times, most recently from dc2523d to 2160c09 Compare January 17, 2019 02:05
@babbage
Copy link

babbage commented Jan 18, 2019

Agree with the OP in #52. I also noted when I first started using this tool that the naming for both the old and new properties was the exact reverse of the correct meaning—so just endorsing this is a good change to make in order to have human-readable properties that make sense.

@alanzeino alanzeino merged commit cf53b4c into master Jan 22, 2019
@alanzeino alanzeino deleted the options branch January 22, 2019 21:06
@timmythompsen
Copy link

Is there any way you can provide an example of how to implement the new fileNameOptions update? Thanks in advance

@alanzeino
Copy link
Collaborator Author

Is there any way you can provide an example of how to implement the new fileNameOptions update? Thanks in advance

There's an example in the headerdoc

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.

None yet

4 participants