diff --git a/k9mail/build.gradle b/k9mail/build.gradle index f22f41e28..c99ed2f0c 100644 --- a/k9mail/build.gradle +++ b/k9mail/build.gradle @@ -18,16 +18,8 @@ dependencies { compile 'net.sourceforge.htmlcleaner:htmlcleaner:2.10' compile 'de.cketti.library.changelog:ckchangelog:1.2.1' - androidTestCompile ('com.jakewharton.espresso:espresso:1.1-r3' ) { - // Note: some of these exclusions may become necessary. See the - // 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.android.support.test:testing-support-lib:0.1' + androidTestCompile 'com.android.support.test.espresso:espresso-core:2.0' androidTestCompile("com.icegreen:greenmail:1.3.1b") { // Use a better, later version @@ -48,7 +40,7 @@ android { minSdkVersion 15 targetSdkVersion 17 - testInstrumentationRunner "com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } signingConfigs { diff --git a/k9mail/src/androidTest/java/com/fsck/k9/activity/setup/ConnectionSecurityHolderMatcher.java b/k9mail/src/androidTest/java/com/fsck/k9/activity/setup/ConnectionSecurityHolderMatcher.java index 258258c5f..8c5637955 100644 --- a/k9mail/src/androidTest/java/com/fsck/k9/activity/setup/ConnectionSecurityHolderMatcher.java +++ b/k9mail/src/androidTest/java/com/fsck/k9/activity/setup/ConnectionSecurityHolderMatcher.java @@ -2,11 +2,11 @@ package com.fsck.k9.activity.setup; 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.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 { diff --git a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/AbstractEndToEndTest.java b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/AbstractEndToEndTest.java index f1ed25a8c..b644c035d 100644 --- a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/AbstractEndToEndTest.java +++ b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/AbstractEndToEndTest.java @@ -8,12 +8,12 @@ import com.fsck.k9.R; import com.fsck.k9.endtoend.framework.ApplicationState; import com.fsck.k9.endtoend.framework.StubMailServer; 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 static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; -import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; +import static android.support.test.espresso.Espresso.onView; +import static android.support.test.espresso.matcher.ViewMatchers.withId; public abstract class AbstractEndToEndTest extends ActivityInstrumentationTestCase2 { diff --git a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountOptionsPage.java b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountOptionsPage.java index b2f400121..79bdd1646 100644 --- a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountOptionsPage.java +++ b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountOptionsPage.java @@ -2,9 +2,9 @@ package com.fsck.k9.endtoend.pages; import com.fsck.k9.R; -import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; -import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; +import static android.support.test.espresso.Espresso.onView; +import static android.support.test.espresso.action.ViewActions.click; +import static android.support.test.espresso.matcher.ViewMatchers.withId; public class AccountOptionsPage extends AbstractPage { diff --git a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountSetupNamesPage.java b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountSetupNamesPage.java index 058f613b5..10f2a5f30 100644 --- a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountSetupNamesPage.java +++ b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountSetupNamesPage.java @@ -1,15 +1,15 @@ package com.fsck.k9.endtoend.pages; import com.fsck.k9.R; -import com.google.android.apps.common.testing.ui.espresso.NoMatchingViewException; -import com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers; +import android.support.test.espresso.NoMatchingViewException; +import android.support.test.espresso.matcher.ViewMatchers; -import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.clearText; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.scrollTo; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.typeText; -import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; +import static android.support.test.espresso.Espresso.onView; +import static android.support.test.espresso.action.ViewActions.clearText; +import static android.support.test.espresso.action.ViewActions.click; +import static android.support.test.espresso.action.ViewActions.scrollTo; +import static android.support.test.espresso.action.ViewActions.typeText; +import static android.support.test.espresso.matcher.ViewMatchers.withId; public class AccountSetupNamesPage extends AbstractPage { diff --git a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountSetupPage.java b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountSetupPage.java index 2fa659e90..1adcf0481 100644 --- a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountSetupPage.java +++ b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountSetupPage.java @@ -2,10 +2,10 @@ package com.fsck.k9.endtoend.pages; import com.fsck.k9.R; -import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.typeText; -import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; +import static android.support.test.espresso.Espresso.onView; +import static android.support.test.espresso.action.ViewActions.click; +import static android.support.test.espresso.action.ViewActions.typeText; +import static android.support.test.espresso.matcher.ViewMatchers.withId; public class AccountSetupPage extends AbstractPage { diff --git a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountTypePage.java b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountTypePage.java index 386184161..522d1ace3 100644 --- a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountTypePage.java +++ b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountTypePage.java @@ -2,9 +2,9 @@ package com.fsck.k9.endtoend.pages; import com.fsck.k9.R; -import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; -import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; +import static android.support.test.espresso.Espresso.onView; +import static android.support.test.espresso.action.ViewActions.click; +import static android.support.test.espresso.matcher.ViewMatchers.withId; public class AccountTypePage extends AbstractPage { public IncomingServerSettingsPage clickImap() { diff --git a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountsPage.java b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountsPage.java index 653281523..5bc424fdd 100644 --- a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountsPage.java +++ b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/AccountsPage.java @@ -2,18 +2,18 @@ package com.fsck.k9.endtoend.pages; import com.fsck.k9.R; import com.fsck.k9.endtoend.framework.AccountForTest; -import com.google.android.apps.common.testing.ui.espresso.NoMatchingViewException; -import com.google.android.apps.common.testing.ui.espresso.ViewAssertion; +import android.support.test.espresso.NoMatchingViewException; +import android.support.test.espresso.ViewAssertion; -import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.longClick; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.scrollTo; -import static com.google.android.apps.common.testing.ui.espresso.assertion.ViewAssertions.doesNotExist; -import static com.google.android.apps.common.testing.ui.espresso.assertion.ViewAssertions.matches; -import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.isDisplayed; -import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; -import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withText; +import static android.support.test.espresso.Espresso.onView; +import static android.support.test.espresso.action.ViewActions.click; +import static android.support.test.espresso.action.ViewActions.longClick; +import static android.support.test.espresso.action.ViewActions.scrollTo; +import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist; +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; public class AccountsPage extends AbstractPage { diff --git a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/IncomingServerSettingsPage.java b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/IncomingServerSettingsPage.java index 814fefa7c..832e8a595 100644 --- a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/IncomingServerSettingsPage.java +++ b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/IncomingServerSettingsPage.java @@ -4,16 +4,16 @@ import com.fsck.k9.R; import com.fsck.k9.mail.ConnectionSecurity; import static com.fsck.k9.activity.setup.ConnectionSecurityHolderMatcher.is; -import static com.google.android.apps.common.testing.ui.espresso.Espresso.onData; -import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.clearText; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.scrollTo; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.typeText; -import static com.google.android.apps.common.testing.ui.espresso.assertion.ViewAssertions.matches; -import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.isClickable; -import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; -import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withText; +import static android.support.test.espresso.Espresso.onData; +import static android.support.test.espresso.Espresso.onView; +import static android.support.test.espresso.action.ViewActions.clearText; +import static android.support.test.espresso.action.ViewActions.click; +import static android.support.test.espresso.action.ViewActions.scrollTo; +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.isClickable; +import static android.support.test.espresso.matcher.ViewMatchers.withId; +import static android.support.test.espresso.matcher.ViewMatchers.withText; public class IncomingServerSettingsPage extends AbstractPage { diff --git a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/OutgoingServerSettingsPage.java b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/OutgoingServerSettingsPage.java index 9719c68f0..28703bf3b 100644 --- a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/OutgoingServerSettingsPage.java +++ b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/OutgoingServerSettingsPage.java @@ -4,13 +4,13 @@ import com.fsck.k9.R; import com.fsck.k9.mail.ConnectionSecurity; import static com.fsck.k9.activity.setup.ConnectionSecurityHolderMatcher.is; -import static com.google.android.apps.common.testing.ui.espresso.Espresso.onData; -import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.clearText; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.scrollTo; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.typeText; -import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; +import static android.support.test.espresso.Espresso.onData; +import static android.support.test.espresso.Espresso.onView; +import static android.support.test.espresso.action.ViewActions.clearText; +import static android.support.test.espresso.action.ViewActions.click; +import static android.support.test.espresso.action.ViewActions.scrollTo; +import static android.support.test.espresso.action.ViewActions.typeText; +import static android.support.test.espresso.matcher.ViewMatchers.withId; public class OutgoingServerSettingsPage extends AbstractPage { diff --git a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/WelcomeMessagePage.java b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/WelcomeMessagePage.java index 723fb3645..3f94fecc9 100644 --- a/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/WelcomeMessagePage.java +++ b/k9mail/src/androidTest/java/com/fsck/k9/endtoend/pages/WelcomeMessagePage.java @@ -2,9 +2,9 @@ package com.fsck.k9.endtoend.pages; import com.fsck.k9.R; -import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; -import static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click; -import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; +import static android.support.test.espresso.Espresso.onView; +import static android.support.test.espresso.action.ViewActions.click; +import static android.support.test.espresso.matcher.ViewMatchers.withId; public class WelcomeMessagePage extends AbstractPage {