Compare commits
9 commits
master
...
wip/dagger
Author | SHA1 | Date | |
---|---|---|---|
|
76974f3c09 | ||
|
17630f1591 | ||
|
0e5e00ee90 | ||
|
83c914cb2b | ||
|
d9d7ad8338 | ||
|
284363ae0d | ||
|
2cf7dba695 | ||
|
8f1fbe7a77 | ||
|
b93bd07da1 |
6 changed files with 51 additions and 30 deletions
|
@ -39,7 +39,7 @@ android {
|
|||
versionCode 259
|
||||
versionName "2.5.9"
|
||||
minSdkVersion 9
|
||||
targetSdkVersion 22
|
||||
targetSdkVersion 23
|
||||
applicationId "org.ligi.passandroid"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
archivesBaseName = "PassAndroid-$versionName"
|
||||
|
@ -106,13 +106,23 @@ dependencies {
|
|||
|
||||
provided 'org.glassfish:javax.annotation:10.0-b28'
|
||||
|
||||
androidTestApt "com.google.dagger:dagger-compiler:${DAGGER_VERSION}"
|
||||
androidTestCompile 'com.android.support:support-v4:23.1.0'
|
||||
androidTestCompile 'com.android.support:support-annotations:23.1.0'
|
||||
|
||||
androidTestApt "com.google.dagger:dagger-compiler:${DAGGER_VERSION}"
|
||||
androidTestCompile 'com.android.support:appcompat-v7:23.1.1'
|
||||
androidTestCompile 'com.android.support:support-v4:23.1.1'
|
||||
androidTestCompile 'com.android.support:support-annotations:23.1.1'
|
||||
compile 'com.android.support:design:23.1.1'
|
||||
|
||||
androidTestCompile 'com.android.support.test:runner:0.4.1'
|
||||
androidTestCompile 'com.android.support.test:rules:0.4.1'
|
||||
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
|
||||
androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1')
|
||||
|
||||
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.1') {
|
||||
// http://stackoverflow.com/questions/30578243/why-would-adding-espresso-contrib-cause-an-inflateexception
|
||||
exclude group: 'com.android.support', module: 'appcompat'
|
||||
exclude group: 'com.android.support', module: 'support-v4'
|
||||
exclude module: 'recyclerview-v7'
|
||||
}
|
||||
|
||||
androidTestCompile 'com.squareup.spoon:spoon-client:1.2.0'
|
||||
androidTestCompile 'com.squareup.assertj:assertj-android:1.1.1'
|
||||
|
@ -127,11 +137,11 @@ dependencies {
|
|||
compile 'net.danlew:android.joda:2.9.0'
|
||||
compile 'com.squareup:otto:1.3.8'
|
||||
|
||||
compile 'com.android.support:support-annotations:23.1.0'
|
||||
compile 'com.android.support:support-v4:23.1.0'
|
||||
compile 'com.android.support:recyclerview-v7:23.1.0'
|
||||
compile 'com.android.support:appcompat-v7:23.1.0'
|
||||
compile 'com.android.support:cardview-v7:23.1.0'
|
||||
compile 'com.android.support:support-annotations:23.1.1'
|
||||
compile 'com.android.support:support-v4:23.1.1'
|
||||
compile 'com.android.support:recyclerview-v7:23.1.1'
|
||||
compile 'com.android.support:appcompat-v7:23.1.1'
|
||||
compile 'com.android.support:cardview-v7:23.1.1'
|
||||
|
||||
compile 'net.i2p.android.ext:floatingactionbutton:1.10.0'
|
||||
|
||||
|
@ -150,7 +160,7 @@ dependencies {
|
|||
androidTestCompile 'com.google.code.findbugs:jsr305:3.0.1'
|
||||
|
||||
testCompile 'com.squareup.assertj:assertj-android:1.1.1'
|
||||
testCompile 'com.android.support:support-annotations:23.1.0'
|
||||
testCompile 'com.android.support:support-annotations:23.1.1'
|
||||
testCompile 'junit:junit:4.12'
|
||||
testCompile 'org.mockito:mockito-core:1.9.5'
|
||||
|
||||
|
|
|
@ -3,10 +3,11 @@ package org.ligi.passandroid;
|
|||
import android.content.Context;
|
||||
import android.test.InstrumentationTestCase;
|
||||
|
||||
import org.ligi.passandroid.reader.AppleStylePassReader;
|
||||
import org.ligi.passandroid.model.InputStreamWithSource;
|
||||
import org.ligi.passandroid.model.Pass;
|
||||
import org.ligi.passandroid.reader.AppleStylePassReader;
|
||||
import org.ligi.passandroid.ui.UnzipPassController;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
@ -18,7 +19,7 @@ import static org.mockito.Mockito.verify;
|
|||
|
||||
public class TheAppleStyleBarcodeReaderBase extends InstrumentationTestCase {
|
||||
|
||||
@MockitoAnnotations.Mock
|
||||
@Mock
|
||||
UnzipPassController.FailCallback failCallback;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,6 +10,7 @@ import org.ligi.passandroid.ui.PassListActivity;
|
|||
import java.util.ArrayList;
|
||||
|
||||
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.matcher.ViewMatchers.isDisplayed;
|
||||
import static android.support.test.espresso.matcher.ViewMatchers.withId;
|
||||
|
@ -31,12 +32,13 @@ public class TheEmptyPassList extends BaseIntegration<PassListActivity> {
|
|||
@MediumTest
|
||||
public void testEmptyViewIsThereWhenThereAreNoPasses() {
|
||||
Spoon.screenshot(getActivity(), "empty_view");
|
||||
onView(withId(R.id.emptyView)).check(matches(isDisplayed()));
|
||||
onView(withId(R.id.emptyView)).check(matches(isDisplayed()));
|
||||
}
|
||||
|
||||
/*@MediumTest
|
||||
@MediumTest
|
||||
public void testHelpGoesToHelp() {
|
||||
onView(withId(R.id.menu_help)).perform(click());
|
||||
onView(withId(R.id.help_tv)).check(matches(isDisplayed()));
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,9 +7,14 @@ import com.squareup.spoon.Spoon;
|
|||
import org.ligi.passandroid.ui.HelpActivity;
|
||||
|
||||
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.matcher.ViewMatchers.isClickable;
|
||||
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
|
||||
import static android.support.test.espresso.matcher.ViewMatchers.withContentDescription;
|
||||
import static android.support.test.espresso.matcher.ViewMatchers.withId;
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.Matchers.allOf;
|
||||
|
||||
|
||||
public class TheHelpActivity extends BaseIntegration<HelpActivity> {
|
||||
|
@ -30,12 +35,9 @@ public class TheHelpActivity extends BaseIntegration<HelpActivity> {
|
|||
Spoon.screenshot(getActivity(), "help");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
depends on this: http://stackoverflow.com/questions/23985181/click-home-icon-with-espresso
|
||||
@SmallTest
|
||||
public void test_that_help_finishes_on_home() {
|
||||
onView(withId(android.R.id.home)).perform(click());
|
||||
onView(allOf(withContentDescription(containsString("Navigate up")), isClickable())).perform(click());
|
||||
assertTrue(getActivity().isFinishing());
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import org.ligi.passandroid.ui.PassListActivity;
|
|||
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.contrib.DrawerActions.open;
|
||||
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
|
||||
import static android.support.test.espresso.matcher.ViewMatchers.withId;
|
||||
import static org.hamcrest.CoreMatchers.not;
|
||||
|
@ -48,13 +49,15 @@ public class ThePassListActivity extends BaseIntegration<PassListActivity> {
|
|||
onView(withId(R.id.left_drawer)).check(matches(not(isDisplayed())));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@MediumTest
|
||||
public void testThatNavigationDrawerOpens() {
|
||||
//onView(withId(android.R.id.home)).perform(click());
|
||||
//onView(withId(R.id.left_drawer)).check(matches(isDisplayed()));
|
||||
|
||||
onView(withId(R.id.drawer_layout)).perform(open());
|
||||
onView(withId(R.id.left_drawer)).check(matches(isDisplayed()));
|
||||
|
||||
Spoon.screenshot(getActivity(), "open_drawer");
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -16,12 +16,12 @@ import android.view.MenuItem;
|
|||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.widget.TextView;
|
||||
import butterknife.Bind;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
|
||||
import com.squareup.otto.Subscribe;
|
||||
|
||||
import net.i2p.android.ext.floatingactionbutton.FloatingActionButton;
|
||||
import net.i2p.android.ext.floatingactionbutton.FloatingActionsMenu;
|
||||
|
||||
import org.ligi.axt.AXT;
|
||||
import org.ligi.passandroid.App;
|
||||
import org.ligi.passandroid.R;
|
||||
|
@ -35,10 +35,13 @@ import org.ligi.passandroid.model.PassStore;
|
|||
import org.ligi.snackengage.SnackEngage;
|
||||
import org.ligi.snackengage.snacks.DefaultRateSnack;
|
||||
import org.ligi.tracedroid.TraceDroid;
|
||||
import org.ligi.tracedroid.sending.TraceDroidEmailSender;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import butterknife.Bind;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
|
||||
public class PassListActivity extends AppCompatActivity {
|
||||
|
||||
private static final int OPEN_FILE_READ_REQUEST_CODE = 1000;
|
||||
|
@ -162,7 +165,7 @@ public class PassListActivity extends AppCompatActivity {
|
|||
// don't want too many windows in worst case - so check for errors first
|
||||
if (TraceDroid.getStackTraceFiles().length > 0) {
|
||||
Tracker.get().trackEvent("ui_event", "send", "stacktraces", null);
|
||||
TraceDroidEmailSender.sendStackTraces("ligi@ligi.de", this);
|
||||
// TraceDroidEmailSender.sendStackTraces("ligi@ligi.de", this);
|
||||
} else { // if no error - check if there is a new version of the app
|
||||
Tracker.get().trackEvent("ui_event", "processFile", "updatenotice", null);
|
||||
|
||||
|
|
Loading…
Reference in a new issue