First launch for a new user, on Emby (from 0.108.35)
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 1m53s
pauljd/davidson-ci: Davidson CI / ai-review (push) Failing after 1m39s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-11-05 23:37:52 +00:00
co-authored by Claude Opus 5.5
parent e98e04baaa
commit 3b9188b3ea
7 changed files with 449 additions and 6 deletions
@@ -0,0 +1,30 @@
package tv.orbit.classic
import org.junit.Assert.*
import org.junit.Test
class OnboardingTest {
@Test fun theStepsRunInTheDesignedOrder() {
assertEquals(listOf("Welcome", "Server", "Sign in", "Channels", "Who watches", "All set"), OnboardStep.entries.map { it.label })
}
@Test fun theStartingChannelsAreRealAndNeverAfterDark() {
val numbers = SmartChannels.map { it.number }.toSet()
assertTrue(OnboardStartChannels.all { it in numbers })
assertTrue(OnboardStartChannels.none { it in LockedChannels })
}
@Test fun theTimeLeftComesFromHowLongTheChannelsSoFarTook() {
ChannelSetup.begin(listOf(101, 106, 201, 107))
val start = ChannelSetup.startedAt
// Before any are done, a minute each.
assertEquals(4, ChannelSetup.minutesLeft(start))
// Two done in four minutes: two left at two minutes each.
ChannelSetup.found = mapOf(101 to 180, 106 to 90)
assertEquals(4, ChannelSetup.minutesLeft(start + 4 * 60_000))
assertFalse(ChannelSetup.finished)
ChannelSetup.found = ChannelSetup.found + mapOf(201 to 40, 107 to -1)
assertTrue(ChannelSetup.finished); assertEquals(0, ChannelSetup.minutesLeft(start + 9 * 60_000))
ChannelSetup.begin(emptyList())
}
}