-
Notifications
You must be signed in to change notification settings - Fork 62
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 the app showing a "Sync Complete" message even on sync failure #2599
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2599 +/- ##
=========================================
+ Coverage 65.4% 65.7% +0.2%
- Complexity 1101 1150 +49
=========================================
Files 213 216 +3
Lines 9385 9693 +308
Branches 1866 1927 +61
=========================================
+ Hits 6140 6370 +230
- Misses 2047 2103 +56
- Partials 1198 1220 +22
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
- Add IS NON PROXY flag documentation
07fc29a
to
ca1fb91
Compare
create(resource) | ||
try { | ||
create(resource) | ||
} catch (e: Exception) { |
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.
what type of exceptions are getting thrown here, can we make this more specific? let's add a test for this try/catch too
...ngine/src/main/java/org/smartregister/fhircore/engine/configuration/ConfigurationRegistry.kt
Outdated
Show resolved
Hide resolved
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
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'm going to try and add some more tests for this, I will get it merged before my EOD
val config = | ||
it.tryDecodeJson<RegisterConfiguration>() | ||
?: it.tryDecodeJson<ProfileConfiguration>() | ||
|
||
when (config) { | ||
is RegisterConfiguration -> | ||
config.fhirResource.dependentResourceTypes(patientRelatedResourceTypes) | ||
is ProfileConfiguration -> | ||
config.fhirResource.dependentResourceTypes(patientRelatedResourceTypes) | ||
val registerConfig = it.tryDecodeJson<RegisterConfiguration>() | ||
if (registerConfig != null) { | ||
if (registerConfig.configType == ConfigType.Profile.name) { | ||
val profileConfig = it.tryDecodeJson<ProfileConfiguration>() | ||
profileConfig | ||
?.fhirResource | ||
?.dependentResourceTypes( | ||
patientRelatedResourceTypes, | ||
) | ||
} else { | ||
registerConfig.fhirResource.dependentResourceTypes( | ||
patientRelatedResourceTypes, | ||
) | ||
} |
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.
because we are ignoring unknown keys, as it was written it always decodes as RegisterConfiguration
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.
with the new implementation looks like we might experience a crash if registerConfig was actually ever null
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.
actually scratch that, the if-else closes correctly
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.
maybe, it would be a pre-existing issue since that's the same as config getting set to null in the previous version, I think we have a test for that, but it might be passing b/c of mocks
* main: Add View and Row widget documentation (#2614) Document spacer and divider widgets. (#2612) Add the Practitioner selection screen on the In-app reporting workflow (#2605) Add enableFamilyRegistration test for GeoWidgetfragment (#2607) Improved UX for non proxy mode development 🔨 Update docs - added sync insights (#2600) Fixes the app showing a "Sync Complete" message even on sync failure (#2599) Retrieve related resources without necessarily having to pass a reference. (#2595) Add tests to verify LoginScreen error states (#2589) Rw docs update (#2588) Manifest Binaries request batching (#2583) remove about section (#2587) Pld doc updates (#2584) fix cname (#2586) Add Encounter_Location type (#2585) passing empty bundle instead of null to trigger the careplan when we don't have any bundle resource (#2432) Configure resource id for profile launch (#2581)
…2599) * Fix Missing Manifest Resources on Setup 🐛 * Enhance Sync Progress View logic * Fix NON PROXY flag incorrect state in dev mode * Improve UX when launching Insights - Add progress indicator * Fix bug: Sync Complete shown even after sync failed * Bump up Engine Artifact Version * Fix failing engine module tests Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com> * Fix Unit Tests 💚 - Add IS NON PROXY flag documentation * Catch SQLException also rename String constant Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com> * test passing params * fix deserialization bug and add test * spotless * add button test * test high error status * properties tests --------- Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com> Co-authored-by: Elly Kitoto <junkmailstoelly@gmail.com> Co-authored-by: pld <peter@ona.io>
IMPORTANT: Where possible all PRs must be linked to a Github issue
Closes #2575
Additionally Includes:
Engineer Checklist
strings.xml
file./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the project's style guideCode Reviewer Checklist
strings.xml
file