Skip to content
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
2 changes: 1 addition & 1 deletion .settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Wed Apr 18 11:43:18 EAT 2018
connection.project.dir=
eclipse.preferences.version=1
2 changes: 1 addition & 1 deletion app/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>
5 changes: 2 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ android {
}
prod {
// Should switch to art-backend in production
buildConfigField "String" ,"BASE_URL", "\"http://api-staging-art.andela.com\""
// buildConfigField "String" ,"BASE_URL", "\"https://art-backend.herokuapp.com\""
buildConfigField "String" ,"BASE_URL", "\"https://art-backend.herokuapp.com\""
}
}

Expand Down Expand Up @@ -107,7 +106,7 @@ dependencies {
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
implementation 'io.reactivex.rxjava2:rxjava:2.1.10'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'com.google.dagger:dagger-android:2.14.1'
implementation 'com.google.dagger:dagger-android:2.15'
implementation 'com.google.dagger:dagger-android-support:2.14.1'
implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.google.firebase:firebase-auth:12.0.1'
Expand Down
3 changes: 2 additions & 1 deletion app/code_quality_tools/quality.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ task findbugs(type: FindBugs) {
description 'Find bugs maingly design flaws, bad practices'
group 'verification'
excludeFilter = rootProject.file('app/code_quality_tools/findbugs.xml')
classes = fileTree("$project.buildDir/intermediates/classes/mock/debug/")
classes = fileTree("$project.buildDir/intermediates/javac/")
source 'src'
effort 'max'
include '**/*.java'
Expand All @@ -40,6 +40,7 @@ task pmd(type: Pmd) {
source = fileTree('src/main/java')
include '**/*.java'
exclude '**/gen/**'
ignoreFailures = true

reports {
xml.enabled = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.action.ViewActions.closeSoftKeyboard;
import static android.support.test.espresso.action.ViewActions.typeText;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
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 android.support.test.espresso.assertion.ViewAssertions.matches;
import static junit.framework.Assert.assertEquals;
import static org.hamcrest.Matchers.not;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.action.ViewActions.closeSoftKeyboard;
import static android.support.test.espresso.action.ViewActions.typeText;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
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 android.support.test.espresso.assertion.ViewAssertions.matches;
import static junit.framework.Assert.assertTrue;
import static org.hamcrest.Matchers.not;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import android.support.test.runner.AndroidJUnit4;

import com.andela.art.R;
import com.andela.art.login.LoginActivity;
import com.andela.art.reportproblem.presentation.ReportProblemActivity;
import com.andela.art.securitydashboard.presentation.SecurityDashboardActivity;
import com.andela.art.login.LoginActivity;
import com.andela.art.sendfeedback.presentation.SendFeedbackActivity;

import org.junit.After;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.core.IsNot.not;

/**
* Test for UserDashBoard.
Expand Down Expand Up @@ -59,16 +58,6 @@ public void testUserInfoIsDisplayed() {
));
}

/**
* Test incidence report button does not appear when no assets are available.
*/
@Test
public void testIncidentReportButtonDoesNotAppearWhenNoAssetIsAvailable() {
userDashboardActivityTestRule.launchActivity(null);
onView(withId(R.id.incident_button))
.check(matches(not(isDisplayed())));
}

/**
* Get a current activity.
* @return activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

import android.content.Context;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
Expand Down
81 changes: 73 additions & 8 deletions app/src/debug/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,78 @@
}
},
"oauth_client": [
{
"client_id": "236168090156-csvfv3qep0pq8sk18mdcrthvuaqivrtq.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.andela.art",
"certificate_hash": "99648d0d2a9efbe55859eb51b5ba42e34875529c"
}
},
{
"client_id": "236168090156-g2km3hl7167bmdqdnr19iah9qjosde7q.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.andela.art",
"certificate_hash": "ccdf23c76658d1712afe589cb6caedb3f3ef2bd3"
}
},
{
"client_id": "236168090156-nj6h7tdnlromnteetg6c33kjvfp689gd.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.andela.art",
"certificate_hash": "5f4e30913a5319c01be08dcbab80376bfeba2d10"
}
},
{
"client_id": "236168090156-psv4bc75ueoa1f56g5r6boe2alu5eu4t.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.andela.art",
"certificate_hash": "098d14c9df54fe4c459f852888ac6562366f9afa"
}
},
{
"client_id": "236168090156-fmqn1sjrgkg5s547s81qulfib6en5ems.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.andela.art",
"certificate_hash": "708470c1f69828708e322d01bb76b3f991b17665"
}
},
{
"client_id": "236168090156-ji032050aiptel369evgu0i2e9isllin.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.andela.art",
"certificate_hash": "4baddb73b17df46f3a4c65cf4d9879a3fbc89a45"
}
},
{
"client_id": "236168090156-5ps4d1oseqqmq7o27tekrtcrrptopha6.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.andela.art",
"certificate_hash": "8d0b94287a31b1025974c48dce8057c91fce0f12"
}
},
{
"client_id": "236168090156-1d9cnbm10mug1844jar075p7h067ami1.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.andela.art",
"certificate_hash": "5354e10737c7cf28abffe0ba8dee4818ed341d63"
}
},
{
"client_id": "236168090156-vlk3nmtskanamb88b3k088p8tik1digm.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.andela.art",
"certificate_hash": "70a52c532a450de07c86bdf7cb25db184ff7dae9"
}
},
{
"client_id": "236168090156-lvjn1oigbjg589a4f1uaqftelh8j2iu3.apps.googleusercontent.com",
"client_type": 1,
Expand Down Expand Up @@ -153,23 +225,16 @@
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 2,
"other_platform_oauth_client": [
{
"client_id": "236168090156-btj6h113flq4vsiknpsv8gs636rl6idr.apps.googleusercontent.com",
"client_type": 3
}
]
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
}
}
1 change: 0 additions & 1 deletion app/src/main/java/com/andela/art/api/ApiModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.andela.art.BuildConfig;
import com.andela.art.root.SharedPrefsWrapper;


import dagger.Module;
import dagger.Provides;
import okhttp3.HttpUrl;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/andela/art/api/ApiService.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public interface ApiService {
*
* @return Observable
*/
@GET("/api/v1/assets/")
@GET("/api/v1/assets")
Observable<UserAssetResponse> getAssets();

/**
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/com/andela/art/api/EmailsResponse.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package com.andela.art.api;

import java.util.List;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
* Emails response pojo.
*/
Expand Down
16 changes: 8 additions & 8 deletions app/src/main/java/com/andela/art/api/UserAssetResponse.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.andela.art.api;

import java.util.List;

import com.andela.art.models.Asset;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
* UserAssetResponse pojo.
*/
Expand All @@ -16,10 +16,10 @@ public class UserAssetResponse {
private Integer count;
@SerializedName("next")
@Expose
private Integer next;
private String next;
@SerializedName("previous")
@Expose
private Object previous;
private String previous;
@SerializedName("results")
@Expose
private List<Asset> assets;
Expand All @@ -34,17 +34,17 @@ public Integer getCount() {

/**
*
* @return next - Integer
* @return next - String
*/
public Integer getNext() {
public String getNext() {
return next;
}

/**
*
* @return previous - Object
* @return previous - String
*/
public Object getPrevious() {
public String getPrevious() {
return previous;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@
import com.andela.art.checkin.injection.CheckInModule;
import com.andela.art.checkin.injection.DaggerCheckInComponent;
import com.andela.art.databinding.ActivityCheckInBinding;
import com.andela.art.models.Asset;
import com.andela.art.models.Asignee;
import com.andela.art.models.Asset;
import com.andela.art.room.CheckInEntity;
import com.andela.art.room.CheckInRepository;
import com.andela.art.root.ApplicationComponent;
import com.andela.art.root.ApplicationModule;
import com.andela.art.root.ArtApplication;
import com.andela.art.securitydashboard.presentation.NfcSecurityDashboardActivity;
import com.squareup.picasso.Picasso;

import java.util.Locale;

import javax.inject.Inject;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.support.v7.widget.AppCompatEditText;
import android.util.AttributeSet;


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.content.Context;
import android.widget.Toast;

import com.andela.art.api.ApiService;
import com.andela.art.root.Constants;
import com.andela.art.root.Presenter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import com.andela.art.api.ApiModule;
import com.andela.art.firebase.FirebaseModule;
import com.andela.art.login.LoginActivity;
import com.andela.art.root.Activity;
import com.andela.art.root.ApplicationComponent;
import com.andela.art.root.ApplicationModule;
import com.andela.art.login.LoginActivity;
import com.andela.art.settings.SettingsActivity;

import dagger.Component;
Expand Down
11 changes: 5 additions & 6 deletions app/src/main/java/com/andela/art/models/Asset.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,12 @@ public String getAllocationStatus() {
public void setAllocationStatus(String allocationStatus) {
mAllocationStatus = allocationStatus;
}

/**
* Current status getter.
* @return mCurrentStatus - String
*/
public String getCurrentStatus() {
return mCurrentStatus;
return String.valueOf(mCurrentStatus);
}


Expand All @@ -79,7 +78,7 @@ public void setAssignedTo(Asignee asignee) {
* @return mCheckinStatus - String
*/
public String getCheckinStatus() {
return mCheckinStatus;
return String.valueOf(mCheckinStatus);
}

/**
Expand Down Expand Up @@ -127,7 +126,7 @@ public void setId(int id) {
* @return mItemCode - String
*/
public String getItemCode() {
return mItemCode;
return String.valueOf(mItemCode);
}

/**
Expand Down Expand Up @@ -175,7 +174,7 @@ public void setModelNumber(String modelNumber) {
* @return mSerialNumber - String
*/
public String getSerialNumber() {
return mSerialNumber;
return String.valueOf(mSerialNumber);
}

/**
Expand All @@ -191,7 +190,7 @@ public void setSerialNumber(String serialNumber) {
* @return mAssetType - String
*/
public String getAssetType() {
return mAssetType;
return String.valueOf(mAssetType);
}

/**
Expand Down
Loading