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
Conversation
There was a problem hiding this 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; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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%?
There was a problem hiding this comment.
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.
dc2523d
to
2160c09
Compare
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. |
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 |
We wanted to simply deprecate
agnosticOptions
and addfileNameOptions
in a non–breaking way, but it made the implementation a bit too difficult. So if you're here trying to figure out whereagnosticOptions
went, we renamed it tofileNameOptions
. 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