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: Sources/SnapshotTestingHEIC/UIView.swift
+3
Original file line number
Diff line number
Diff line change
@@ -15,19 +15,22 @@ public extension Snapshotting where Value == UIView, Format == UIImage {
15
15
/// `UIAppearance` and `UIVisualEffect`s. This option requires a host application for your tests and
16
16
/// will _not_ work for framework test targets.
17
17
/// - precision: The percentage of pixels that must match.
18
+
/// - perceptualPrecision: The percentage a pixel must match the source pixel to be considered a match. [98-99% mimics the precision of the human eye.](http://zschuessler.github.io/DeltaE/learn/#toc-defining-delta-e)
18
19
/// - size: A view size override.
19
20
/// - traits: A trait collection override.
20
21
/// - compressionQuality: The desired compression quality to use when writing to an image destination.
Copy file name to clipboardExpand all lines: Sources/SnapshotTestingHEIC/UIViewController.swift
+6
Original file line number
Diff line number
Diff line change
@@ -13,19 +13,22 @@ public extension Snapshotting where Value == UIViewController, Format == UIImage
13
13
/// - Parameters:
14
14
/// - config: A set of device configuration settings.
15
15
/// - precision: The percentage of pixels that must match.
16
+
/// - perceptualPrecision: The percentage a pixel must match the source pixel to be considered a match. [98-99% mimics the precision of the human eye.](http://zschuessler.github.io/DeltaE/learn/#toc-defining-delta-e)
16
17
/// - size: A view size override.
17
18
/// - traits: A trait collection override.
18
19
/// - compressionQuality: The desired compression quality to use when writing to an image destination.
19
20
staticfunc imageHEIC(
20
21
on config:ViewImageConfig,
21
22
precision:Float=1,
23
+
perceptualPrecision:Float=1,
22
24
size:CGSize?=nil,
23
25
traits:UITraitCollection=.init(),
24
26
compressionQuality:CompressionQuality=.lossless
25
27
)
26
28
->Snapshotting{
27
29
returnSimplySnapshotting.imageHEIC(
28
30
precision: precision,
31
+
perceptualPrecision: perceptualPrecision,
29
32
scale: traits.displayScale,
30
33
compressionQuality: compressionQuality
31
34
).asyncPullback{ viewController in
@@ -46,19 +49,22 @@ public extension Snapshotting where Value == UIViewController, Format == UIImage
46
49
/// and `UIVisualEffect`s. This option requires a host application for your tests
47
50
/// and will _not_ work for framework test targets.
48
51
/// - precision: The percentage of pixels that must match.
52
+
/// - perceptualPrecision: The percentage a pixel must match the source pixel to be considered a match. [98-99% mimics the precision of the human eye.](http://zschuessler.github.io/DeltaE/learn/#toc-defining-delta-e)
49
53
/// - size: A view size override.
50
54
/// - traits: A trait collection override.
51
55
/// - compressionQuality: The desired compression quality to use when writing to an image destination.
0 commit comments