mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 01:17:05 +05:30
benchmark: add comments page to test purview
This commit is contained in:
parent
492219e3a8
commit
175782a2c1
3 changed files with 7 additions and 6 deletions
|
@ -45,6 +45,6 @@ class BaselineProfileBenchmark {
|
|||
iterations = 10,
|
||||
startupMode = StartupMode.COLD,
|
||||
compilationMode = compilationMode
|
||||
) { tapNavigationDestinations(device) }
|
||||
) { exploreUI(device) }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,5 @@ class BaselineProfileGenerator {
|
|||
|
||||
@Test
|
||||
fun startup() =
|
||||
baselineProfileRule.collectBaselineProfile(packageName = PACKAGE_NAME) {
|
||||
tapNavigationDestinations(device)
|
||||
}
|
||||
baselineProfileRule.collectBaselineProfile(packageName = PACKAGE_NAME) { exploreUI(device) }
|
||||
}
|
||||
|
|
|
@ -6,13 +6,16 @@ import androidx.test.uiautomator.UiDevice
|
|||
|
||||
const val PACKAGE_NAME = "dev.msfjarvis.claw.android"
|
||||
|
||||
fun MacrobenchmarkScope.tapNavigationDestinations(device: UiDevice) {
|
||||
fun MacrobenchmarkScope.exploreUI(device: UiDevice) {
|
||||
startActivityAndWait()
|
||||
device.run {
|
||||
listOf("HOTTEST", "NEWEST", "SAVED").forEach { desc ->
|
||||
findObject(By.desc(desc)).click()
|
||||
waitForIdle()
|
||||
}
|
||||
findObject(By.desc("HOTTEST")).click()
|
||||
waitForIdle()
|
||||
findObjects(By.desc("Open comments")).first().click()
|
||||
waitForIdle()
|
||||
}
|
||||
device.waitForIdle()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue