Skip to content

Commit

Permalink
Merge pull request #344 from OpenSRP/translation-fixes-ba-master
Browse files Browse the repository at this point in the history
Translation fixes for BA in master
  • Loading branch information
hamza-vd authored Dec 14, 2020
2 parents 52c9d69 + a17b35c commit b886210
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=2.0.7-SNAPSHOT
VERSION_NAME=2.0.8-SNAPSHOT
VERSION_CODE=1
GROUP=org.smartregister
POM_SETTING_DESCRIPTION=OpenSRP Client Chw Core Library
Expand Down
6 changes: 3 additions & 3 deletions opensrp-chw-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -211,22 +211,22 @@ dependencies {
exclude group: 'org.smartregister', module: 'opensrp-client-family'
}

api('org.smartregister:opensrp-client-chw-malaria:1.2.18-SNAPSHOT@aar') {
api('org.smartregister:opensrp-client-chw-malaria:1.2.19-SNAPSHOT@aar') {
transitive = true
exclude group: 'org.smartregister', module: 'opensrp-client-core'
exclude group: 'org.smartregister', module: 'opensrp-client-native-form'
exclude group: 'org.smartregister', module: 'opensrp-client-configurable-views'
exclude group: 'com.android.support', module: 'appcompat-v7'
}

api('org.smartregister:opensrp-chw-family-planning:1.0.26-SNAPSHOT@aar') {
api('org.smartregister:opensrp-chw-family-planning:1.0.27-SNAPSHOT@aar') {
transitive = true
exclude group: 'org.smartregister', module: 'opensrp-client-core'
exclude group: 'org.smartregister', module: 'opensrp-client-native-form'
exclude group: 'org.smartregister', module: 'opensrp-client-configurable-views'
exclude group: 'com.android.support', module: 'appcompat-v7'
}
api('org.smartregister:opensrp-client-chw-referral:1.3.5-SNAPSHOT@aar') {
api('org.smartregister:opensrp-client-chw-referral:1.3.6-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 @@ -112,4 +112,9 @@ private void switchViews(View dueOnlyLayout, boolean isPress) {
protected void initializePresenter() {
presenter = new CoreAllClientsRegisterFragmentPresenter(this, new OpdRegisterFragmentModel());
}

@Override
protected int getToolBarTitle() {
return R.string.menu_all_clients;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package org.smartregister.chw.core.fragment;


import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.robolectric.util.ReflectionHelpers;
import org.smartregister.chw.core.BaseUnitTest;
import org.smartregister.chw.core.R;
import org.smartregister.chw.core.presenter.CoreAllClientsRegisterFragmentPresenter;

public class CoreAllClientsRegisterFragmentTest extends BaseUnitTest {


@Mock
private CoreAllClientsRegisterFragmentPresenter presenter;

private CoreAllClientsRegisterFragment fragment;

@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
fragment = Mockito.mock(CoreAllClientsRegisterFragment.class, Mockito.CALLS_REAL_METHODS);
ReflectionHelpers.setField(fragment, "presenter", presenter);
}

@Test
public void presenterInitializesCorrectly() {
fragment.initializePresenter();
Assert.assertNotNull(presenter);
}

@Test
public void testGetToolbarTitle() {
int title = fragment.getToolBarTitle();
Assert.assertEquals(R.string.menu_all_clients, title);
}
}

0 comments on commit b886210

Please sign in to comment.