-
Notifications
You must be signed in to change notification settings - Fork 256
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
Fixed Showing no validation errors when form opens #1309
Fixed Showing no validation errors when form opens #1309
Conversation
…android-fhir into 1001-fix-form-validation
…android-fhir into 1001-fix-form-validation
…android-fhir into 1001-fix-form-validation
…android-fhir into 1001-fix-form-validation
…android-fhir into 1001-fix-form-validation
…android-fhir into 1001-fix-form-validation
…android-fhir into 1001-fix-form-validation
@jingtang10 , would you be able to review this PR? |
...m/google/android/fhir/datacapture/views/QuestionnaireItemEditTextStringViewHolderDelegate.kt
Outdated
Show resolved
Hide resolved
...rc/main/java/com/google/android/fhir/datacapture/views/QuestionnaireItemViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
...rc/main/java/com/google/android/fhir/datacapture/views/QuestionnaireItemViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
...e/android/fhir/datacapture/views/QuestionnaireItemEditTextSingleLineViewHolderFactoryTest.kt
Outdated
Show resolved
Hide resolved
...le/android/fhir/datacapture/views/QuestionnaireItemEditTextMultiLineViewHolderFactoryTest.kt
Outdated
Show resolved
Hide resolved
...rc/main/java/com/google/android/fhir/datacapture/views/QuestionnaireItemViewHolderFactory.kt
Show resolved
Hide resolved
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.
looks pretty good - almost ready to merge
last thing - just add some test cases where you have changed the existing test cases by adding modified = true. just make sure that if modify is false, we're not showing validation errors. that's the whole point of this PR now.
...rc/main/java/com/google/android/fhir/datacapture/views/QuestionnaireItemViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
added the unit test cases for modify = false. Please review. Thanks |
PR gateways passed. |
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.
just a few small nits
thanks for this!
...rc/main/java/com/google/android/fhir/datacapture/views/QuestionnaireItemViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
...rc/main/java/com/google/android/fhir/datacapture/views/QuestionnaireItemViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
...capture/src/main/java/com/google/android/fhir/datacapture/views/QuestionnaireItemViewItem.kt
Outdated
Show resolved
Hide resolved
.../test/java/com/google/android/fhir/datacapture/validation/RequiredConstraintValidatorTest.kt
Outdated
Show resolved
Hide resolved
…views/QuestionnaireItemViewHolderFactory.kt Co-authored-by: Jing Tang <[email protected]>
…views/QuestionnaireItemViewHolderFactory.kt Co-authored-by: Jing Tang <[email protected]>
…views/QuestionnaireItemViewItem.kt Co-authored-by: Jing Tang <[email protected]>
…validation/RequiredConstraintValidatorTest.kt Co-authored-by: Jing Tang <[email protected]>
A 503 status code has been received, will attempt to retry the upload Begin Diagnostic HTTP informationStatus Code: 503 |
Fixes
#1001 #opensrp/fhircore#873
Description
The validation will not be triggered if the answers are empty or User hasn't made interaction with the input field yet whenever form opens. However the validation will be triggered if you open questionnaire with pre-defined answers since the condition checks if the answers are there or not.
Type
Choose one: ( Bug fix)
Screenshots (if applicable)
https://user-images.githubusercontent.com/35099184/152525877-d7d52896-3063-4925-903e-159a34d86a32.mp4
Checklist
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the style guide of this project./gradlew check
and./gradlew connectedCheck
to test my changes locally