From fe018b201c736394e75cda39e07c9c1fad3bf7e3 Mon Sep 17 00:00:00 2001 From: Rasmus Tauts Date: Fri, 15 Sep 2023 16:05:04 +0300 Subject: [PATCH] fixup! Add landscape snapshot testing capability This PR adds a capability to snapshot test screens in landscape, both with regular and large font. MOB-2653 --- SnapshotTests/SnapshotTestCase.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SnapshotTests/SnapshotTestCase.swift b/SnapshotTests/SnapshotTestCase.swift index def22a67c..6c9ddd635 100644 --- a/SnapshotTests/SnapshotTestCase.swift +++ b/SnapshotTests/SnapshotTestCase.swift @@ -201,8 +201,8 @@ extension Snapshotting where Value == UIViewController, Format == UIImage { .init(verticalSizeClass: .compact), .init(preferredContentSizeCategory: .accessibilityExtraExtraExtraLarge) ]) - let safeArea: UIEdgeInsets = .init(top: 0, left: 44, bottom: 24, right: 44) - let size: CGSize = .init(width: 896, height: 414) + let safeArea: UIEdgeInsets = .init(top: 0, left: 47, bottom: 21, right: 47) + let size: CGSize = .init(width: 844, height: 390) let viewImageConfig: ViewImageConfig = .init(safeArea: safeArea, size: size, traits: traits) return Self.image(on: viewImageConfig) @@ -217,8 +217,8 @@ extension Snapshotting where Value == UIViewController, Format == UIImage { .init(horizontalSizeClass: .regular), .init(verticalSizeClass: .compact) ]) - let safeArea: UIEdgeInsets = .init(top: 0, left: 44, bottom: 24, right: 44) - let size: CGSize = .init(width: 896, height: 414) + let safeArea: UIEdgeInsets = .init(top: 0, left: 47, bottom: 21, right: 47) + let size: CGSize = .init(width: 844, height: 390) let viewImageConfig: ViewImageConfig = .init(safeArea: safeArea, size: size, traits: traits) return Self.image(on: viewImageConfig)