Repository navigation
test(e2e): one managed-host setup path and skip gate for the ssh-orcad specs (Phase 3.99 0.11a) - #27465
Conversation
|
P0/P1 review (self + codex gpt-6.1-sol high, read-only, of the same commit before the rebase; the content didn't change): none. Codex traced all 197 assertion chains across the 16 specs, the launch, listener and restart order per spec, teardown on failure, the skip predicates, and routing selection. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The test migration is mergeable after normal checks; no concrete failure remains identified. Pre-merge checks |
|
ELI5
About ten of the managed-SSH end-to-end tests each spelled out the same 25 setup steps by hand: launch the app, close it, write a saved SSH host into the profile, launch again, convert it to a managed server, find that server, open the workspace, and tear it all down afterwards. Sixteen of them also copied the same "skip unless Docker is available" line. This PR gives that setup one home and points those specs at it.
What Changed
Tests only; no product code changes. Phase 3.99 PR 0.11a (the setup half of 0.11; the quote half merged as #27449).
In
tests/e2e/helpers/orcad-managed-workspace.ts:launchConvertedProfile(fixture, { repoPath?, folderPath?, beforeSeed?, onLaunch? })is the one setup path: first launch → optionalbeforeSeed(page)(for example, adding a desktop repository at the same path) → close → seed the relay-era profile → relaunch → optionalonLaunch(page, seeded)before the session is ready (where the specs attach console or store listeners) → convert → find the managed environment.launchManagedWorkspaceis that plus the existing activation step.relaunchManagedApp(fixture, onLaunch?)is the one close/relaunch/wait sequence.skipUnlessManagedDockerHost()is the one skip gate.These specs move onto
withManagedHostand the helpers: editor-ownership, editor-watch-recovery, explorer-watch-recovery, markdown-conversion, markdown-link-refresh, markdown-live-documents, browser-drop-owner, terminal-root-owner and open-in-owner. terminal-journeys usesrelaunchManagedApp. 16 specs use the one skip gate. The source-routing regexes for the three specs that already route on helper changes now includeorcad-managed-workspace.Teardown now always runs the shared nested
finally: close the live app, dispose the session, clean the host. The browser page server and the temp directory close in a.finallyafter it.Accepted differences, none of which changes what a test proves:
Net: +359 / −637 (−278). Production: 0.
Why
Each hand-rolled copy is a place where a launch, a listener or a teardown step can drift. Routing them through one helper also confines the dependency on relay-era conversion to one function, so retiring that migration later is a one-function change for these specs. I extended the existing
withManagedHost/launchManagedWorkspacehelpers instead of writing a new harness.Not in this PR: seeding a relay-era terminal tab into
orcad-upgrade-profile(design P1-3). As a default it would change the tab-count assertions in terminal-journeys and editor-ownership. The PR that asserts on it (C1) will add it together with its assertion.Linked Issue
Internal Phase 3.99 cleanup (PR 0.11a).
Visual Proof
N/A: test harness only.
Testing
pnpm tcandpnpm lintpass.tsc -p config/tsconfig.e2e.jsongives the same error set as main (no new errors; the two in these specs that predate this PR are unchanged).pnpm run check:code-quality:changedpasses, oxlint and oxfmt are clean, and the routing suites pass.The orcad Docker lanes and
changed e2e specsrun these specs in CI (no local Docker or Electron).I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
P0/P1 review: self review plus codex (gpt-6.1-sol high), read-only on refs, comparing each spec step by step. Both found no P0/P1 issues.
Agent skill upstream boundary
Notes
SSH: the same Docker host, profile seed and conversion path. Folder workspaces: the explorer folder case keeps its
/tmpfolder seed. Windows: the win32 skips are kept.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)