feat: release OpsXShell 2.1.1

This commit is contained in:
Logan.Li committed 2026-07-31 01:37:01 +08:00
1 parent a3dba0c6ed
commit 494ef6b9d0
37 files changed
+2039 -370

No files matched your search

@@ -0,0 +1,15 @@
import { fireEvent, render, screen } from '@testing-library/react'
import { describe, expect, it, vi } from 'vitest'
import { ShellClosedOverlay } from '../../src/components/terminal/TerminalOverlay'
describe('remote shell close recovery', () => {
it('explains remote TMOUT without claiming the pooled SSH connection is dead', () => {
const reopen = vi.fn()
render(<ShellClosedOverlay reason="远端 Shell 因空闲策略(TMOUT)自动退出" idleTimeout onReopen={reopen} />)
expect(screen.getByText('空闲超时,Shell 已退出')).toBeVisible()
expect(screen.getByText(/SSH 连接仍可用/)).toBeVisible()
fireEvent.click(screen.getByRole('button', { name: '重新打开 Shell' }))
expect(reopen).toHaveBeenCalledTimes(1)
})
})