fix(chat): open the selected history session (#856)
This commit is contained in:
1 parent
adde03a4de
commit
98b35ca8bf
2 files changed
+11
-32
No files matched your search
@@ -1278,9 +1278,17 @@ class ChatViewModelTest {
|
||||
// ── Session switch ───────────────────────────────────────────────────────
|
||||
|
||||
@Test
|
||||
fun testSwitchSession() =
|
||||
fun testSwitchSession_opensSelectedHistorySessionInsteadOfLatestDescendant() =
|
||||
runTest {
|
||||
val (viewModel, sessionId) = createViewModelWithSession()
|
||||
coEvery { ApiClient.hermesApi.getLatestDescendant("session-456") } returns
|
||||
retrofit2.Response.success(
|
||||
com.m57.hermescontrol.data.model.LatestDescendantResponse(
|
||||
requested_session_id = "session-456",
|
||||
session_id = "unrelated-descendant",
|
||||
changed = true,
|
||||
),
|
||||
)
|
||||
|
||||
viewModel.switchSession("session-456")
|
||||
advanceUntilIdle()
|
||||
|
||||
Reference in new issue
Block a user