-
Notifications
You must be signed in to change notification settings - Fork 499
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
Fixes #2627: Improve accessibility for Pin Verification Screen #4468
Fixes #2627: Improve accessibility for Pin Verification Screen #4468
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From Code perspective and implementation its really good.
Not sure why tests are failing, can you run End-to-End and other robolectric tests and check.
Also, maybe just merge with latest develop.
Unassigning @rt4914 since the review is done. |
Hi @vrajdesai78, it looks like some changes were requested on this pull request by @rt4914. PTAL. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove all DisableAccessibilityChecks
and corresponding TODO's for #3245
As this PR is fixing all of them too.
Unable to run robolectric tests locally. I have run espresso tests and they are passing as expected. I have tried to run all the robolectric tests of PinPasswordActivityTest but it's just loading. I have kept tests running for more than 30 mins but still not even one test is getting passed or failed. |
@vrajdesai78 are you able to run any app module Robolectric tests? If so, does the PinPasswordActivityTest pass for you on Robolectric for the develop branch (i.e. without your changes in this PR)? These details may help provide some clarity into what's happening. |
I have tried with develop branch. All test cases are passing in develop branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have been trying to check robolectric tests for almost a dozen hours now and these are my findings.
testPinPassword_withUser_forgot_inputAdminPinAndNewPinAndOldPin_wrongPinError
this test is incorrect aspin_password_incorrect_pin
is checked incorrectly.- The following four tests are unable to finish on Robolectric:
-
In all these 4 tests if we replace
hasErrorText(context.resources.getString(R.string.pin_password_incorrect_pin))
withhasNoErrorText
all tests pass which means that there is definitely some issue as the tests are not visible. -
Also, where-ever we are trying to append the text to the input-pin TextLayoutInput, we should use
onView(
allOf(
withId(R.id.pin_password_input_pin_edit_text),
isDescendantOfA(withId(R.id.pin_password_input_pin))
)
)
and not
onView(withId(R.id.pin_password_input_pin_edit_text))
Try to work around these cases.
Maybe directly add @Ignore
to above mentioned 4 tests and run all robolectirc tests without any change and notice they all pass. And now start debugging the remaining 4 tests one by one.
I have made few changes to test cases (which are incorrect changes too) just to show that all tests are either passing or failing. OutputCorresponding Code (definitely contains some incorrect code)https://gist.github.com/rt4914/2982b2a4c0bd13b213959902851040b0 |
@BenHenning Can you have a look at my last two comments here. Tests are not finishing in certain cases. |
@rt4914 how consistently does |
Not stale, I'm still working on this. |
Hi @vrajdesai78, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue. |
I think you can resolve this now @vrajdesai78 by changing pin_password_activity such that it doesn't have nested ConstraintLayouts. That will avoid the problem. |
@BenHenning I have fixed the failing test cases as per you suggestion by setting width to match_parent instead of 0dp. Also, added a new test to check that error is not displayed when correct pin is entered. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @vrajdesai78. Just had one follow-up comment about the change to pin_password_activity--PTAL.
0efed86
to
2dfe1e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @vrajdesai78. Just had one follow-up nit otherwise the change LGTM.
…://github.com/vrajdesai78/oppia-android into Improve-accessibility-pin-verification-screen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @vrajdesai78! LGTM.
Explanation
Fixes #2627: Improve accessibility for Pin Verification screen. I have removed seperate textview which is used to show error text. Now, error is set directly to PinPassPasswordInputEditText using onTextChanged extension function.
Essential Checklist
Before
current_profile_pin_full_video.mp4
After
oppia-pinscreen.mp4
Passing updated testcases