fix: verify Orven with the packaged desktop launch contract
This commit is contained in:
@@ -11,7 +11,7 @@ import { publicSnapshot, compareOriginalState, hash } from './retained-host-stat
|
||||
// task continuation, process restart or automatic installer retry.
|
||||
const mode = process.argv[2], version = '1.25.9';
|
||||
assert.ok(['register', 'install', 'before', 'upgrade', 'final'].includes(mode));
|
||||
const root = path.resolve('.qa/orven-integration-1.25.9'), url = 'http://127.0.0.1:4318';
|
||||
const root = path.resolve(process.env.ORVEN_QA_RELEASE_ROOT ?? '.qa/orven-integration-1.25.9'), url = 'http://127.0.0.1:4318';
|
||||
const read = file => JSON.parse(fs.readFileSync(file, 'utf8').replace(/^\uFEFF/, ''));
|
||||
const save = (name, value) => {
|
||||
const file = path.join(root, name); fs.mkdirSync(path.dirname(file), { recursive: true });
|
||||
|
||||
@@ -14,8 +14,10 @@ const appRoot = path.resolve(process.env.AGENT_WORKBENCH_TEST_APP_ROOT ?? '.');
|
||||
const output = path.resolve(process.env.ORVEN_QA_OUTPUT ?? 'output/playwright/orven'); fs.mkdirSync(output, { recursive: true });
|
||||
let app;
|
||||
try {
|
||||
app = await _electron.launch({ executablePath: process.env.ORVEN_QA_ELECTRON ?? path.resolve('node_modules/electron/dist/electron.exe'),
|
||||
args: [path.join(appRoot, 'dist-desktop/main.cjs'), '--app-root', appRoot, '--data-root', f.data, '--node', process.execPath, '--port', new URL(host.url).port, '--hidden-window'],
|
||||
const executablePath = process.env.ORVEN_QA_ELECTRON ?? path.resolve('node_modules/electron/dist/electron.exe');
|
||||
const packaged = path.resolve(executablePath) === path.join(appRoot, 'desktop/AgentWorkbench.exe');
|
||||
app = await _electron.launch({ executablePath,
|
||||
args: [...(packaged ? [] : [path.join(appRoot, 'dist-desktop/main.cjs')]), '--app-root', appRoot, '--data-root', f.data, '--node', process.execPath, '--port', new URL(host.url).port, '--hidden-window'],
|
||||
env: projectEnvironment(), cwd: process.cwd(), timeout: 60000 });
|
||||
const page = await app.firstWindow(), errors = [];
|
||||
page.on('pageerror', error => errors.push(error.message));
|
||||
|
||||
Reference in New Issue
Block a user