This commit is contained in:
+24
-2
@@ -37,6 +37,23 @@ const WORKTREE_DIR = join(e2eTmp, 'workspaces');
|
||||
// Written to a gitignored file next to this config so specs can read it.
|
||||
writeFileSync(join(__dirname, '.e2e-db-path'), DB_PATH);
|
||||
|
||||
// Dedicated, deterministic config for the E2E webServer, handed over via
|
||||
// AAO_CONFIG. Two reasons:
|
||||
// 1) Isolation — without this, dist/main.js loads the repo-root ./config.yaml
|
||||
// if a developer happens to have one (it's gitignored, so present locally
|
||||
// but absent in CI). That silently changes E2E behavior between machines
|
||||
// (e.g. pointing the worker at a real LLM). Pinning AAO_CONFIG makes the
|
||||
// run identical everywhere; everything unset here falls back to defaults.
|
||||
// 2) SSH enabled — the settings sub-tab specs assert the space-scoped SSH
|
||||
// panel (space-ssh-panel) renders. That testid only mounts once
|
||||
// /api/ssh/connections answers 200; with SSH off the route 404s and the
|
||||
// panel shows its "SSH disabled" view (no testid). In isolation the spec
|
||||
// scraped the brief loading-state render and passed by luck; under full-
|
||||
// suite load that window closed and both SSH specs failed. Enabling SSH
|
||||
// (needs the MCP_ENCRYPTION_KEY set below) makes the panel deterministic.
|
||||
const E2E_CONFIG = join(e2eTmp, 'e2e-config.yaml');
|
||||
writeFileSync(E2E_CONFIG, 'ssh:\n enabled: true\n');
|
||||
|
||||
export default defineConfig({
|
||||
testDir: resolve(__dirname, 'e2e'),
|
||||
// The build+boot can be slow; keep a roomy per-test budget.
|
||||
@@ -50,6 +67,7 @@ export default defineConfig({
|
||||
use: {
|
||||
baseURL: BASE_URL,
|
||||
headless: true,
|
||||
locale: 'ja-JP',
|
||||
// This sandbox disables the Chromium sandbox (bwrap/userns off). Launch
|
||||
// with --no-sandbox or every browser launch fails to spawn.
|
||||
launchOptions: {
|
||||
@@ -65,8 +83,9 @@ export default defineConfig({
|
||||
},
|
||||
],
|
||||
|
||||
// Boot the real orchestrator (worker mode) with auth OFF (no config.yaml =>
|
||||
// defaults => synthetic 'local' user). dist/ must exist (npm run build:all).
|
||||
// Boot the real orchestrator (worker mode) with auth OFF (the pinned
|
||||
// E2E_CONFIG has no auth section => defaults => synthetic 'local' user).
|
||||
// dist/ must exist (npm run build:all).
|
||||
webServer: {
|
||||
command: 'node dist/main.js',
|
||||
cwd: repoRoot,
|
||||
@@ -80,6 +99,9 @@ export default defineConfig({
|
||||
PORT: String(PORT),
|
||||
DB_PATH,
|
||||
WORKTREE_DIR,
|
||||
// Pin the config to the throwaway E2E file so the run never inherits a
|
||||
// developer's repo-root ./config.yaml (see E2E_CONFIG above).
|
||||
AAO_CONFIG: E2E_CONFIG,
|
||||
AAO_MODE: 'worker',
|
||||
LOG_LEVEL: 'warn',
|
||||
// Mount the MCP subsystem (gated on a 64-hex MCP_ENCRYPTION_KEY) so the
|
||||
|
||||
Reference in New Issue
Block a user