mirror of
https://github.com/stablyai/orca.git
synced 2026-10-29 00:03:37 +00:00
test(terminal): align resume retirement expectations
This commit is contained in:
+1
-1
@@ -752,6 +752,6 @@ describe('connectPanePty', () => {
|
||||
)
|
||||
expect(deps.onShowSessionRestoredBanner).toHaveBeenCalledTimes(1)
|
||||
expect(deps.onShowSessionRestoredBanner).toHaveBeenCalledWith(2, 'restored')
|
||||
expect(mockStoreState.clearSleepingAgentSession).toHaveBeenCalledWith(paneKey)
|
||||
expect(mockStoreState.clearSleepingAgentSessionsByPaneKey).toHaveBeenCalledWith([paneKey])
|
||||
})
|
||||
})
|
||||
|
||||
+1
-1
@@ -332,7 +332,7 @@ describe('connectPanePty', () => {
|
||||
expect(deps.clearTabPtyId).toHaveBeenCalledWith('tab-1', 'restored-session')
|
||||
expect(deps.syncPanePtyLayoutBinding).not.toHaveBeenCalledWith(2, 'restored-session')
|
||||
expect(deps.syncPanePtyLayoutBinding).toHaveBeenCalledWith(2, 'fresh-resume-pty')
|
||||
expect(mockStoreState.clearSleepingAgentSession).toHaveBeenCalledWith(paneKey)
|
||||
expect(mockStoreState.clearSleepingAgentSessionsByPaneKey).toHaveBeenCalledWith([paneKey])
|
||||
expect(window.api.pty.clearPendingPaneSerializer).toHaveBeenCalledWith(paneKey, 1)
|
||||
} finally {
|
||||
globalThis.setTimeout = originalSetTimeout
|
||||
|
||||
@@ -369,7 +369,7 @@ describe('connectPanePty', () => {
|
||||
|
||||
deferredSpawn.resolve('pty-resumed')
|
||||
await flushAsyncTicks()
|
||||
expect(mockStoreState.clearSleepingAgentSession).toHaveBeenCalledWith(paneKey)
|
||||
expect(mockStoreState.clearSleepingAgentSessionsByPaneKey).toHaveBeenCalledWith([paneKey])
|
||||
})
|
||||
|
||||
it('re-arms the exact hibernation target after a replacement spawn fails', async () => {
|
||||
|
||||
+1
-1
@@ -394,7 +394,7 @@ describe('connectPanePty', () => {
|
||||
expect(deps.updateTabPtyId).toHaveBeenCalledWith('tab-1', freshPtyId)
|
||||
expect(window.api.pty.reportRendererSerializerReady).toHaveBeenCalledWith(freshPtyId)
|
||||
expect(transport.sendInput).not.toHaveBeenCalled()
|
||||
expect(mockStoreState.clearSleepingAgentSession).toHaveBeenCalledWith(paneKey)
|
||||
expect(mockStoreState.clearSleepingAgentSessionsByPaneKey).toHaveBeenCalledWith([paneKey])
|
||||
})
|
||||
|
||||
it('does not let a restored encoded PTY override the current worktree owner', async () => {
|
||||
|
||||
+1
-1
@@ -244,7 +244,7 @@ describe('connectPanePty', () => {
|
||||
|
||||
expect(deps.onShowSessionRestoredBanner).toHaveBeenCalledTimes(1)
|
||||
expect(deps.onShowSessionRestoredBanner).toHaveBeenCalledWith(2, 'restored')
|
||||
expect(mockStoreState.clearSleepingAgentSession).toHaveBeenCalledWith(paneKey)
|
||||
expect(mockStoreState.clearSleepingAgentSessionsByPaneKey).toHaveBeenCalledWith([paneKey])
|
||||
})
|
||||
|
||||
it('says the fresh-spawn resume started fresh when main declined it', async () => {
|
||||
|
||||
Reference in New Issue
Block a user