Upgrade to androidx.test 1.3.0-rc01
Test: ./gradlew assembleAndroidTest
Change-Id: Ia255e360e76c190e5f0793350a9731bd5dd32ab4
diff --git a/ui/ui-test/src/androidTest/java/androidx/ui/test/BitmapCapturingTest.kt b/ui/ui-test/src/androidTest/java/androidx/ui/test/BitmapCapturingTest.kt
index 413558a..4dab2cf 100644
--- a/ui/ui-test/src/androidTest/java/androidx/ui/test/BitmapCapturingTest.kt
+++ b/ui/ui-test/src/androidTest/java/androidx/ui/test/BitmapCapturingTest.kt
@@ -18,7 +18,6 @@
import androidx.activity.ComponentActivity
import androidx.test.filters.MediumTest
-import androidx.test.rule.ActivityTestRule
import androidx.ui.core.Modifier
import androidx.ui.core.testTag
import androidx.ui.foundation.Box
@@ -55,8 +54,11 @@
)
}
+ @Suppress("DEPRECATION")
@get:Rule
- val composeTestRule = AndroidComposeTestRule(ActivityTestRule(config.activityClass))
+ val composeTestRule = AndroidComposeTestRule(
+ androidx.test.rule.ActivityTestRule(config.activityClass)
+ )
private val rootTag = "Root"
private val tag11 = "Rect11"
diff --git a/ui/ui-test/src/androidTest/java/androidx/ui/test/gesturescope/SendClickTest.kt b/ui/ui-test/src/androidTest/java/androidx/ui/test/gesturescope/SendClickTest.kt
index fb07256..cf30e3b 100644
--- a/ui/ui-test/src/androidTest/java/androidx/ui/test/gesturescope/SendClickTest.kt
+++ b/ui/ui-test/src/androidTest/java/androidx/ui/test/gesturescope/SendClickTest.kt
@@ -19,7 +19,6 @@
import androidx.activity.ComponentActivity
import androidx.compose.Composable
import androidx.test.filters.MediumTest
-import androidx.test.rule.ActivityTestRule
import androidx.ui.core.changedToUp
import androidx.ui.core.pointerinput.PointerInputFilter
import androidx.ui.core.pointerinput.PointerInputModifier
@@ -87,9 +86,10 @@
}
}
+ @Suppress("DEPRECATION")
@get:Rule
val composeTestRule = AndroidComposeTestRule(
- ActivityTestRule(config.activityClass),
+ androidx.test.rule.ActivityTestRule(config.activityClass),
disableTransitions = true
)
diff --git a/ui/ui-test/src/main/java/androidx/ui/test/android/AndroidComposeTestRule.kt b/ui/ui-test/src/main/java/androidx/ui/test/android/AndroidComposeTestRule.kt
index 6395b6c..c6d0966 100644
--- a/ui/ui-test/src/main/java/androidx/ui/test/android/AndroidComposeTestRule.kt
+++ b/ui/ui-test/src/main/java/androidx/ui/test/android/AndroidComposeTestRule.kt
@@ -24,7 +24,6 @@
import androidx.activity.ComponentActivity
import androidx.compose.Composable
import androidx.compose.Recomposer
-import androidx.test.rule.ActivityTestRule
import androidx.ui.animation.transitionsEnabled
import androidx.ui.core.setContent
import androidx.ui.input.textInputServiceFactory
@@ -58,7 +57,12 @@
// already there. This is issue in case the user already set some compose content and decides
// to set it again via our API. In such case we won't be able to dispose the old composition.
// Other option would be to provide a smaller interface that does not expose these methods.
- return AndroidComposeTestRule(ActivityTestRule(T::class.java), recomposer, disableTransitions)
+ @Suppress("DEPRECATION")
+ return AndroidComposeTestRule(
+ androidx.test.rule.ActivityTestRule(T::class.java),
+ recomposer,
+ disableTransitions
+ )
}
/**
@@ -70,7 +74,7 @@
class AndroidComposeTestRule<T : ComponentActivity>(
// TODO(b/153623653): Remove activityTestRule from arguments when AndroidComposeTestRule can
// work with any kind of Activity launcher.
- val activityTestRule: ActivityTestRule<T>,
+ @Suppress("DEPRECATION") val activityTestRule: androidx.test.rule.ActivityTestRule<T>,
val recomposer: Recomposer? = null,
private val disableTransitions: Boolean = false
) : ComposeTestRule {