ET-5951: Updated snapshot tests after MR review

This commit is contained in:
Robin Dorpe
2026-04-28 15:29:50 +02:00
parent ef8255c069
commit 3db00b95a3
7 changed files with 5 additions and 6 deletions
@@ -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 {