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
Copy file name to clipboardExpand all lines: .github/DEVELOP.md
+63-3
Original file line number
Diff line number
Diff line change
@@ -127,13 +127,73 @@ To run these UI tests follow some steps:
127
127
2.`bundle exec pod install`
128
128
3. Open *Showcase.xcworkspace*
129
129
4. Select *ShowcaseTests* scheme
130
-
5. Select some simulator (tests designed for *iPhone 13 Pro Max* and *iPhone 14 Pro Max* but works elsewhere)
130
+
5. Select *iPhone 16 Pro* simulator (the device used to tests and views rendering)
131
131
6. Run tests (Product -> Test)
132
132
133
133
Beware, if you add new UI tests using [swift-snapshot-testing](https://github.com/pointfreeco/swift-snapshot-testing) library, you may have new tests which fail at first time.
134
-
Indeed for new tests the tool makes snapshots of the views, thus for the first run no preview exist making the tests fail. You should run the tests twice for new tests.
134
+
Indeed for new tests the tool makes snapshots of the views, thus for the first run no previews exist making the tests fail. You should run the tests twice for new tests.
135
+
136
+
Such tests here are used to as to be sure the look and feel of any components and tokens rendering remain the expected ones.
137
+
138
+
Any interface modifications require regenerating the illustrations using the tool, i.e. run the tests twice. The reference illustrations have already been saved within the project.
139
+
140
+
**Note today because the showcase app is hosted in the repository, the tests assets are versioned too, thus the _Swift Package_ will be heavy when being downloaded because Xcode downloads the entire repository. When the showcase app will be extracted to an internal repository, the _Swift Package_ will be lighter**.
141
+
142
+
#### How to use to use swift-snapshot-testing library
143
+
144
+
1. Locate where are the reference images:
145
+
- In the Package directory, you will find the reference screenshots for the Orange and Inverse themes (Light/Dark), which will serve as comparison baselines.
The *swift-snapshot-testing tool* indicates that the issue originates from the transparent token illustration. We can observe that there are two paths: the first corresponds to our reference illustration (the one we intend to base our comparison on), while the second path is the illustration used for the current image of the application. You can open both paths and visually compare the differences.
172
+
173
+
7. Verify the output:
174
+
- It is recommended to use the `Show the Report Navigator` tool in Xcode :
0 commit comments