ET-5951: Updated snapshot tests after MR review
@@ -29,22 +29,21 @@ import proton_app_uniffi
|
|||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
final class MainToolbarSnapshotTests {
|
final class MainToolbarSnapshotTests {
|
||||||
@Test(arguments: [UIUserInterfaceStyle.light, .dark], [UpsellType.mailPlus, .unlimited])
|
@Test(arguments: [UpsellType.mailPlus, .unlimited])
|
||||||
func mainToolbarWithUpsell(style: UIUserInterfaceStyle, upsellType: UpsellType) {
|
func mainToolbarWithUpsell(upsellType: UpsellType) {
|
||||||
let view = makeToolbarView(upsellEligibility: .eligible(upsellType))
|
let view = makeToolbarView(upsellEligibility: .eligible(upsellType))
|
||||||
assertSnapshotsOnIPhoneX(
|
assertSnapshotsOnIPhoneX(
|
||||||
of: view,
|
of: view,
|
||||||
named: "upsellType.\(upsellType)",
|
named: "upsellType.\(upsellType)",
|
||||||
styles: [style],
|
|
||||||
drawHierarchyInKeyWindow: true,
|
drawHierarchyInKeyWindow: true,
|
||||||
precision: 0.99
|
precision: 0.99
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(arguments: [UIUserInterfaceStyle.light, .dark])
|
@Test
|
||||||
func mainToolbarWithoutUpsell(style: UIUserInterfaceStyle) {
|
func mainToolbarWithoutUpsell() {
|
||||||
let view = makeToolbarView(upsellEligibility: .notEligible)
|
let view = makeToolbarView(upsellEligibility: .notEligible)
|
||||||
assertSnapshotsOnIPhoneX(of: view, styles: [style], drawHierarchyInKeyWindow: true)
|
assertSnapshotsOnIPhoneX(of: view, drawHierarchyInKeyWindow: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func makeToolbarView(upsellEligibility: UpsellEligibility) -> some View {
|
private func makeToolbarView(upsellEligibility: UpsellEligibility) -> some View {
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 150 KiB After Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 146 KiB |
|
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 165 KiB |
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 149 KiB |
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 142 KiB |