Fix test constructor calls broken by merging the polish lanes with the trailer-return fix
Test-only; product code is unchanged. NavigationCutTest passes the new liveSession to MainContent and trailerReturn to the shell view model; TitleEntryBackTest passes the session to the Home view model; TitlePolishTest passes trailerReturn to the title view model.
This commit is contained in:
parent
eb3c65af19
commit
3da8a31c5b
3 changed files with 4 additions and 4 deletions
|
|
@ -253,7 +253,7 @@ class NavigationCutTest {
|
|||
every { screensaver.state } returns kotlinx.coroutines.flow.MutableStateFlow(ScreensaverState(false, false, false, false))
|
||||
rule.setContent { CompositionLocalProvider(LocalReducedMotion provides reduced) { androidx.tv.material3.MaterialTheme {
|
||||
com.github.damontecres.wholphin.MainContent(stack, NavigationManager(), UserPreferences(AppPreferences.getDefaultInstance(), null),
|
||||
mockk(relaxed = true), screensaver,
|
||||
mockk(relaxed = true), screensaver, kotlinx.coroutines.flow.MutableStateFlow<com.github.damontecres.wholphin.data.CurrentUser?>(null),
|
||||
Modifier.requiredSize(WolfskinTokens.Shell.stageWidth, WolfskinTokens.Shell.stageHeight),
|
||||
setupInterceptor = { destination, modifier ->
|
||||
androidx.compose.foundation.layout.Box(modifier.then(Modifier.requiredSize(WolfskinTokens.Shell.stageWidth, WolfskinTokens.Shell.stageHeight))
|
||||
|
|
@ -356,7 +356,7 @@ internal class PolishAppHost(private val rule: AndroidComposeTestRule<ActivitySc
|
|||
val model = remember {
|
||||
WolfskinShellViewModel(rule.activity, session, repository, navigation, setup, backdrop,
|
||||
mockk(relaxed = true), WolfskinSeeAllLists(), conductarr, mockk(relaxed = true),
|
||||
org.justinvisser.wolfskin.tv.update.FakeUpdateController()).also { models.add(it) }
|
||||
org.justinvisser.wolfskin.tv.update.FakeUpdateController(), mockk(relaxed = true)).also { models.add(it) }
|
||||
}
|
||||
DisposableEffect(model) { onDispose { model.viewModelScope.cancel() } }
|
||||
WolfskinApp(server, current, navigation, UserPreferences(AppPreferences.getDefaultInstance(), null),
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class TitleEntryBackTest {
|
|||
ConductarrPreference.updateFixtures(true)
|
||||
val server = com.github.damontecres.wholphin.data.model.JellyfinServer(UUID.fromString("00000000-0000-0000-0000-000000000001"), "Fixture", "https://example.invalid", null)
|
||||
val user = com.github.damontecres.wholphin.data.model.JellyfinUser(id = UUID.fromString("00000000-0000-0000-0000-000000000002"), name = "Justin", serverId = server.id, accessToken = null)
|
||||
val source = WolfskinHomeViewModel(rule.activity, mockk(relaxed = true), mockk(), navigation, WolfskinSeeAllLists(), conductarr)
|
||||
val source = WolfskinHomeViewModel(rule.activity, mockk(relaxed = true), mockk(), navigation, WolfskinSeeAllLists(), conductarr, WolfskinSession())
|
||||
homeModel = source
|
||||
viewModel = WolfskinTitleViewModel(rule.activity, mockk(), TitleFixtureProvider(rule.activity), navigation, conductarr,
|
||||
mockk(relaxed = true), mockk(relaxed = true), trailerReturn = mockk(relaxed = true))
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class TitlePolishTest {
|
|||
val navigation = NavigationManager().apply { navigateTo(Destination.Wolfskin(titleRoute(id.toString()))) }
|
||||
session = ConductarrSession(MemoryCacheStore())
|
||||
model = WolfskinTitleViewModel(rule.activity, facade, mockk(), navigation, session!!,
|
||||
mockk<ServerRepository>(relaxed = true), mockk(relaxed = true))
|
||||
mockk<ServerRepository>(relaxed = true), mockk(relaxed = true), trailerReturn = mockk(relaxed = true))
|
||||
rule.setContent { CompositionLocalProvider(LocalReducedMotion provides reduced.value, LocalTitleBitmaps provides bitmaps) { WolfskinTheme {
|
||||
val route = titleRoute(id.toString())
|
||||
ScreenEntry(shell, route, entryActive.value && navigation.backStack.lastOrNull() == Destination.Wolfskin(route)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue