Open
Conversation
ekigamba
suggested changes
Feb 20, 2023
| org.smartregister.util.Utils.getAllSharedPreferences().saveLastSyncDate(serverVersion); | ||
|
|
||
| // flag all contentious events as unsynced | ||
| EventDao.markEventsForReUpload(); |
Contributor
There was a problem hiding this comment.
Why not add a test for this?
Author
There was a problem hiding this comment.
@ekigamba this is the Protected method writing a unit test might not be applicable for it
Contributor
|
Kindly update the issue title |
Contributor
|
hilpitome
reviewed
Mar 1, 2023
|
|
||
| @Test | ||
| public void testHandleSync() { | ||
| chwSyncIntentService.handleSync(); |
There was a problem hiding this comment.
@junaidwarsivd I am not sure if testHandleSync() method is complete
ekigamba
suggested changes
Mar 9, 2023
| @Test | ||
| public void testGoToChildProfile() { | ||
| AllClientsUtils.goToChildProfile(mockActivity, mockPatient, mockBundle); | ||
| verify(mockActivity).startActivity(ArgumentMatchers.any()); |
Contributor
There was a problem hiding this comment.
- Kindly update this test to match the expected activity class here
- Check that the intent has the correct extras as expected
|
|
||
| verify(database).execSQL("ALTER TABLE ec_family ADD COLUMN entity_type VARCHAR; UPDATE ec_family SET entity_type = 'ec_family' WHERE id is not null;"); | ||
|
|
||
| verify(database).execSQL("ALTER TABLE ec_family ADD COLUMN entity_type VARCHAR; UPDATE ec_family SET entity_type = 'ec_family' WHERE id is not null;"); |
Contributor
There was a problem hiding this comment.
- Kindly remove the duplicated verification here
- Test/assert that the fields are added to the FTS table
| verify(mockBottomNavigationView).setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_LABELED); | ||
| verify(mockBottomNavigationView).inflateMenu(R.menu.bottom_nav_menu); | ||
| verify(mockBottomNavigationHelper).disableShiftMode(mockBottomNavigationView); | ||
| verify(mockBottomNavigationView).setOnNavigationItemSelectedListener(mockListener); |
Contributor
There was a problem hiding this comment.
Can we verify if the QR, job aids and reports items are removed if the flavor does not have them
| // fetch the last downloaded serverVersion before any unsyced data | ||
| Long serverVersion = EventDao.getMinimumVerifiedServerVersion(); | ||
| if (serverVersion != null) | ||
| org.smartregister.util.Utils.getAllSharedPreferences().saveLastSyncDate(serverVersion); |
Contributor
There was a problem hiding this comment.
Does this try to sync already synced events and clients? I just want to understand this
Contributor
|
Kindly rename the PR so that it's easy to search |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
added the missng code from the Pr 1855 in ChwSyncIntentService