Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

test: reuse offline Chrome capture flags for sound acceptance (#9397)

[._.]/ Adam Eivy7d5221ffe60d
diff --git a/server/services/codeAnimation/stages.realBrowser.db.test.js b/server/services/codeAnimation/stages.realBrowser.db.test.js
index 2337268d62..684f01781d 100644
--- a/server/services/codeAnimation/stages.realBrowser.db.test.js
+++ b/server/services/codeAnimation/stages.realBrowser.db.test.js
@@ -11,7 +11,7 @@ import { join } from 'node:path';
import { chromium } from 'playwright-core';
import { cleanupTempDataRoots, lazyTempDataRoot, makePathsProxy } from '../../lib/mockPathsDataRoot.js';
import { findFfmpeg, findFfprobe } from '../../lib/ffmpeg.js';
-import { _cleanupTestBrowser, _waitForTestChrome } from '../htmlComposition/testBrowserCleanup.js';
+import { _cleanupTestBrowser, _waitForTestChrome, _testChromeCaptureArgs } from '../htmlComposition/testBrowserCleanup.js';
let endpoint;
vi.mock('../browserService.js', () => ({ cdpRequest: path => fetch(`${endpoint}${path}`) }));
@@ -70,7 +70,7 @@ let projectId;
describe.skipIf(!dbReady || !chrome || !ffmpeg || !ffprobe)('Production stages with real Chrome and ffmpeg', () => {
beforeAll(async () => {
const profile = join(lazyTempDataRoot('portos-code-animation-stages-'), 'chrome-test-profile');
- proc = spawn(chrome, ['--headless=new', '--no-sandbox', '--no-first-run', '--disable-background-networking', '--remote-debugging-port=0', `--user-data-dir=${profile}`, 'about:blank'], { stdio: ['ignore', 'ignore', 'pipe'] });
+ proc = spawn(chrome, _testChromeCaptureArgs(profile), { stdio: ['ignore', 'ignore', 'pipe'] });
try {
const ws = await _waitForTestChrome(proc);
endpoint = new URL(ws).origin.replace('ws:', 'http:');
@@ -97,9 +97,9 @@ describe.skipIf(!dbReady || !chrome || !ffmpeg || !ffprobe)('Production stages w
const { done } = await startProductionStageRun(projectId, {}, {
repair, render: ({ directory }) => renderComposition({ directory, jobId: 'stages-acceptance' }),
});
- expect(await done).toBe('completed');
-
+ const status = await done;
const [{ data }] = (await getProductionHistory(projectId, { limit: 1, offset: 0 })).items;
+ expect(status, JSON.stringify(data.findings)).toBe('completed');
const inspections = data.stages.filter(stage => stage.key === 'inspect');
expect(inspections[0].findings.map(finding => finding.kind)).toContain('frozen-film');
expect(inspections[0].verdict.status).toBe('fail');