From 408aff3db77777159fade10091015bd0e81cafaf Mon Sep 17 00:00:00 2001 From: root Date: Sat, 7 Nov 2026 23:05:41 +0100 Subject: [PATCH] Fix two tests that predate the merge of the round and main 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. --- .../justinvisser/wolfskin/tv/UpstreamContentFocusTest.kt | 1 + .../org/justinvisser/wolfskin/tv/update/UpdatesKeysTest.kt | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/test/java/org/justinvisser/wolfskin/tv/UpstreamContentFocusTest.kt b/app/src/test/java/org/justinvisser/wolfskin/tv/UpstreamContentFocusTest.kt index 5c55f1fc..4fb79d6c 100644 --- a/app/src/test/java/org/justinvisser/wolfskin/tv/UpstreamContentFocusTest.kt +++ b/app/src/test/java/org/justinvisser/wolfskin/tv/UpstreamContentFocusTest.kt @@ -113,6 +113,7 @@ class UpstreamContentFocusTest { val model = mockk(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" diff --git a/app/src/test/java/org/justinvisser/wolfskin/tv/update/UpdatesKeysTest.kt b/app/src/test/java/org/justinvisser/wolfskin/tv/update/UpdatesKeysTest.kt index e593675d..a358b627 100644 --- a/app/src/test/java/org/justinvisser/wolfskin/tv/update/UpdatesKeysTest.kt +++ b/app/src/test/java/org/justinvisser/wolfskin/tv/update/UpdatesKeysTest.kt @@ -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) }