-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
github-actions[bot]
committed
Oct 22, 2024
1 parent
31aac23
commit 694c152
Showing
69 changed files
with
406 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ buildLogic { | |
version( | ||
yyyy = 2024, | ||
version = 71, | ||
patch = 1, | ||
patch = 2, | ||
build = 1 | ||
) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
174 changes: 174 additions & 0 deletions
174
app/ios/Wallet/Tests/SnapshotTests/UITraitCollection+Devices.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
import SnapshotTesting | ||
import UIKit | ||
|
||
extension UITraitCollection { | ||
|
||
internal static func iPhone14(_ orientation: ViewImageConfig.Orientation) -> UITraitCollection { | ||
let base: [UITraitCollection] = [ | ||
UITraitCollection(forceTouchCapability: .unavailable), | ||
UITraitCollection(layoutDirection: .leftToRight), | ||
UITraitCollection(preferredContentSizeCategory: .medium), | ||
UITraitCollection(userInterfaceIdiom: .phone) | ||
] | ||
return switch orientation { | ||
case .landscape: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .regular), | ||
UITraitCollection(verticalSizeClass: .compact) | ||
]) | ||
case .portrait: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .compact), | ||
UITraitCollection(verticalSizeClass: .regular) | ||
]) | ||
} | ||
} | ||
|
||
internal static func iPhone14Plus(_ orientation: ViewImageConfig.Orientation) -> UITraitCollection { | ||
let base: [UITraitCollection] = [ | ||
UITraitCollection(forceTouchCapability: .unavailable), | ||
UITraitCollection(layoutDirection: .leftToRight), | ||
UITraitCollection(preferredContentSizeCategory: .medium), | ||
UITraitCollection(userInterfaceIdiom: .phone) | ||
] | ||
return switch orientation { | ||
case .landscape: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .regular), | ||
UITraitCollection(verticalSizeClass: .compact) | ||
]) | ||
case .portrait: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .compact), | ||
UITraitCollection(verticalSizeClass: .regular) | ||
]) | ||
} | ||
} | ||
|
||
internal static func iPhone14Pro(_ orientation: ViewImageConfig.Orientation) -> UITraitCollection { | ||
let base: [UITraitCollection] = [ | ||
UITraitCollection(forceTouchCapability: .unavailable), | ||
UITraitCollection(layoutDirection: .leftToRight), | ||
UITraitCollection(preferredContentSizeCategory: .medium), | ||
UITraitCollection(userInterfaceIdiom: .phone) | ||
] | ||
return switch orientation { | ||
case .landscape: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .regular), | ||
UITraitCollection(verticalSizeClass: .compact) | ||
]) | ||
case .portrait: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .compact), | ||
UITraitCollection(verticalSizeClass: .regular) | ||
]) | ||
} | ||
} | ||
|
||
internal static func iPhone14ProMax(_ orientation: ViewImageConfig.Orientation) -> UITraitCollection { | ||
let base: [UITraitCollection] = [ | ||
UITraitCollection(forceTouchCapability: .unavailable), | ||
UITraitCollection(layoutDirection: .leftToRight), | ||
UITraitCollection(preferredContentSizeCategory: .medium), | ||
UITraitCollection(userInterfaceIdiom: .phone) | ||
] | ||
return switch orientation { | ||
case .landscape: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .regular), | ||
UITraitCollection(verticalSizeClass: .compact) | ||
]) | ||
case .portrait: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .compact), | ||
UITraitCollection(verticalSizeClass: .regular) | ||
]) | ||
} | ||
} | ||
|
||
internal static func iPhone15(_ orientation: ViewImageConfig.Orientation) -> UITraitCollection { | ||
let base: [UITraitCollection] = [ | ||
UITraitCollection(forceTouchCapability: .unavailable), | ||
UITraitCollection(layoutDirection: .leftToRight), | ||
UITraitCollection(preferredContentSizeCategory: .medium), | ||
UITraitCollection(userInterfaceIdiom: .phone) | ||
] | ||
return switch orientation { | ||
case .landscape: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .regular), | ||
UITraitCollection(verticalSizeClass: .compact) | ||
]) | ||
case .portrait: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .compact), | ||
UITraitCollection(verticalSizeClass: .regular) | ||
]) | ||
} | ||
} | ||
|
||
internal static func iPhone15Plus(_ orientation: ViewImageConfig.Orientation) -> UITraitCollection { | ||
let base: [UITraitCollection] = [ | ||
UITraitCollection(forceTouchCapability: .unavailable), | ||
UITraitCollection(layoutDirection: .leftToRight), | ||
UITraitCollection(preferredContentSizeCategory: .medium), | ||
UITraitCollection(userInterfaceIdiom: .phone) | ||
] | ||
return switch orientation { | ||
case .landscape: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .regular), | ||
UITraitCollection(verticalSizeClass: .compact) | ||
]) | ||
case .portrait: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .compact), | ||
UITraitCollection(verticalSizeClass: .regular) | ||
]) | ||
} | ||
} | ||
|
||
internal static func iPhone15Pro(_ orientation: ViewImageConfig.Orientation) -> UITraitCollection { | ||
let base: [UITraitCollection] = [ | ||
UITraitCollection(forceTouchCapability: .unavailable), | ||
UITraitCollection(layoutDirection: .leftToRight), | ||
UITraitCollection(preferredContentSizeCategory: .medium), | ||
UITraitCollection(userInterfaceIdiom: .phone) | ||
] | ||
return switch orientation { | ||
case .landscape: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .regular), | ||
UITraitCollection(verticalSizeClass: .compact) | ||
]) | ||
case .portrait: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .compact), | ||
UITraitCollection(verticalSizeClass: .regular) | ||
]) | ||
} | ||
} | ||
|
||
internal static func iPhone15ProMax(_ orientation: ViewImageConfig.Orientation) -> UITraitCollection { | ||
let base: [UITraitCollection] = [ | ||
UITraitCollection(forceTouchCapability: .unavailable), | ||
UITraitCollection(layoutDirection: .leftToRight), | ||
UITraitCollection(preferredContentSizeCategory: .medium), | ||
UITraitCollection(userInterfaceIdiom: .phone) | ||
] | ||
return switch orientation { | ||
case .landscape: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .regular), | ||
UITraitCollection(verticalSizeClass: .compact) | ||
]) | ||
case .portrait: | ||
UITraitCollection(traitsFrom: base + [ | ||
UITraitCollection(horizontalSizeClass: .compact), | ||
UITraitCollection(verticalSizeClass: .regular) | ||
]) | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.