-
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
Fix #3134: Admin Settings shows error message for null pin entries. #3181
Conversation
Write test case too. https://github.com/oppia/oppia-android/wiki/Oppia-Android-Testing |
@anandwana001 I have a question, in the Administrator Controls, the submit button only gets activated when the user enters a pin of length 5 but in this PR in the video if you see when a user is going to Administrator controls even if the submit button isn't activated, he can use his keyboard submit button and if he does that with an incorrect pin of whatever length less than 5 an error is shown, so I did the same for null string but this cant be tested. So is it okay if I don't include tests for this? |
@Arnold2381 Can we disable the keyboard from submitting? this makes out the keyboard in sync with the submit button state. |
I did figure out a way to test it. But yes we can remove it, and if I do that, I will be removing the tests for that. |
@anandwana001 Also PTAL in this one. |
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 @Arnold2381
left a few thoughts, will check test file in next iteration.
app/src/main/java/org/oppia/android/app/profile/AdminAuthActivityPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/profile/AdminAuthActivityTest.kt
Outdated
Show resolved
Hide resolved
@anandwana001 Sorry for the late reply, I was busy with my college exams and everything. |
Hi @Arnold2381 Looks like we lost track of this PR, are you still working on this, and could you update on where are we on this PR. Also, whenever you need a review of any member, please comment the persons' GitHub handle and add |
Hello @anandwana001 Yea so our discussion was on the tests I removed. I suggest there is no need of the tests and I removed it because the cases its testing for will never arise. As you will see when will enter a pin less then the length of the adminPin the button doesn't gets activated so I don't think it will ever show an error. The tests were required before because the keyboard submit button was allowing the user to press the submit button before the length of the admin pin entered but now, the keyboard submit button will have no action until and unless the pin length is same as admin and once same it acts same as the normal submit button. |
@anandwana001 PTAL |
@anandwana001 PTAL at this PR. |
I will take a look at this tonight. |
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.
Tested it, seems working for me.
Nit queries regarding test cases, else LGTM.
app/src/sharedTest/java/org/oppia/android/app/profile/AdminAuthActivityTest.kt
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/profile/AdminAuthActivityTest.kt
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/profile/PinPasswordActivityTest.kt
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/profile/PinPasswordActivityTest.kt
Show resolved
Hide resolved
@anandwana001 PTAL. |
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.
Nit changes suggested. Else looks good.
Merge with latest develop and wait for @anandwana001 approval.
app/src/sharedTest/java/org/oppia/android/app/profile/PinPasswordActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/profile/PinPasswordActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/profile/PinPasswordActivityTest.kt
Outdated
Show resolved
Hide resolved
@rt4914 done! |
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.
LGTM, 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.
LGTM
Explanation
Fixes #3134
WhatsApp.Video.2021-05-11.at.11.59.59.mp4
Screenshot of all the tests passing on espresso
Checklist