fix(build): align AndroidX Compose versions with CMP and migrate to runComposeUiTest (#5096)

This commit is contained in:
James Rich 2026-04-12 21:49:11 -05:00 committed by GitHub
parent e424d4d076
commit b0c603c7ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 34 additions and 24 deletions

View file

@ -52,6 +52,6 @@ dependencies {
testImplementation(libs.junit)
testRuntimeOnly(libs.junit.vintage.engine)
testImplementation(libs.robolectric)
testImplementation(libs.androidx.compose.ui.test.junit4)
testImplementation(libs.compose.multiplatform.ui.test)
debugImplementation(libs.androidx.compose.ui.test.manifest)
}

View file

@ -16,21 +16,17 @@
*/
package org.meshtastic.core.barcode
import androidx.compose.ui.test.junit4.v2.createComposeRule
import org.junit.Rule
import androidx.compose.ui.test.ExperimentalTestApi
import androidx.compose.ui.test.runComposeUiTest
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
@OptIn(ExperimentalTestApi::class)
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [34])
class BarcodeScannerTest {
@get:Rule val composeTestRule = createComposeRule()
@Test
fun testRememberBarcodeScanner() {
composeTestRule.setContent { rememberBarcodeScanner { _ -> } }
}
@Test fun testRememberBarcodeScanner() = runComposeUiTest { setContent { rememberBarcodeScanner { _ -> } } }
}