init
This commit is contained in:
@@ -39,6 +39,7 @@ dependencies {
|
||||
implementation(libs.androidx.espresso.core)
|
||||
implementation(libs.androidx.uiautomator)
|
||||
implementation(libs.androidx.benchmark.macro.junit4)
|
||||
implementation(libs.androidx.ui.test.junit4)
|
||||
}
|
||||
|
||||
androidComponents {
|
||||
|
||||
@@ -3,6 +3,7 @@ package cc.n0th1ng.baselineprofile
|
||||
import android.R.attr.contentDescription
|
||||
import androidx.benchmark.macro.MacrobenchmarkScope
|
||||
import androidx.benchmark.macro.junit4.BaselineProfileRule
|
||||
import androidx.compose.ui.test.junit4.createAndroidComposeRule
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import androidx.test.filters.LargeTest
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
@@ -16,7 +17,6 @@ import org.junit.runner.RunWith
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@LargeTest
|
||||
class BaselineProfileGenerator {
|
||||
|
||||
@get:Rule
|
||||
val rule = BaselineProfileRule()
|
||||
|
||||
@@ -29,12 +29,8 @@ class BaselineProfileGenerator {
|
||||
pressHome()
|
||||
startActivityAndWait()
|
||||
|
||||
|
||||
// Give Compose time to render
|
||||
Thread.sleep(500)
|
||||
|
||||
val listNav = device.wait(Until.findObject(By.desc("listExpenseScreen")), 10000)
|
||||
listNav?.click() ?: throw RuntimeException("listExpenseScreen not found or not clickable")
|
||||
device.waitForIdle()
|
||||
device.wait(Until.hasObject(By.desc("list screen")), 10_000)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user