mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix(map, settings): allow null IDs and implement request timeout (#4851)
This commit is contained in:
parent
b982b145e6
commit
bc08093f6c
5 changed files with 79 additions and 9 deletions
|
|
@ -147,4 +147,15 @@ class MapViewModelTest {
|
|||
val layer = viewModel.mapLayers.value.find { it.name == "Test KML" }
|
||||
assertEquals(LayerType.KML, layer?.layerType)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `setWaypointId updates value correctly including null`() = runTest(testDispatcher) {
|
||||
// Set to a valid ID
|
||||
viewModel.setWaypointId(123)
|
||||
assertEquals(123, viewModel.selectedWaypointId.value)
|
||||
|
||||
// Set to null should clear the selection
|
||||
viewModel.setWaypointId(null)
|
||||
assertEquals(null, viewModel.selectedWaypointId.value)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue