Skip to content

Commit

Permalink
Merge pull request #180 from EyeSeeTea/development
Browse files Browse the repository at this point in the history
Release 1.2 (v1.0 at new Google Play Account)
  • Loading branch information
adrianq committed Apr 24, 2016
2 parents dad85a9 + 2630ce9 commit 840c470
Show file tree
Hide file tree
Showing 291 changed files with 12,456 additions and 11,525 deletions.
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "DBFlowORM"]
path = DBFlowORM
url = https://github.com/EyeSeeTea/DBFlow.git

[submodule "sdk"]
path = sdk
url = https://github.com/EyeSeeTea/dhis2-android-sdk.git
branch = 2.22_EyeSeeTea
1 change: 1 addition & 0 deletions DBFlowORM
Submodule DBFlowORM added at d297a6
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ We’d love to hear your thoughts on the initiative in general, improvements, ne

This app is compatible with SDK API version 15+.

## License
## License

This app is licensed under GPLv3. Please respect the terms of that license.
38 changes: 29 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}

dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
}
}
apply plugin: 'com.android.application'
Expand All @@ -13,17 +15,17 @@ apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
apply plugin: 'com.neenbedankt.android-apt'
//apply plugin: 'com.neenbedankt.android-apt'

android {
compileSdkVersion 21
buildToolsVersion "22.0.1"
defaultConfig {
applicationId 'org.eyeseetea.pictureapp'
applicationId 'org.eyeseetea.surveillance_kh'
minSdkVersion 15
targetSdkVersion 21
versionCode 6
versionName "3.0"
versionCode 1
versionName "1.0"
multiDexEnabled true

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -39,29 +41,47 @@ android {
}
//TODO This config is related to a known issue: http://stackoverflow.com/questions/20827885/android-studio-0-4-duplicate-files-copied-in-apk-meta-inf-license-txt
packagingOptions {
exclude 'LICENSE.txt'
// gradle requires to exclude these files both
// with .txt extension and without.
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'

// without .txt
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}
productFlavors {
}

lintOptions {
disable 'RtlSymmetry', 'RtlHardcoded'
}
}

dependencies {
apply plugin: 'android-apt'
apply plugin: 'com.github.dcendents.android-maven'


compile 'com.android.support:support-v4:21.1.1'
compile 'com.android.support:appcompat-v7:21.1.1'
compile 'com.android.support:support-annotations:21.1.0'

// App dependencies
compile 'com.github.satyan:sugar:1.3'
compile 'com.opencsv:opencsv:3.3'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.google.guava:guava:18.0'
compile 'com.squareup.okhttp:okhttp:2.2.0'
compile 'com.googlecode.libphonenumber:libphonenumber:7.0.9'
compile 'com.android.support:multidex:1.0.1'
apt 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
compile 'com.raizlabs.android:DBFlow-Core:2.2.1'
compile 'com.raizlabs.android:DBFlow:2.2.1'
// apt 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
// compile 'com.raizlabs.android:DBFlow-Core:2.2.1'
// compile 'com.raizlabs.android:DBFlow:2.2.1'
apt project(':DBFlowORM:DBFlow-Compiler')
compile project(':DBFlowORM:DBFlow-Core')
compile project(':DBFlowORM:DBFlow')
compile project(':sdk:app')

compile('com.crashlytics.sdk.android:crashlytics:2.5.1@aar') {
transitive = true;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,116 +1,116 @@
/*
* Copyright (c) 2015.
*
* This file is part of Facility QA Tool App.
*
* Facility QA Tool App is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Facility QA Tool App is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Foobar. If not, see <http://www.gnu.org/licenses/>.
*/

package org.eyeseetea.malariacare.test;

import android.support.test.InstrumentationRegistry;
import android.support.test.espresso.intent.rule.IntentsTestRule;
import android.support.test.runner.AndroidJUnit4;

import org.eyeseetea.malariacare.CreateSurveyActivity;
import org.eyeseetea.malariacare.R;
import org.eyeseetea.malariacare.database.utils.Session;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;

import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.intent.Intents.intended;
import static android.support.test.espresso.intent.matcher.IntentMatchers.anyIntent;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static junit.framework.Assert.assertNotNull;

/**
*
*/
@RunWith(AndroidJUnit4.class)
public class CreateSurveyEspressoTest extends MalariaEspressoTest{

@Rule
public IntentsTestRule<CreateSurveyActivity> mActivityRule = new IntentsTestRule<>(
CreateSurveyActivity.class);

@BeforeClass
public static void init(){
populateData(InstrumentationRegistry.getTargetContext().getAssets());
mockSurveys(1);
}

@Before
public void setup(){
super.setup();
}

@Test
public void form_views() {
onView(withId(R.id.org_unit)).check(matches(isDisplayed()));
onView(withId(R.id.program)).check(matches(isDisplayed()));
onView(withId(R.id.create_form_button)).check(matches(isDisplayed()));
}

@Test
public void no_selection_no_survey(){

//WHEN
onView(withId(R.id.create_form_button)).perform(click());

//THEN
onView(withText("Missing selection")).check(matches(isDisplayed())).perform(click());
}

@Test
public void select_data_create_survey(){

//WHEN
onView(withId(R.id.org_unit)).perform(click());
onView(withText("Health Facility 2")).perform(click());

onView(withId(R.id.program)).perform(click());
onView(withText("Clinical Case Management")).perform(click());

onView(withId(R.id.create_form_button)).perform(click());

//THEN
intended(anyIntent());
assertNotNull(Session.getSurvey());
}

@Test
public void select_repeated_data_no_survey(){

//WHEN
onView(withId(R.id.org_unit)).perform(click());
onView(withText("Health Facility 0")).perform(click());

onView(withId(R.id.program)).perform(click());
onView(withText("Clinical Case Management")).perform(click());

onView(withId(R.id.create_form_button)).perform(click());

//THEN
onView(withText("Existing Survey")).check(matches(isDisplayed())).perform(click());
}

}
///*
// * Copyright (c) 2015.
// *
// * This file is part of QIS Surveillance App.
// *
// * QIS Surveillance App is free software: you can redistribute it and/or modify
// * it under the terms of the GNU General Public License as published by
// * the Free Software Foundation, either version 3 of the License, or
// * (at your option) any later version.
// *
// * QIS Surveillance App is distributed in the hope that it will be useful,
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// * GNU General Public License for more details.
// *
// * You should have received a copy of the GNU General Public License
// * along with QIS Surveillance App. If not, see <http://www.gnu.org/licenses/>.
// */
//
//package org.eyeseetea.malariacare.test;
//
//import android.support.test.InstrumentationRegistry;
//import android.support.test.espresso.intent.rule.IntentsTestRule;
//import android.support.test.runner.AndroidJUnit4;
//
//import org.eyeseetea.malariacare.CreateSurveyActivity;
//import org.eyeseetea.malariacare.R;
//import org.eyeseetea.malariacare.database.utils.Session;
//import org.junit.Before;
//import org.junit.BeforeClass;
//import org.junit.Rule;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//
//import static android.support.test.espresso.Espresso.onView;
//import static android.support.test.espresso.action.ViewActions.click;
//import static android.support.test.espresso.assertion.ViewAssertions.matches;
//import static android.support.test.espresso.intent.Intents.intended;
//import static android.support.test.espresso.intent.matcher.IntentMatchers.anyIntent;
//import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
//import static android.support.test.espresso.matcher.ViewMatchers.withId;
//import static android.support.test.espresso.matcher.ViewMatchers.withText;
//import static junit.framework.Assert.assertNotNull;
//
///**
// *
// */
//@RunWith(AndroidJUnit4.class)
//public class CreateSurveyEspressoTest extends MalariaEspressoTest{
//
// @Rule
// public IntentsTestRule<CreateSurveyActivity> mActivityRule = new IntentsTestRule<>(
// CreateSurveyActivity.class);
//
// @BeforeClass
// public static void init(){
// populateData(InstrumentationRegistry.getTargetContext().getAssets());
// mockSurveys(1);
// }
//
// @Before
// public void setup(){
// super.setup();
// }
//
// @Test
// public void form_views() {
// onView(withId(R.id.org_unit)).check(matches(isDisplayed()));
// onView(withId(R.id.program)).check(matches(isDisplayed()));
// onView(withId(R.id.create_form_button)).check(matches(isDisplayed()));
// }
//
// @Test
// public void no_selection_no_survey(){
//
// //WHEN
// onView(withId(R.id.create_form_button)).perform(click());
//
// //THEN
// onView(withText("Missing selection")).check(matches(isDisplayed())).perform(click());
// }
//
// @Test
// public void select_data_create_survey(){
//
// //WHEN
// onView(withId(R.id.org_unit)).perform(click());
// onView(withText("Health Facility 2")).perform(click());
//
// onView(withId(R.id.program)).perform(click());
// onView(withText("Clinical Case Management")).perform(click());
//
// onView(withId(R.id.create_form_button)).perform(click());
//
// //THEN
// intended(anyIntent());
// assertNotNull(Session.getSurvey());
// }
//
// @Test
// public void select_repeated_data_no_survey(){
//
// //WHEN
// onView(withId(R.id.org_unit)).perform(click());
// onView(withText("Health Facility 0")).perform(click());
//
// onView(withId(R.id.program)).perform(click());
// onView(withText("Clinical Case Management")).perform(click());
//
// onView(withId(R.id.create_form_button)).perform(click());
//
// //THEN
// onView(withText("Existing Survey")).check(matches(isDisplayed())).perform(click());
// }
//
//}
Loading

0 comments on commit 840c470

Please sign in to comment.