paulz / SwiftUI-snapshot-testing

Practical SwiftUI Snapshot Testing
MIT License
6 stars 1 forks source link

5% color difference on virtual Mac #24

Open paulz opened 2 years ago

paulz commented 2 years ago
name expected actual difference
FavoriteView.1 expected 1 actual1 diff 1
FavoriteView.2 expected 2 actual2 diff 2

https://github.com/paulz/SwiftUI-snapshot-testing/actions/runs/2566873073

example-tests.xcresult.zip

image
  Assertions: Assertion Failure at SnapshotTests.swift:10: failed - view did not match snapshot
some pixels were different by 3.125% in color
max allowed difference in color: 0.0%
see attached `difference` image between actual and expected
  File: SnapshotTests.swift:10

  Assertions: Assertion Failure at SnapshotTests.swift:10: failed - view did not match snapshot
some pixels were different by 4.6875% in color
max allowed difference in color: 0.0%
see attached `difference` image between actual and expected
  File: SnapshotTests.swift:10
paulz commented 2 years ago

on M1 mac book pro color difference is within 1.57%: Test-Example-2022.06.26_22-00-37--0700.xcresult.zip

  Assertions: Assertion Failure at SnapshotTests.swift:10: failed - view did not match snapshot
some pixels were different by 1.5625% in color
max allowed difference in color: 0.0%
see attached `difference` image between actual and expected
  File: SnapshotTests.swift:10

actual image_1_9C41B37C-8FF7-4606-B4BC-D1B710AF8738 difference_2_9C41B37C-8FF7-4606-B4BC-D1B710AF8738

actual image_1_15FD064F-DDB9-4772-A63F-B976DAB9FB72 difference_2_15FD064F-DDB9-4772-A63F-B976DAB9FB72