feat(electrobun): auto-updater + E2E tests + splash screen — ALL GAPS CLOSED
Auto-updater: - updater.ts: GitHub Releases API check, semver comparison, timestamp tracking - AdvancedSettings wired to real updater.check/getVersion RPC E2E testing (45 tests): - wdio.conf.js: WebDriverIO config for Electrobun (port 9761) - fixtures.ts: isolated temp dirs, demo data, git repo init - 4 spec files: smoke (13), settings (13), terminal (10), agent (9) Splash screen: - SplashScreen.svelte: animated gradient AGOR logo, version, loading dots - App.svelte: shows splash until all init promises resolve, 300ms fade-out
This commit is contained in:
parent
88206205fe
commit
4826b9dffa
8 changed files with 637 additions and 11 deletions
99
ui-electrobun/tests/e2e/wdio.conf.js
Normal file
99
ui-electrobun/tests/e2e/wdio.conf.js
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
/**
|
||||
* WebDriverIO configuration for Electrobun E2E tests.
|
||||
*
|
||||
* Electrobun uses WebKitGTK under the hood on Linux — we drive it via
|
||||
* WebDriver (same as Tauri's approach with tauri-driver).
|
||||
* Port 9760 matches our Vite dev port convention.
|
||||
*/
|
||||
|
||||
import { execSync } from "node:child_process";
|
||||
import { resolve, dirname } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { existsSync } from "node:fs";
|
||||
import { createTestFixture } from "./fixtures.ts";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const projectRoot = resolve(__dirname, "../..");
|
||||
|
||||
// Electrobun built binary path (canary build output)
|
||||
const electrobunBinary = resolve(projectRoot, "build/Agent Orchestrator");
|
||||
|
||||
// Test fixture — isolated config/data dirs
|
||||
const fixture = createTestFixture("agor-ebun-e2e");
|
||||
|
||||
process.env.AGOR_TEST = "1";
|
||||
process.env.AGOR_TEST_DATA_DIR = fixture.dataDir;
|
||||
process.env.AGOR_TEST_CONFIG_DIR = fixture.configDir;
|
||||
|
||||
const WEBDRIVER_PORT = 9761;
|
||||
|
||||
console.log(`Test fixture created at ${fixture.rootDir}`);
|
||||
|
||||
export const config = {
|
||||
// ── Runner ──
|
||||
runner: "local",
|
||||
maxInstances: 1,
|
||||
|
||||
// ── Connection ──
|
||||
hostname: "localhost",
|
||||
port: WEBDRIVER_PORT,
|
||||
path: "/",
|
||||
|
||||
// ── Specs ──
|
||||
specs: [
|
||||
resolve(__dirname, "specs/smoke.test.ts"),
|
||||
resolve(__dirname, "specs/settings.test.ts"),
|
||||
resolve(__dirname, "specs/terminal.test.ts"),
|
||||
resolve(__dirname, "specs/agent.test.ts"),
|
||||
],
|
||||
|
||||
// ── Capabilities ──
|
||||
capabilities: [
|
||||
{
|
||||
"wdio:enforceWebDriverClassic": true,
|
||||
browserName: "webkit",
|
||||
},
|
||||
],
|
||||
|
||||
// ── Framework ──
|
||||
framework: "mocha",
|
||||
mochaOpts: {
|
||||
ui: "bdd",
|
||||
timeout: 120_000,
|
||||
},
|
||||
|
||||
// ── Reporter ──
|
||||
reporters: ["spec"],
|
||||
|
||||
// ── Logging ──
|
||||
logLevel: "warn",
|
||||
|
||||
// ── Timeouts ──
|
||||
waitforTimeout: 10_000,
|
||||
connectionRetryTimeout: 30_000,
|
||||
connectionRetryCount: 3,
|
||||
|
||||
// ── Hooks ──
|
||||
|
||||
onPrepare() {
|
||||
if (!existsSync(electrobunBinary) && !process.env.SKIP_BUILD) {
|
||||
console.log("Building Electrobun canary...");
|
||||
execSync("vite build && electrobun build --env=canary", {
|
||||
cwd: projectRoot,
|
||||
stdio: "inherit",
|
||||
});
|
||||
}
|
||||
|
||||
if (!existsSync(electrobunBinary)) {
|
||||
throw new Error(
|
||||
`Electrobun binary not found at ${electrobunBinary}. ` +
|
||||
"Run 'bun run build:canary' first.",
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
afterSession() {
|
||||
fixture.cleanup();
|
||||
console.log("Test fixture cleaned up.");
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue