|
|
@ -20,6 +20,7 @@ import androidx.benchmark.macro.MacrobenchmarkScope
|
|
|
|
import androidx.test.uiautomator.By
|
|
|
|
import androidx.test.uiautomator.By
|
|
|
|
import androidx.test.uiautomator.Until
|
|
|
|
import androidx.test.uiautomator.Until
|
|
|
|
import com.google.samples.apps.nowinandroid.flingElementDownUp
|
|
|
|
import com.google.samples.apps.nowinandroid.flingElementDownUp
|
|
|
|
|
|
|
|
import com.google.samples.apps.nowinandroid.waitAndFindObject
|
|
|
|
|
|
|
|
|
|
|
|
fun MacrobenchmarkScope.goToInterestsScreen() {
|
|
|
|
fun MacrobenchmarkScope.goToInterestsScreen() {
|
|
|
|
device.findObject(By.text("Interests")).click()
|
|
|
|
device.findObject(By.text("Interests")).click()
|
|
|
@ -34,7 +35,7 @@ fun MacrobenchmarkScope.goToInterestsScreen() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fun MacrobenchmarkScope.interestsScrollTopicsDownUp() {
|
|
|
|
fun MacrobenchmarkScope.interestsScrollTopicsDownUp() {
|
|
|
|
val topicsList = device.wait(Until.findObject(By.res("interests:topics")), 2_000)
|
|
|
|
val topicsList = device.waitAndFindObject(By.res("interests:topics"), 2_000)
|
|
|
|
device.flingElementDownUp(topicsList)
|
|
|
|
device.flingElementDownUp(topicsList)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|