You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You want to make sure that every time you touch any of your UI elements everything stays as they way they were meant to be, also this kind of integration test help you achieve the pixel perfect views and make your designers happy by having design reference images that they can see even in your pull requests.
@@ -31,7 +32,7 @@ You want to make sure that every time you touch any of your UI elements everythi
31
32
Works by generating a reference image that gets stored in your repository and then comparing each new test case with the `reference image` to check if there are any differences. If test found any differences it will add an attachment into your test case and you'll be able to check what changed
32
33
33
34

34
-
35
+
35
36
### 🛠 Configuration
36
37
37
38
In order to configure the snapshot test folder, we need to add a new environment variable to the project with name `SNAP_REFERENCE_IMAGE_PATH` and value `$(SOURCE_ROOT)/$(PROJECT_NAME)Tests/` so `Snap.swift` can find the folder to store the reference images. If the configuration was correctly set the project should look like this:
@@ -49,7 +50,7 @@ it, simply add the following line to your Podfile:
49
50
pod 'Snap.swift'
50
51
```
51
52
52
-
### ✅ Creating our first test
53
+
### ✅ Creating our first test
53
54
54
55
1) We first need to record our reference images, in order to do so we have to first go into our test class and set the `isRecording` variable to be `true` so the library knows that we are in record mode and can extract the `reference images`
@@ -122,9 +123,9 @@ This is ok, it just means that our reference images were saved, we can inspect t
122
123
123
124
> As today, you can make assertions on `UIView` and `CALayer` classes.
124
125
125
-
This project is highly inspired on `Facebook`[FBSnapshotTestCase](https://github.com/facebookarchive/ios-snapshot-test-case/) library, it seems that they had archived the library so I started this one to continue envolving the project and continue with mobile `snapshot-testing`
126
+
This project is highly inspired on `Facebook`[FBSnapshotTestCase](https://github.com/facebookarchive/ios-snapshot-test-case/) library, it seems that they had archived the library so I started this one to continue envolving the project and continue with mobile `snapshot-testing`
126
127
127
-
### 😬 Contributions
128
+
### 😬 Contributions
128
129
- Open an [issue](https://github.com/skyweb07/Snap.swift/issues/new)
129
130
- Add suggestions or fix [issues](https://github.com/skyweb07/Snap.swift/issues) by opening PR's
130
131
- Send me a message via [Twitter](https://twitter.com/skyweb07)
0 commit comments