diff --git a/components/support/test/build.gradle b/components/support/test/build.gradle index 7a10230660a..a279375e554 100644 --- a/components/support/test/build.gradle +++ b/components/support/test/build.gradle @@ -35,6 +35,7 @@ dependencies { implementation Dependencies.kotlin_coroutines implementation Dependencies.androidx_test_junit + implementation Dependencies.testing_mockwebserver implementation Dependencies.testing_mockito implementation (Dependencies.testing_robolectric) { exclude group: 'org.apache.maven' diff --git a/samples/browser/src/androidTest/java/org/mozilla/samples/browser/rules/WebserverRule.kt b/components/support/test/src/main/java/mozilla/components/support/test/rules/WebserverRule.kt similarity index 98% rename from samples/browser/src/androidTest/java/org/mozilla/samples/browser/rules/WebserverRule.kt rename to components/support/test/src/main/java/mozilla/components/support/test/rules/WebserverRule.kt index 5ef180bf8fc..d16ee5e8eae 100644 --- a/samples/browser/src/androidTest/java/org/mozilla/samples/browser/rules/WebserverRule.kt +++ b/components/support/test/src/main/java/mozilla/components/support/test/rules/WebserverRule.kt @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.mozilla.samples.browser.rules +package mozilla.components.support.test.rules import android.os.Handler import android.os.Looper diff --git a/samples/browser/build.gradle b/samples/browser/build.gradle index d12096e5eed..9219334f9ff 100644 --- a/samples/browser/build.gradle +++ b/samples/browser/build.gradle @@ -173,6 +173,8 @@ dependencies { implementation Dependencies.androidx_core_ktx implementation Dependencies.androidx_constraintlayout + testImplementation project(':support-test') + androidTestImplementation project(':support-android-test') androidTestImplementation Dependencies.androidx_test_core androidTestImplementation Dependencies.androidx_test_runner diff --git a/samples/browser/src/androidTest/java/org/mozilla/samples/browser/SmokeTests.kt b/samples/browser/src/androidTest/java/org/mozilla/samples/browser/SmokeTests.kt index 835f979fc66..a7667663a36 100644 --- a/samples/browser/src/androidTest/java/org/mozilla/samples/browser/SmokeTests.kt +++ b/samples/browser/src/androidTest/java/org/mozilla/samples/browser/SmokeTests.kt @@ -20,11 +20,11 @@ import androidx.test.rule.ActivityTestRule import androidx.test.uiautomator.UiDevice import androidx.test.uiautomator.UiSelector import mozilla.components.support.android.test.leaks.LeakDetectionRule +import mozilla.components.support.test.rules.WebserverRule import org.junit.Assert.assertTrue import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith -import org.mozilla.samples.browser.rules.WebserverRule import java.util.concurrent.TimeUnit private const val INITIAL_WAIT_SECONDS = 5L