fix(map, settings): allow null IDs and implement request timeout (#4851)

This commit is contained in:
James Rich 2026-03-19 12:36:14 -05:00 committed by GitHub
parent b982b145e6
commit bc08093f6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 79 additions and 9 deletions

View file

@ -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)
}
}