mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 15: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,
|
iterations = 10,
|
||||||
startupMode = StartupMode.COLD,
|
startupMode = StartupMode.COLD,
|
||||||
compilationMode = compilationMode
|
compilationMode = compilationMode
|
||||||
) { tapNavigationDestinations(device) }
|
) { exploreUI(device) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,5 @@ class BaselineProfileGenerator {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun startup() =
|
fun startup() =
|
||||||
baselineProfileRule.collectBaselineProfile(packageName = PACKAGE_NAME) {
|
baselineProfileRule.collectBaselineProfile(packageName = PACKAGE_NAME) { exploreUI(device) }
|
||||||
tapNavigationDestinations(device)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,13 +6,16 @@ import androidx.test.uiautomator.UiDevice
|
||||||
|
|
||||||
const val PACKAGE_NAME = "dev.msfjarvis.claw.android"
|
const val PACKAGE_NAME = "dev.msfjarvis.claw.android"
|
||||||
|
|
||||||
fun MacrobenchmarkScope.tapNavigationDestinations(device: UiDevice) {
|
fun MacrobenchmarkScope.exploreUI(device: UiDevice) {
|
||||||
startActivityAndWait()
|
startActivityAndWait()
|
||||||
device.run {
|
device.run {
|
||||||
listOf("HOTTEST", "NEWEST", "SAVED").forEach { desc ->
|
listOf("HOTTEST", "NEWEST", "SAVED").forEach { desc ->
|
||||||
findObject(By.desc(desc)).click()
|
findObject(By.desc(desc)).click()
|
||||||
waitForIdle()
|
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