cashapp / AccessibilitySnapshot

Easy regression testing for iOS accessibility
Apache License 2.0
534 stars 65 forks source link

SnapshotTesting: Allow users to specify precision when using `accessibilityImage` helper #179

Closed nononoah closed 5 months ago

nononoah commented 6 months ago

Currently, users who wish to evaluate accessibility snapshots via SnapshotTesting have no convenient way of specifying the precision of that evaluation.

Since the threshold for perceptible to human eye is less than 1, it may be ideal to allow users to modify this value to one that may be less flaky in heterogeneous execution contexts.

The method in question may be found here.

I would like to add a precision parameter to this method. Without as much, users wishing to modify the precision must recreate this work in some form and use AccessibilitySnapshotView directly so that may do so themselves.

If I've missed another approach here, apologies for the noise. I'm happy to write this (small) PR myself.

nononoah commented 6 months ago

PR opened here.

NickEntin commented 5 months ago

Hey Noah, this is tracked by issue #63 and has a draft PR #143 that gives some context on why we need to be careful with the way this is implemented (and why it's blocked at the moment). I'm going to close this issue and the associated PR as dupes, but let's continue any follow-up discussion on the open ones. Thanks!