Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

test(e2e): make irl discovery + pin-idle specs hermetic

nirholasc9db67c19f62
diff --git a/tests/e2e/irl-discovery.spec.js b/tests/e2e/irl-discovery.spec.js
index 33197a079..8f7cc0d00 100644
--- a/tests/e2e/irl-discovery.spec.js
+++ b/tests/e2e/irl-discovery.spec.js
@@ -68,6 +68,13 @@ function offset(lat, lng, north, east) {
// no-op stub. Returns a setter the test drives.
async function installRoutes(page) {
let served = [];
+ // Registered FIRST so it has the LOWEST priority (Playwright checks the most
+ // recently registered handler first). Every /api call the /irl boot fires that
+ // this test does NOT stub explicitly is otherwise proxied to live production
+ // by the dev server (vite.config.js DEV_API_PROXY), coupling the console-error
+ // assertion to prod health. Stub the rest to a clean 204 so the test is
+ // hermetic; the specific irl routes below still win.
+ await page.route('**/api/**', (route) => route.fulfill({ status: 204, body: '' }));
// Only the nearby read (query form) — never /api/irl/pins/mine.
await page.route(/\/api\/irl\/pins\?/, (route) =>
route.fulfill({ json: { pins: served } }),
diff --git a/tests/e2e/irl-pin-idle.spec.js b/tests/e2e/irl-pin-idle.spec.js
index f1e08b0f5..482987d1f 100644
--- a/tests/e2e/irl-pin-idle.spec.js
+++ b/tests/e2e/irl-pin-idle.spec.js
@@ -51,6 +51,11 @@ function offset(lat, lng, north, east) {
async function installRoutes(page) {
let served = [];
+ // Registered FIRST (lowest priority): stub every other /api call the /irl boot
+ // fires so nothing proxies to live production (vite DEV_API_PROXY), which would
+ // otherwise let a prod error leak into the console-error gate under load. The
+ // specific irl routes below are registered after, so they still win.
+ await page.route('**/api/**', (route) => route.fulfill({ status: 204, body: '' }));
await page.route(/\/api\/irl\/pins\?/, (route) =>
route.fulfill({ json: { pins: served } }),
);