Refactor testing APIs to the final proposal.
Bug: 161116353
Test: N/A
Relnote: "Several testing APIs were renamed to be more intuitive. All
findXYZ APIs were renamed to onNodeXYZ. All doXYZ APIs were renamed to
performXYZ."
Change-Id: I7f164b42b04196f023c4a2153d66825487998de4
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt
index d52810d..8b8ed07 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt
@@ -51,7 +51,7 @@
import androidx.ui.test.ComposeTestRule
import androidx.ui.test.captureToBitmap
import androidx.ui.test.createComposeRule
-import androidx.ui.test.findByTag
+import androidx.ui.test.onNodeWithTag
import androidx.ui.test.runOnUiThread
import androidx.ui.test.waitForIdle
import androidx.ui.unit.dp
@@ -529,7 +529,7 @@
interactionState.addInteraction(Interaction.Pressed, Offset(10f, 10f))
}
- with(findByTag(Tag)) {
+ with(onNodeWithTag(Tag)) {
val centerPixel = captureToBitmap()
.run {
getPixel(width / 2, height / 2)
@@ -548,7 +548,7 @@
rippleTheme = createRippleTheme(newColor, newAlpha)
}
- with(findByTag(Tag)) {
+ with(onNodeWithTag(Tag)) {
val centerPixel = captureToBitmap()
.run {
getPixel(width / 2, height / 2)
@@ -594,7 +594,7 @@
composeTestRule.clockTestRule.advanceClock(50)
// Capture and compare screenshots
- findByTag(Tag)
+ onNodeWithTag(Tag)
.captureToBitmap()
.assertAgainstGolden(screenshotRule, goldenIdentifier)
@@ -604,7 +604,7 @@
waitForIdle()
// Compare expected and actual pixel color
- val centerPixel = findByTag(Tag)
+ val centerPixel = onNodeWithTag(Tag)
.captureToBitmap()
.run {
getPixel(width / 2, height / 2)