File tree 1 file changed +5
-1
lines changed
Sources/SnapshotTesting/Snapshotting
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 11
11
///
12
12
/// - Parameters:
13
13
/// - config: A set of device configuration settings.
14
+ /// - drawHierarchyInKeyWindow: Utilize the simulator's key window in order to render
15
+ /// `UIAppearance` and `UIVisualEffect`s. This option requires a host application for your
16
+ /// tests and will _not_ work for framework test targets.
14
17
/// - precision: The percentage of pixels that must match.
15
18
/// - perceptualPrecision: The percentage a pixel must match the source pixel to be considered a
16
19
/// match. 98-99% mimics
20
23
/// - traits: A trait collection override.
21
24
public static func image(
22
25
on config: ViewImageConfig ,
26
+ drawHierarchyInKeyWindow: Bool = false ,
23
27
precision: Float = 1 ,
24
28
perceptualPrecision: Float = 1 ,
25
29
size: CGSize ? = nil ,
34
38
snapshotView (
35
39
config: size. map { . init( safeArea: config. safeArea, size: $0, traits: config. traits) }
36
40
?? config,
37
- drawHierarchyInKeyWindow: false ,
41
+ drawHierarchyInKeyWindow: drawHierarchyInKeyWindow ,
38
42
traits: traits,
39
43
view: viewController. view,
40
44
viewController: viewController
You can’t perform that action at this time.
0 commit comments