Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Example/SnapshotTests/AccessibilityPropertiesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ final class AccessibilitySnapshotTests: SnapshotTestCase {
label.align(withSuperview: .center)

if ProcessInfo().operatingSystemVersion.majorVersion != 13 {
SnapshotVerifyAccessibility(view, identifier: "monochrome", useMonochromeSnapshot: true)
SnapshotVerifyAccessibility(view, identifier: "monochrome", snapshotConfiguration: .init(viewRenderingMode: viewRenderingMode, colorRenderingMode: .monochrome))
}

SnapshotVerifyAccessibility(view, identifier: "polychrome", useMonochromeSnapshot: false)
SnapshotVerifyAccessibility(view, identifier: "polychrome", snapshotConfiguration: .init(viewRenderingMode: viewRenderingMode, colorRenderingMode: .fullColor))
}

// This test is currently disabled due to a bug in iOSSnapshotTestCase. See cashapp/AccessibilitySnapshot#75.
Expand All @@ -129,7 +129,7 @@ final class AccessibilitySnapshotTests: SnapshotTestCase {
)

usingDrawViewHierarchyInRect {
SnapshotVerifyAccessibility(view, useMonochromeSnapshot: false)
SnapshotVerifyAccessibility(view, snapshotConfiguration: .init(viewRenderingMode: viewRenderingMode, colorRenderingMode: .fullColor))
}
}

Expand Down Expand Up @@ -198,7 +198,7 @@ final class AccessibilitySnapshotTests: SnapshotTestCase {
parent.view.addSubview(view)

usingDrawViewHierarchyInRect {
SnapshotVerifyAccessibility(view, useMonochromeSnapshot: false)
SnapshotVerifyAccessibility(view, snapshotConfiguration: .init(viewRenderingMode: viewRenderingMode, colorRenderingMode: .fullColor))
}
}

Expand Down
6 changes: 3 additions & 3 deletions Example/SnapshotTests/ActivationPointTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ final class ActivationPointTests: SnapshotTestCase {
func testActivationPointDisabled() {
let viewController = ActivationPointViewController()
viewController.view.frame = UIScreen.main.bounds
SnapshotVerifyAccessibility(viewController.view, showActivationPoints: .never)
SnapshotVerifyAccessibility(viewController.view, snapshotConfiguration: .init(viewRenderingMode: viewRenderingMode, activationPointDisplay: .never))
}

func testActivationPointEnabledWhenOverridden() {
let viewController = ActivationPointViewController()
viewController.view.frame = UIScreen.main.bounds
SnapshotVerifyAccessibility(viewController.view, showActivationPoints: .whenOverridden)
SnapshotVerifyAccessibility(viewController.view, snapshotConfiguration: .init(viewRenderingMode: viewRenderingMode, activationPointDisplay: .whenOverridden))
}

func testActivationPointEnabled() {
let viewController = ActivationPointViewController()
viewController.view.frame = UIScreen.main.bounds
SnapshotVerifyAccessibility(viewController.view, showActivationPoints: .always)
SnapshotVerifyAccessibility(viewController.view, snapshotConfiguration: .init(viewRenderingMode: viewRenderingMode, activationPointDisplay: .always))
}

}
2 changes: 1 addition & 1 deletion Example/SnapshotTests/HighlightTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ final class HighlightTests: SnapshotTestCase {
view.textColor = .red
view.sizeToFit()

SnapshotVerifyAccessibility(view, useMonochromeSnapshot: false)
SnapshotVerifyAccessibility(view, snapshotConfiguration: .init(viewRenderingMode: viewRenderingMode, colorRenderingMode: .fullColor))
}

}
Loading