Fix two tests that predate the merge of the round and main
All checks were successful
gate/round2-candidate design 253/253 + app 830/832 on 2eeacdc5, the 2 failing classes pass on this commit (test-only delta); Opt build versionCode 69 signer ok

Test-only; product code is unchanged.
UpdatesKeysTest presses Key.Escape for Back because the Back fix routes native Back through the Activity dispatcher and keeps only Escape as the shell key.
UpstreamContentFocusTest stubs the relaxed view model's updates with the fake controller, as the other tests do, so the Updates row gets an installed version.
This commit is contained in:
root 2026-11-07 23:05:41 +01:00
parent 2eeacdc531
commit 408aff3db7
2 changed files with 4 additions and 3 deletions

View file

@ -113,6 +113,7 @@ class UpstreamContentFocusTest {
val model = mockk<WolfskinShellViewModel>(relaxed = true)
every { model.session } returns WolfskinSession().also { it.state = state }
every { model.conductarr } returns ConductarrSession(org.justinvisser.wolfskin.conductarr.MemoryCacheStore())
every { model.updates } returns org.justinvisser.wolfskin.tv.update.FakeUpdateController()
every { model.libraryDestinations } returns emptyMap()
// An unavailable saved identity uses the real sign-in placeholder, avoiding any server reads.
every { model.signedInPerson } returns "unavailable"

View file

@ -104,10 +104,10 @@ class UpdatesKeysTest {
assertTrue(shell.contentOverlayVisible)
assertFalse(shell.navFocused)
assertTrue(controller.autoCheck.value)
press(listOf(Key.Back))
press(listOf(Key.Escape))
assertFalse(shell.contentOverlayVisible)
assertEquals(1, (shell.contentFocus as UpdateFocus).actionIndex)
press(listOf(Key.Back))
press(listOf(Key.Escape))
assertEquals("settings", shell.route)
assertEquals(1, shell.settingsRow)
assertEquals(0, shell.view.listState.firstVisibleItemIndex)
@ -120,7 +120,7 @@ class UpdatesKeysTest {
assertTrue(range.value() > 0f)
assertFalse(shell.navFocused)
assertFalse((shell.contentFocus as UpdateFocus).autoFocused)
press(listOf(Key.Back))
press(listOf(Key.Escape))
assertEquals(1, (shell.contentFocus as UpdateFocus).actionIndex)
}