Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to disable Accessibility checks #8

Closed
vaughandroid opened this issue Aug 13, 2018 · 3 comments
Closed

Make it possible to disable Accessibility checks #8

vaughandroid opened this issue Aug 13, 2018 · 3 comments

Comments

@vaughandroid
Copy link

As far as I can tell, it isn't possible to disable the accessibility checks once they are enabled. This makes it impossible to use for a subset of tests.

Adding a method like AccessibilityChecks.disable() would make it possible to add the accessibility checks to cover specific tests, rather than the whole suite.

@caseyburkhardt
Copy link
Member

Yes, we should have exposed a disable() on AccessibilityChecks. Will look into it.

As a workaround for now, give this a shot:
ViewActions.removeGlobalAssertion(AccessibilityChecks.accessibilityAssertion());

@vaughandroid
Copy link
Author

Finally got around to trying to build a TestRule using this workaround. It doesn't work, since AccessibilityChecks.checksEnabled doesn't get reset. I've hacked it for now with reflection.

For anyone else who runs into this, it looks like the commit here fixes it in AndroidX: android/android-test@ac49334

@caseyburkhardt
Copy link
Member

Resolved by this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants