|
|
|
@ -18,21 +18,17 @@ package com.google.samples.apps.nowinandroid.interests
|
|
|
|
|
|
|
|
|
|
import androidx.benchmark.macro.MacrobenchmarkScope
|
|
|
|
|
import androidx.test.uiautomator.By
|
|
|
|
|
import androidx.test.uiautomator.Direction
|
|
|
|
|
import androidx.test.uiautomator.Until
|
|
|
|
|
import com.google.samples.apps.nowinandroid.flingElementDownUp
|
|
|
|
|
|
|
|
|
|
fun MacrobenchmarkScope.interestsScrollTopicsDownUp() {
|
|
|
|
|
val topicsList = device.findObject(By.res("interests:topics"))
|
|
|
|
|
topicsList.fling(Direction.DOWN)
|
|
|
|
|
device.waitForIdle()
|
|
|
|
|
topicsList.fling(Direction.UP)
|
|
|
|
|
device.flingElementDownUp(topicsList)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun MacrobenchmarkScope.interestsScrollPeopleDownUp() {
|
|
|
|
|
val peopleList = device.findObject(By.res("interests:people"))
|
|
|
|
|
peopleList.fling(Direction.DOWN)
|
|
|
|
|
device.waitForIdle()
|
|
|
|
|
peopleList.fling(Direction.UP)
|
|
|
|
|
device.flingElementDownUp(peopleList)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun MacrobenchmarkScope.interestsWaitForTopics() {
|
|
|
|
|