This file had previously been pointing to the `stable` branch behavior, but now that we are mirroring out to develop we want to use the `develop` behavior.
This fixes git lfs behavior so that snapshot tests can be committed to pull requests properly again.
PiperOrigin-RevId: 292365273
The merge from `stable` accidentally made it into `develop`. Once this is
fixed, and now that `stable` ignores merges, there should be no more
conflicts.
Follow-up to #8233
After fixing the lfs attribute in https://github.com/material-components/material-components-ios/pull/6350. We should turn git LFS back on to make sure new snapshots are stored on LFS. Snapshots committed after the change were not stored on LFS as a result. Because of it, some of our snapshots are stored on LFS, the rest are stored in binary file, which causes our build system is not able to run snapshot tests on those LFS snapshots.
This PR deletes all snapshot image binary files and adds them back in Git LFS file format. After turning the LFS back, Git is able to use LFS for our build/test system.
It also fixes https://github.com/material-components/material-components-ios/issues/8189.
We have two different versions of `.gitattributes` in the `develop` and
`stable` branches. To avoid conflicts (or accidental merges) between the two
branches, we define a custom merge strategy just for that file. During weekly
releases (or hotfixes), just after cloning the repository, the release
engineer should run this command:
git config merge.gitattributes.driver true
Follow-up to #5956
Git LFS integration is only valuable for contributors. However, having the `.gitattributes` settings in the `stable` branch means it will propagate to clients attempting to integrate MaterialComponents via CocoaPods. If the client doesn't have git-lfs installed, then they only get arcane errors when attempting to update.
Fixes#5956
* Snapshot Testing Proof of Concept (#5754)
### The problem
We currently do not have UI tests on a component level. Integrating snapshot tests would allow us to have peace of mind with each PR that it isn't going to introduce any changes to the UI unless its intended to.
### The solution
* Integrate `ios-snapshot-test-case` pod to handle generating and diffing images of components.
* Integrate `git-lfs` to handle storage of the goldens.
This PR creates one test to showcase the ability to do snapshot tests. Upon merging this PR, you must install git-lfs in order to properly have the images pulled down. The 3 steps to do this:
1. `brew install git-lfs`
2. `git lfs install`
3. `git lfs pull`
Additionally, the golden is generated using an iOS 11 simulator at 2x scale so that the kokoro jobs are happy.
### Related bugs
Closes#5740
### Difference from #5754
**Note:** This is a re-revert of #5754 that aims to fix issues with Travis CI by ensuring the snapshot test only runs on a single iOS version. I've opened #5888 to expand on this in the future. A few things changed in the approach in this PR:
* We only run the snapshot test for iOS 11.2.0 until we can have an elegant solution for supporting multiple OS''s (see #5888)
* The snapshot tests now live in their own test target to avoid issues with having to require an App host for all tests.
* Additionally, a dummy swift file was required for compilation of this new test target (see https://forums.developer.apple.com/thread/88451 for context)
### The problem
We currently do not have UI tests on a component level. Integrating snapshot tests would allow us to have peace of mind with each PR that it isn't going to introduce any changes to the UI unless its intended to.
### The solution
* Integrate `ios-snapshot-test-case` pod to handle generating and diffing images of components.
* Integrate `git-lfs` to handle storage of the goldens.
This PR creates one test to showcase the ability to do snapshot tests. Upon merging this PR, you must install git-lfs in order to properly have the images pulled down. The 3 steps to do this:
1. `brew install git-lfs`
2. `git lfs install`
3. `git lfs pull`
Additionally, the golden is generated using an iOS 11 simulator at 2x scale so that the kokoro jobs are happy.
### Related bugs
Closes#5740