Skip to content

ci(e2e): desktop E2E uses VSIX via E2E_FROM_VSIX opt-in; phase 1 org-browser - W-21432332#7254

Open
mshanemc wants to merge 4 commits intodevelopfrom
feature/W-21432332
Open

ci(e2e): desktop E2E uses VSIX via E2E_FROM_VSIX opt-in; phase 1 org-browser - W-21432332#7254
mshanemc wants to merge 4 commits intodevelopfrom
feature/W-21432332

Conversation

@mshanemc
Copy link
Copy Markdown
Contributor

What does this PR do?

Adds an opt-in VSIX-based mode for desktop E2E tests. Previously, desktop tests launched VS Code via --extensionDevelopmentPath, which loads the raw tsc output (out/src) — not the bundled dist/ artifact that ships to customers. With E2E_FROM_VSIX=1, the test fixture builds a real VSIX with vscode:package, installs it into a hash-keyed cache dir under .vscode-test/ext-<hash>/, and launches VS Code with --extensions-dir instead of --extensionDevelopmentPath. Dev-path remains the default for fast local iteration.

Phase 1 (this PR): org-browser proven locally (macOS) and on CI (macOS, Windows, Ubuntu). Other packages follow in subsequent commits on this branch.

Key implementation details:

  • createDesktopTest.ts: new useVsix option (default: process.env.E2E_FROM_VSIX === '1'); new installedExtensionsDir worker fixture with per-pid temp dirs to prevent concurrent worker install conflicts
  • salesforcedx-vscode-org-browser: test:desktop wireit deps switch from vscode:bundlevscode:package for self and services
  • orgBrowserE2E.yml: E2E_FROM_VSIX: 1 added to e2e-desktop job env
  • All 11 test:desktop wireit scripts have E2E_FROM_VSIX marked external so cache keys are mode-aware

What issues does this PR fix or reference?

@W-21432332@

Functionality Before

Desktop E2E loads unbundled out/src tsc output via --extensionDevelopmentPath. Packaging bugs (wrong dist/ paths, .vscodeignore gaps, packageUpdates not applied) are invisible to tests.

Functionality After

CI runs desktop E2E against the real VSIX (dist/ as main, all packaging transforms applied). Local dev unchanged by default; E2E_FROM_VSIX=1 opts in locally.

Made with Cursor

…- W-21432332

- createDesktopTest: add useVsix option (defaults to E2E_FROM_VSIX=1 env var)
  - new installedExtensionsDir worker fixture: hash-keyed VSIX cache under
    .vscode-test/ext-<hash>/; installs via resolveCliArgsFromVSCodeExecutablePath
    + spawnSync; atomic rename; idempotent across parallel workers
  - electronApp: VSIX mode uses --extensions-dir (installed cache), no
    --extensionDevelopmentPath; dev-path mode unchanged
- org-browser: test:desktop deps use vscode:package (self + services) instead
  of vscode:bundle so CI exercises real shipping artifact
- orgBrowserE2E.yml: add E2E_FROM_VSIX=1 to e2e-desktop job env
- disable all other E2E workflows + testCommitExceptMain for this branch

Made-with: Cursor
… - W-21432332

Use per-pid tmp directories during VSIX install so parallel Playwright
workers don't conflict on the VS Code CLI's internal atomic rename step.
Switch to resolveCliPathFromVSCodeExecutablePath (no baseArgs) to avoid
duplicate --extensions-dir/--user-data-dir flag warnings.

Made-with: Cursor
Made-with: Cursor

# Conflicts:
#	.github/workflows/orgBrowserE2E.yml
@mshanemc mshanemc requested a review from a team as a code owner April 24, 2026 18:24
@mshanemc mshanemc requested a review from jonnyhork April 24, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant