Repository navigation
test(e2e): cover SSH user journeys on an orcad-managed host - #27323
Conversation
E2E coverage map: specs deleted by #27214 (relay client removal)#27214 deletes 41 Docker-SSH / localhost specs that only ran by deploying the relay. A managed orcad
New specs (PR #27323, job
Gaps and product findingsSeven journeys have no managed-host e2e yet. Each needs a harness the managed lane does not have, a
Product findings the ports turned up. These are not test problems:
|
📝 Walkthrough
Priority: ➖ Normal Merge Risk: 🔵 Low · up to This change only adds end-to-end tests and CI routing, so production behavior is unaffected. Some assertions can still pass while the UI is broken, which weakens the coverage the tests are meant to give. Tighten them before relying on these journeys. Pre-merge checks |
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
tests/e2e/helpers/terminal-workspace-root-link.ts (1)
73-83: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUse
ControlOrMetainstead of selecting the modifier by platform.Playwright maps
ControlOrMetato the correct key on each OS. With this change, Lines 77-83 can go down to a single click call that has a modifier.♻️ Proposed refactor
- const modifier = process.platform === 'darwin' ? 'Meta' : 'Control' - await page.keyboard.down(modifier) - try { - await page.mouse.click(target.current.x, target.current.y) - } finally { - await page.keyboard.up(modifier) - } + await page.keyboard.down('ControlOrMeta') + try { + await page.mouse.click(target.current.x, target.current.y) + } finally { + await page.keyboard.up('ControlOrMeta') + }This follows the learning to use the
ControlOrMetamodifier rather than manually detecting the platform.Source: Learnings
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
f950738c-5506-411f-8a85-5d169c47b565
📒 Files selected for processing (10)
.github/workflows/e2e.ymlconfig/scripts/ci-e2e-job-selection.mjsconfig/scripts/orcad-e2e-routing.test.mjsconfig/scripts/pr-e2e-source-routing.mjstests/e2e/helpers/orcad-convert-host.tstests/e2e/helpers/orcad-managed-workspace.tstests/e2e/helpers/terminal-workspace-root-link.tstests/e2e/ssh-orcad-terminal-journeys.spec.tstests/e2e/ssh-orcad-vm-provisioned-root.spec.tstests/e2e/ssh-orcad-workspace-tools.spec.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
| orcaPage.evaluate( | ||
| (repoId) => window.__store!.getState().repos.some((repo) => repo.id === repoId), |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Assert project removal in the sidebar.
If the store removes the project but the sidebar remains stale, this poll passes. Assert that the workspace option disappears from the DOM after removal. Keep the Docker check to verify container cleanup.
As per coding guidelines, “Use the store to reach a state; use the DOM to prove the state is correct.”
Source: Coding guidelines
08601cf to
2dc4916
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
config/scripts/orcad-e2e-routing.test.mjs (1)
142-157: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCover the managed-orcad product-source predicates in this routing test.
This test passes only because it routes
tests/e2e/helpers/orcad-managed-workspace.ts. It does not verify the managed-orcad product-source patterns declared byssh.orcad-journeys. An incorrect pattern could therefore leave this test passing while a matching product-source change fails to select theorcad-journeys-dockerjob.Add routing cases for each product-source predicate.
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
f0d8cc73-2421-4c9f-9473-7a5e413f3964
📒 Files selected for processing (2)
config/scripts/pr-e2e-source-routing.mjsconfig/scripts/release-cut-token-permissions.test.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
…ark forward restore fixme
…ark the link test
6e96eaa to
46264e2
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/e2e/ssh-orcad-workspace-tools.spec.ts (1)
81-84: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftAssert workspace-tool results in the DOM.
The port-forward test can pass while the managed workspace’s Ports UI is broken. The agent-status test can pass while its status is not rendered. Keep the runtime checks, but add DOM assertions for the listener or forward and for the affected terminal’s agent status. If the UI cannot show a result yet, do not count that test as a passing user journey. As per coding guidelines, “E2E Assertions Must Target the DOM, Not the Store”; a spec’s final assertion must be user-observable.
Also applies to: 159-161, 193-195
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
511529c5-43f4-42b4-8eb9-1d0dba421ebd
📒 Files selected for processing (1)
tests/e2e/ssh-orcad-workspace-tools.spec.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
ELI5
The old way of reaching an SSH machine (the "relay") is being removed in #27214. About 40 end-to-end tests disappear with it, because they only worked through the relay. This PR adds new end-to-end tests that do the same things a user does on an SSH machine, through the new managed server (orcad). With them in place, removing the relay doesn't leave those journeys untested.
What Changed
ssh-orcad-terminal-journeys.spec.tstopkeeps redrawing. A tab opened after a reconnect gets a fresh, titled shell that survives the next reconnect.docker pause). The app marks the frozen host as lost instead of hanging, and the pane answers again afterwards with its scrollback.ssh-orcad-workspace-tools.spec.tsssh-orcad-vm-provisioned-root.spec.ts: a VM recipe's SSH root is adopted as the main worktree.orcad-managed-workspace.ts, gets to a managed workspace the way an upgrading user does: a saved SSH profile whose first connect deploys orcad. The tests then drive terminals through the tab bar and the keyboard, and read what each pane actually shows.orcad-journeys-docker, builds the orcad template and runs these specs. It is triggered by the specs themselves, by their helpers, and by managed-SSH terminal and connect sources. The general e2e lane skips them.test.fixme. Both fail because the product is broken on main today, not because the test is wrong:ssh-orcad-terminal-root-ownerfails the same way.Why
Each new test goes through the real managed-host path: a real sshd, a real orcad deploy and a real Electron app. The alternative was keeping the relay specs and pointing them at orcad. They were written against relay internals (relay process ids, relay replay buffers, relay lease files), so most of their assertions would no longer mean anything. Journeys that don't depend on the SSH transport are already covered by the paired-runtime specs, and a managed host runs the same code above the tunnel. Those are not duplicated here.
The full per-spec map (ported / already covered / dropped, with a reason for each) is in the PR comments.
Linked Issue
Part of the relay retirement (#27214, #27215).
Visual Proof
N/A: test-only change, no UI change.
Testing
pnpm tcpasses. oxlint is clean, and so ispnpm run check:code-quality:changed.The routing contract tests pass:
orcad-e2e-routing,pr-e2e-gate-contractandci-e2e-job-selection.The new lane passes on CI against the Docker SSH host with 7 passed and 2 fixme (e2e workflow dispatch on this branch).
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
P0/P1 review by GPT-6.1 Sol (read-only) and the author. One P1 here was fixed: a failed launch could leave the Electron app running after the test. The other two P1s were in the #27214 rework and are fixed on that branch.
Agent skill upstream boundary
Notes
Linux CI only: the Docker host is POSIX. All the specs drive a real SSH host.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)