Enable E2E tests on Linux#3295
Merged
ivan-ottinger merged 5 commits intotrunkfrom May 4, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Enables Linux E2E stability/safety by preventing Linux CLI auto-install side effects during E2E runs and reducing resource usage in the blueprint E2E suite.
Changes:
- Skip
autoInstallLinuxCliIfNeeded()during E2E runs to avoid writing to the host user’s home/profile. - Update the main sidebar “Stop” locator to handle both single-site and multi-site labels.
- Run blueprint E2E tests with a single running site at a time by stopping sites between tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/studio/src/modules/cli/lib/linux-installation-manager.ts | Adds an E2E guard to prevent Linux CLI auto-install during E2E. |
| apps/studio/e2e/page-objects/main-sidebar.ts | Updates stop button locator to match both “Stop” and “Stop all”. |
| apps/studio/e2e/blueprints.test.ts | Stops the default onboarding site after setup and stops sites after each blueprint test to reduce peak memory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
📊 Performance Test ResultsComparing bcdcd24 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Related issues
How AI was used in this PR
Drafted with Claude Code under interactive review. The author pushed back on overstated claims (e.g. attributing the OOM to PHP WASM workers when only the symptom was verified) and on a speculative selector change that was reverted after confirming it was unnecessary. Each change here was vetted against the actual test runs and existing codebase conventions.
Proposed Changes
process.env.E2Eguard toautoInstallLinuxCliIfNeededso a packaged Linux build does not write to the host user's~/.bashrcor~/.local/bin/studioduring E2E runs.electron-vite build: vite statically replacesprocess.env.NODE_ENVwith"production", so the existingNODE_ENV !== 'production'guard collapses to a deadfalsein the bundle (the same substitution applies to the fullpackageflow, which just wraps the vite output). Without the newprocess.env.E2Eterm, the function would fire during E2E and callinstallCli(), which usesos.homedir()directly — andE2E_HOME_PATHdoes not override that.blueprints.test.tsto one at a time. The shared session previously accumulated 6+ running sites by the end of the file, which crashes memory-constrained hosts (e.g. local Linux VMs). Each blueprint test now runs with only its own site; the default onboarding site is stopped afterbeforeAll, and each newly created site is stopped after the test completes.getStopAllButtoninmain-sidebar.tsto match both "Stop" (single running site) and "Stop all" (multiple). The button text is conditional inrunning-sites.tsx; the existing locator only matched "Stop all" exactly, which made the new cleanup logic in blueprints unreliable when one site was running.Testing Instructions
npm run make.npx playwright install chromium.npm run e2e.import.test.tsis skipped without the optionale2e/imports/jetpack-backup.tar.gzfixture). A few editor-iframe tests may flake on the first attempt and pass on Playwright's automatic retry.Verified locally on Linux arm64 (Parallels VM). Mac/Windows behavior should be unchanged: the blueprints cleanup adds ~15-30s to that file's run time, otherwise no functional difference.
Pre-merge Checklist