-
Notifications
You must be signed in to change notification settings - Fork 299
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
Add condition to not populate string value if it's empty #2521
Add condition to not populate string value if it's empty #2521
Conversation
...in/java/com/google/android/fhir/datacapture/views/factories/DialogSelectViewHolderFactory.kt
Outdated
Show resolved
Hide resolved
This reverts commit 6f652e1.
…ensrp/android-fhir into 2520-open-choice-missing-string-value
…ensrp/android-fhir into 2520-open-choice-missing-string-value
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.
This is great - thanks very much for the contribution and jajoo for reviewing.
@FikriMilano, is there any way you can add a test to this? can you add a test file for optionselectdialogfragment? if it's easy to do we can also add a test in QuestionnaireUiEspressoTest
@jingtang10 When adding unit test, there's an issue of the view within the fragment giving null values e.g. the dialog title returns null even though it has been assigned with a value (The log has passed the code that assign value to the title). Another issue that might came up is, accessing the viewModel to check the saved options, but the viewModel is private. I need to add a public getter to for the viewmodel, and mark it as VisibleForTesting, if that's ok. I've tried espresso, there's no issue with the dialog title value, but there's a bit of an issue with accessing the viewModel flow property with coroutine. So yeah, continuing on this, let's see what I can do. |
- With unmerged PR #9 - WUP PR google#2178 - WUP google#2652 - WUP google#2521 - WUP google#2645 - WUP google#2648 - WUP google#2650
...apture/src/main/java/com/google/android/fhir/datacapture/views/OptionSelectDialogFragment.kt
Outdated
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.
LGTM
* Add condition to not populate string value if it's empty * Revert "Add condition to not populate string value if it's empty" This reverts commit 6f652e1. * Filter only non-empty text should be saved * spotless * Address review
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #2520
Description
Add condition to not populate string value if it's empty
Alternative(s) considered
N/A
Type
Bug fix
Screenshots (if applicable)
Screen.Recording.2024-04-23.at.09.20.54.mov
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.