Skip to content

Commit 102019b

Browse files
authored
test(desktop): stop the agent's terminal commands in the real app, with real shells and real tmux (#8733)
* test(desktop): stop the agent's terminal commands in the real app, with real shells and real tmux An Electron suite for terminal cancel, which ships without a feature flag: Stop, sign-out (by the web app's logout and by the session cookie going away), switching Terminal off, the launch after an interrupted sign-out or a crash, and untracked runs on tmux without pane options. It asserts what is running and which panes exist, never which calls were made. - Agent and user commands ignore SIGHUP, SIGINT and SIGTERM, so only Sim's own stop can end them and a stray stop would show; each launch gets its own tmux server, and every process name carries a per-run suffix. - The fixture Sim and its helpers move to e2e/executor-sim.ts, shared with the background executor suite. - The macOS E2E job installs tmux so the tmux scenarios run in CI; elsewhere they skip when tmux is missing. * test(desktop): draw the run nonce from the shared random helpers, and keep the lease constant private * test(desktop): attach terminal-cancel diagnostics instead of printing them, write a suite report, and keep the user pane through a session ended elsewhere * test(desktop): add each terminal-cancel check to the report as it finishes, so a retry keeps the original failure
1 parent 8f617da commit 102019b

4 files changed

Lines changed: 1181 additions & 500 deletions

File tree

‎.github/workflows/desktop-e2e.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,16 @@ jobs:
8181
working-directory: apps/desktop
8282
run: bunx playwright install chromium
8383

84+
# The terminal-cancel suite drives a real tmux server; without tmux its tmux scenarios skip.
85+
- name: Install tmux
86+
run: brew install tmux
87+
8488
- name: Run Playwright _electron smoke suite
8589
working-directory: apps/desktop
8690
run: bunx playwright test
8791
env:
8892
BACKGROUND_EXECUTOR_REPORT_PATH: test-results/background-executor-report.json
93+
TERMINAL_CANCEL_REPORT_PATH: test-results/terminal-cancel-report.json
8994

9095
- name: Upload test results
9196
if: failure()

0 commit comments

Comments
 (0)