Skip to content
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

vaccine outreach column populated #273

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run unit tests with Gradle
run: ./gradlew :opensrp-child:jacocoTestReport --stacktrace -Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"
run: ./gradlew :opensrp-child:jacocoTestReport --stacktrace -Dorg.gradle.jvmargs="-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError"
- name: Generate Javadoc with Gradle
run: ./gradlew javadoc
- name: Upload coverage to Coveralls with Gradle
run: ./gradlew :opensrp-child:coveralls --stacktrace
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
2 changes: 1 addition & 1 deletion opensrp-child/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ dependencies {
exclude group: 'com.android.support', module: 'appcompat-v7'
}

api('org.smartregister:opensrp-client-immunization:4.0.0-SNAPSHOT@aar') {
api('org.smartregister:opensrp-client-immunization:4.0.2-SNAPSHOT@aar') {
transitive = true
exclude group: 'org.smartregister', module: 'opensrp-client-core'
exclude group: 'org.smartregister', module: 'opensrp-client-native-form'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public static void addVaccine(VaccineRepository vaccineRepository, Vaccine vacci
String providerId = allSharedPreferences.fetchRegisteredANM();
vaccine.setTeam(allSharedPreferences.fetchDefaultTeam(providerId));
vaccine.setTeamId(allSharedPreferences.fetchDefaultTeamId(providerId));

vaccine.setOutreach(vaccine.getLocationId().equals(allSharedPreferences.fetchDefaultLocalityId(providerId))? 0 : 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add null check that defaults to 0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ndegwamartin could you please change -Xmx4096m because i dont have permission to change the Ci.yml file
cc: @ellykits @dubdabasoduba

vaccine.setName(vaccine.getName().trim());
// Add the vaccine
vaccineRepository.add(vaccine);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,11 @@ public void getCombinedVaccineWithNonNullArgument() {
public void addVaccineWithVaccineRepositoryOrVaccineNotNull() {
Vaccine vaccine = new Vaccine();
vaccine.setName("testvaccine");
vaccine.setLocationId("location1");
vaccine.setOutreach(1);
Assert.assertNotNull(vaccine);
Utils.addVaccine(vaccineRepository, vaccine);
Mockito.verify(vaccineRepository, Mockito.times(1)).add(vaccineArgumentCaptor.capture());
Assert.assertEquals(vaccine, vaccineArgumentCaptor.getValue());
Mockito.verify(vaccineRepository, Mockito.times(1)).add(vaccine);
}

@Test
Expand Down