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

@ -16,12 +16,12 @@
*/
package org.meshtastic.app.ui
import androidx.compose.ui.test.junit4.v2.createComposeRule
import androidx.compose.ui.test.ExperimentalTestApi
import androidx.compose.ui.test.runComposeUiTest
import androidx.navigation3.runtime.NavKey
import androidx.navigation3.runtime.entryProvider
import androidx.navigation3.runtime.rememberNavBackStack
import kotlinx.coroutines.flow.emptyFlow
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.meshtastic.core.navigation.NodesRoute
@ -35,15 +35,14 @@ import org.meshtastic.feature.settings.radio.channel.channelsGraph
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
@OptIn(ExperimentalTestApi::class)
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [34])
class NavigationAssemblyTest {
@get:Rule val composeTestRule = createComposeRule()
@Test
fun verifyNavigationGraphsAssembleWithoutCrashing() {
composeTestRule.setContent {
fun verifyNavigationGraphsAssembleWithoutCrashing() = runComposeUiTest {
setContent {
val backStack = rememberNavBackStack(NodesRoute.NodesGraph)
entryProvider<NavKey> {
contactsGraph(backStack, emptyFlow())