feat: CEF mode for Electrobun E2E — CDP automation, WebGL unlocked
- electrobun.config.ts: AGOR_CEF=1 enables bundleCEF + chromiumFlags (remote-debugging-port=9222). Production stays on WebKitGTK. - wdio.electrobun.conf.js: rewritten for CDP via devtools protocol. Spawns app, waits for CDP port, kills on complete. - helpers/actions.ts: waitForPort() polls CDP /json endpoint - docs/testing.md: CEF mode docs, CI setup, troubleshooting - npm script: test:e2e:electrobun prepends AGOR_CEF=1 CEF also enables: WebGL xterm.js addon (unlimited terminals), WebGPU, full Chrome DevTools — all for dev/test only.
This commit is contained in:
parent
fea6e267b0
commit
c79d489e1a
5 changed files with 189 additions and 27 deletions
|
|
@ -1,5 +1,15 @@
|
|||
import type { ElectrobunConfig } from "electrobun";
|
||||
|
||||
// CEF mode: opt-in via AGOR_CEF=1. Used for dev/test (E2E automation via CDP,
|
||||
// WebGL support, unlimited xterm instances). Production uses WebKitGTK (lighter,
|
||||
// no Chromium dependency, system-native).
|
||||
const useCEF = process.env.AGOR_CEF === "1";
|
||||
|
||||
// When CEF is active, enable remote debugging for CDP-based E2E automation.
|
||||
const cefFlags: Record<string, string | boolean> | undefined = useCEF
|
||||
? { "remote-debugging-port": "9222", "remote-allow-origins": "*" }
|
||||
: undefined;
|
||||
|
||||
export default {
|
||||
app: {
|
||||
name: "Agent Orchestrator",
|
||||
|
|
@ -16,16 +26,22 @@ export default {
|
|||
},
|
||||
watchIgnore: ["dist/**"],
|
||||
mac: {
|
||||
bundleCEF: false,
|
||||
bundleCEF: useCEF,
|
||||
bundleWGPU: true,
|
||||
...(useCEF && { defaultRenderer: "cef" as const }),
|
||||
...(cefFlags && { chromiumFlags: cefFlags }),
|
||||
},
|
||||
linux: {
|
||||
bundleCEF: false,
|
||||
bundleCEF: useCEF,
|
||||
bundleWGPU: true,
|
||||
...(useCEF && { defaultRenderer: "cef" as const }),
|
||||
...(cefFlags && { chromiumFlags: cefFlags }),
|
||||
},
|
||||
win: {
|
||||
bundleCEF: false,
|
||||
bundleCEF: useCEF,
|
||||
bundleWGPU: true,
|
||||
...(useCEF && { defaultRenderer: "cef" as const }),
|
||||
...(cefFlags && { chromiumFlags: cefFlags }),
|
||||
},
|
||||
},
|
||||
} satisfies ElectrobunConfig;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue