1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 18:02:15 -05:00

Upgrade to Espresso 2.0

This commit is contained in:
cketti 2015-01-02 23:43:46 +01:00
parent 82736f3a8b
commit e2a9dd3042
11 changed files with 57 additions and 65 deletions

View File

@ -18,16 +18,8 @@ dependencies {
compile 'net.sourceforge.htmlcleaner:htmlcleaner:2.10' compile 'net.sourceforge.htmlcleaner:htmlcleaner:2.10'
compile 'de.cketti.library.changelog:ckchangelog:1.2.1' compile 'de.cketti.library.changelog:ckchangelog:1.2.1'
androidTestCompile ('com.jakewharton.espresso:espresso:1.1-r3' ) { androidTestCompile 'com.android.support.test:testing-support-lib:0.1'
// Note: some of these exclusions may become necessary. See the androidTestCompile 'com.android.support.test.espresso:espresso-core:2.0'
// github site https://github.com/JakeWharton/double-espresso
//exclude group: 'com.squareup.dagger'
//exclude group: 'javax.inject'
//exclude group: 'javax.annotation'
//exclude group: 'com.google.guava'
//exclude group: 'org.hamcrest'
exclude group: 'com.google.code.findbugs'
}
androidTestCompile("com.icegreen:greenmail:1.3.1b") { androidTestCompile("com.icegreen:greenmail:1.3.1b") {
// Use a better, later version // Use a better, later version
@ -48,7 +40,7 @@ android {
minSdkVersion 15 minSdkVersion 15
targetSdkVersion 17 targetSdkVersion 17
testInstrumentationRunner "com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
} }
signingConfigs { signingConfigs {

View File

@ -2,11 +2,11 @@ package com.fsck.k9.activity.setup;
import com.fsck.k9.mail.ConnectionSecurity; import com.fsck.k9.mail.ConnectionSecurity;
import com.google.android.apps.common.testing.ui.espresso.matcher.BoundedMatcher; import android.support.test.espresso.matcher.BoundedMatcher;
import org.hamcrest.Description; import org.hamcrest.Description;
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import static com.google.android.apps.common.testing.testrunner.util.Checks.checkNotNull; import static com.android.support.test.deps.guava.base.Preconditions.checkNotNull;
public class ConnectionSecurityHolderMatcher { public class ConnectionSecurityHolderMatcher {

View File

@ -8,12 +8,12 @@ import com.fsck.k9.R;
import com.fsck.k9.endtoend.framework.ApplicationState; import com.fsck.k9.endtoend.framework.ApplicationState;
import com.fsck.k9.endtoend.framework.StubMailServer; import com.fsck.k9.endtoend.framework.StubMailServer;
import com.fsck.k9.endtoend.pages.WelcomeMessagePage; import com.fsck.k9.endtoend.pages.WelcomeMessagePage;
import com.google.android.apps.common.testing.ui.espresso.assertion.ViewAssertions; import android.support.test.espresso.assertion.ViewAssertions;
import junit.framework.AssertionFailedError; import junit.framework.AssertionFailedError;
import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; import static android.support.test.espresso.Espresso.onView;
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; import static android.support.test.espresso.matcher.ViewMatchers.withId;
public abstract class AbstractEndToEndTest<T extends Activity> extends ActivityInstrumentationTestCase2<T> { public abstract class AbstractEndToEndTest<T extends Activity> extends ActivityInstrumentationTestCase2<T> {

View File

@ -2,9 +2,9 @@ package com.fsck.k9.endtoend.pages;
import com.fsck.k9.R; import com.fsck.k9.R;
import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; import static android.support.test.espresso.Espresso.onView;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; import static android.support.test.espresso.action.ViewActions.click;
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; import static android.support.test.espresso.matcher.ViewMatchers.withId;
public class AccountOptionsPage extends AbstractPage { public class AccountOptionsPage extends AbstractPage {

View File

@ -1,15 +1,15 @@
package com.fsck.k9.endtoend.pages; package com.fsck.k9.endtoend.pages;
import com.fsck.k9.R; import com.fsck.k9.R;
import com.google.android.apps.common.testing.ui.espresso.NoMatchingViewException; import android.support.test.espresso.NoMatchingViewException;
import com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers; import android.support.test.espresso.matcher.ViewMatchers;
import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; import static android.support.test.espresso.Espresso.onView;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.clearText; import static android.support.test.espresso.action.ViewActions.clearText;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; import static android.support.test.espresso.action.ViewActions.click;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.scrollTo; import static android.support.test.espresso.action.ViewActions.scrollTo;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.typeText; import static android.support.test.espresso.action.ViewActions.typeText;
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; import static android.support.test.espresso.matcher.ViewMatchers.withId;
public class AccountSetupNamesPage extends AbstractPage { public class AccountSetupNamesPage extends AbstractPage {

View File

@ -2,10 +2,10 @@ package com.fsck.k9.endtoend.pages;
import com.fsck.k9.R; import com.fsck.k9.R;
import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; import static android.support.test.espresso.Espresso.onView;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; import static android.support.test.espresso.action.ViewActions.click;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.typeText; import static android.support.test.espresso.action.ViewActions.typeText;
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; import static android.support.test.espresso.matcher.ViewMatchers.withId;
public class AccountSetupPage extends AbstractPage { public class AccountSetupPage extends AbstractPage {

View File

@ -2,9 +2,9 @@ package com.fsck.k9.endtoend.pages;
import com.fsck.k9.R; import com.fsck.k9.R;
import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; import static android.support.test.espresso.Espresso.onView;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; import static android.support.test.espresso.action.ViewActions.click;
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; import static android.support.test.espresso.matcher.ViewMatchers.withId;
public class AccountTypePage extends AbstractPage { public class AccountTypePage extends AbstractPage {
public IncomingServerSettingsPage clickImap() { public IncomingServerSettingsPage clickImap() {

View File

@ -2,18 +2,18 @@ package com.fsck.k9.endtoend.pages;
import com.fsck.k9.R; import com.fsck.k9.R;
import com.fsck.k9.endtoend.framework.AccountForTest; import com.fsck.k9.endtoend.framework.AccountForTest;
import com.google.android.apps.common.testing.ui.espresso.NoMatchingViewException; import android.support.test.espresso.NoMatchingViewException;
import com.google.android.apps.common.testing.ui.espresso.ViewAssertion; import android.support.test.espresso.ViewAssertion;
import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; import static android.support.test.espresso.Espresso.onView;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; import static android.support.test.espresso.action.ViewActions.click;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.longClick; import static android.support.test.espresso.action.ViewActions.longClick;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.scrollTo; import static android.support.test.espresso.action.ViewActions.scrollTo;
import static com.google.android.apps.common.testing.ui.espresso.assertion.ViewAssertions.doesNotExist; import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist;
import static com.google.android.apps.common.testing.ui.espresso.assertion.ViewAssertions.matches; import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.isDisplayed; import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withText; import static android.support.test.espresso.matcher.ViewMatchers.withText;
public class AccountsPage extends AbstractPage { public class AccountsPage extends AbstractPage {

View File

@ -4,16 +4,16 @@ import com.fsck.k9.R;
import com.fsck.k9.mail.ConnectionSecurity; import com.fsck.k9.mail.ConnectionSecurity;
import static com.fsck.k9.activity.setup.ConnectionSecurityHolderMatcher.is; import static com.fsck.k9.activity.setup.ConnectionSecurityHolderMatcher.is;
import static com.google.android.apps.common.testing.ui.espresso.Espresso.onData; import static android.support.test.espresso.Espresso.onData;
import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; import static android.support.test.espresso.Espresso.onView;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.clearText; import static android.support.test.espresso.action.ViewActions.clearText;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; import static android.support.test.espresso.action.ViewActions.click;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.scrollTo; import static android.support.test.espresso.action.ViewActions.scrollTo;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.typeText; import static android.support.test.espresso.action.ViewActions.typeText;
import static com.google.android.apps.common.testing.ui.espresso.assertion.ViewAssertions.matches; import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.isClickable; import static android.support.test.espresso.matcher.ViewMatchers.isClickable;
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withText; import static android.support.test.espresso.matcher.ViewMatchers.withText;
public class IncomingServerSettingsPage extends AbstractPage { public class IncomingServerSettingsPage extends AbstractPage {

View File

@ -4,13 +4,13 @@ import com.fsck.k9.R;
import com.fsck.k9.mail.ConnectionSecurity; import com.fsck.k9.mail.ConnectionSecurity;
import static com.fsck.k9.activity.setup.ConnectionSecurityHolderMatcher.is; import static com.fsck.k9.activity.setup.ConnectionSecurityHolderMatcher.is;
import static com.google.android.apps.common.testing.ui.espresso.Espresso.onData; import static android.support.test.espresso.Espresso.onData;
import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; import static android.support.test.espresso.Espresso.onView;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.clearText; import static android.support.test.espresso.action.ViewActions.clearText;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; import static android.support.test.espresso.action.ViewActions.click;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.scrollTo; import static android.support.test.espresso.action.ViewActions.scrollTo;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.typeText; import static android.support.test.espresso.action.ViewActions.typeText;
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; import static android.support.test.espresso.matcher.ViewMatchers.withId;
public class OutgoingServerSettingsPage extends AbstractPage { public class OutgoingServerSettingsPage extends AbstractPage {

View File

@ -2,9 +2,9 @@ package com.fsck.k9.endtoend.pages;
import com.fsck.k9.R; import com.fsck.k9.R;
import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; import static android.support.test.espresso.Espresso.onView;
import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; import static android.support.test.espresso.action.ViewActions.click;
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; import static android.support.test.espresso.matcher.ViewMatchers.withId;
public class WelcomeMessagePage extends AbstractPage { public class WelcomeMessagePage extends AbstractPage {