Files
hy 203f8ab180 feat(showcase): add new tests for PPT management and knowledge base interactions
- Implemented `ppt-management-briefing-edit.showcase.test.ts` to test editing PPTs with AI assistance, including cost computation and screenshot capture.
- Created `ppt-management-briefing-review.showcase.test.ts` for reviewing PPTs, ensuring the generation of review screenshots and cost analysis.
- Added shared utility functions in `shared.ts` for handling showcase fixtures, workspace seeding, and cost computation.
- Developed `xinghe-kb-reply.showcase.test.ts` to validate knowledge base interactions, capturing screenshots of responses and ensuring correct tool usage.
- Introduced `xinghe-service-contract.showcase.test.ts` to test PDF contract inquiries, verifying unchanged source documents and capturing relevant screenshots.
- Configured Vitest for showcase tests in `vitest.showcase.config.mts`, setting appropriate timeouts and test inclusion/exclusion criteria.
2026-09-18 14:22:54 +08:00

23 lines
632 B
JavaScript

import { spawnSync } from 'node:child_process'
import path from 'node:path'
const ROOT = process.cwd()
const WORKFLOW_SCRIPT = path.join(ROOT, 'scripts', 'test', 'workflow.mjs')
const result = spawnSync(
process.execPath,
[WORKFLOW_SCRIPT, '--showcase', ...process.argv.slice(2)],
{
cwd: ROOT,
stdio: 'inherit',
env: Object.fromEntries(Object.entries(process.env).filter(([key]) => !key.startsWith('npm_')))
}
)
if (result.error) {
process.stderr.write(`[showcase] command failed to start: ${String(result.error)}\n`)
process.exit(1)
}
process.exit(typeof result.status === 'number' ? result.status : 1)