cashapp / AccessibilitySnapshot

Easy regression testing for iOS accessibility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

nononoah opened this issue · comments

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.

PR opened here.

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!