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
final class MainToolbarSnapshotTests {
@Test(arguments: [UIUserInterfaceStyle.light, .dark], [UpsellType.mailPlus, .unlimited])
func mainToolbarWithUpsell(style: UIUserInterfaceStyle, upsellType: UpsellType) {
@Test(arguments: [UpsellType.mailPlus, .unlimited])
func mainToolbarWithUpsell(upsellType: UpsellType) {
let view = makeToolbarView(upsellEligibility: .eligible(upsellType))
assertSnapshotsOnIPhoneX(
of: view,
named: "upsellType.\(upsellType)",
styles: [style],
drawHierarchyInKeyWindow: true,
precision: 0.99
)
}
@Test(arguments: [UIUserInterfaceStyle.light, .dark])
func mainToolbarWithoutUpsell(style: UIUserInterfaceStyle) {
@Test
func mainToolbarWithoutUpsell() {
let view = makeToolbarView(upsellEligibility: .notEligible)
assertSnapshotsOnIPhoneX(of: view, styles: [style], drawHierarchyInKeyWindow: true)
assertSnapshotsOnIPhoneX(of: view, drawHierarchyInKeyWindow: true)
}
private func makeToolbarView(upsellEligibility: UpsellEligibility) -> some View {