Fix part of #3245 [A11y] Enabling AccessibilityChecks for PinPasswordActivityTest #4208
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation
Fix part of #3245 : Enable Accessibility Checks
Removed the
@DisableAccessibilityChecks
Annotation from the PinPasswordActivityTestThere were 27 tests with
@DisableAccessibilityChecks
Annotation in PinPasswordActivityTestSo running these tests after removing it caused an Accessibility error and it said to remove
ContentDescription
ofTextInputeditText
inpin_password_activity.xml
I have checked this using Accessibility scanner app too and it also showed the same result
There were 2 tests
fun testPinPassword_pinView_hasContentDescription()
andfun testPinPassword_configChange_pinView_hasContentDescription()
which check theContentDescription
of theTextinputEditText
. So I have to remove these testsScreenshots after running the tests
Device: Pixel 3a API 28
Device: Pixel C API 28
The only test which was failing was
fun testPinPassword_withUser_forgot_inputAdminPinAndNullPin_imeAction_errorIsDisplayed()
and it was failing even before removingContentDescription
and@DisableAccessibilityChecks
Annotation and not because of the changes made and the same test passes sometimes while running separatelyUI CHANGES
Essential Checklist
For UI-specific PRs only
If your PR includes UI-related changes, then: