feat: Enhance test coverage (#4847)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2026-03-18 22:09:19 -05:00 committed by GitHub
parent 1b0dc75dfe
commit 06b9f8c77a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 1715 additions and 502 deletions

View file

@ -16,39 +16,47 @@
*/
package org.meshtastic.feature.intro
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNull
/**
* Bootstrap tests for IntroViewModel.
*
* Tests the intro navigation flow logic.
*/
class IntroViewModelTest {
/*
private lateinit var viewModel: IntroViewModel
private val viewModel = IntroViewModel()
@BeforeTest
fun setUp() {
viewModel = IntroViewModel()
}
@Test
fun testWelcomeNavigatesNextToBluetooth() {
val next = viewModel.getNextKey(Welcome, allPermissionsGranted = false)
"Welcome should navigate to Bluetooth" shouldBe Bluetooth, next
assertEquals(Bluetooth, next)
}
@Test
fun testBluetoothNavigatesToLocation() {
val next = viewModel.getNextKey(Bluetooth, allPermissionsGranted = false)
"Bluetooth should navigate to Location" shouldBe Location, next
assertEquals(Location, next)
}
@Test
fun testLocationNavigatesToNotifications() {
val next = viewModel.getNextKey(Location, allPermissionsGranted = false)
"Location should navigate to Notifications" shouldBe Notifications, next
assertEquals(Notifications, next)
}
@Test
fun testNotificationsWithPermissionNavigatesToCriticalAlerts() {
val next = viewModel.getNextKey(Notifications, allPermissionsGranted = true)
"Notifications should navigate to CriticalAlerts when permissions granted" shouldBe CriticalAlerts, next
assertEquals(CriticalAlerts, next)
}
@Test
@ -62,6 +70,4 @@ class IntroViewModelTest {
val next = viewModel.getNextKey(CriticalAlerts, allPermissionsGranted = true)
assertNull(next, "CriticalAlerts should not navigate further")
}
*/
}