MCPcopy Create free account
hub / github.com/SethGammon/Citadel / testAppServerDashboard

Function testAppServerDashboard

scripts/test-codex-operational-improvements.js:288–323  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

286 tmp,
287 '--write',
288 ], {
289 cwd: CITADEL_ROOT,
290 stdio: 'pipe',
291 encoding: 'utf8',
292 timeout: 20000,
293 });
294 const result = JSON.parse(output);
295 assert.equal(result.fetchedItems, 1);
296 assert.equal(result.result.codexItems, 1);
297 assert(fs.existsSync(path.join(tmp, '.planning', 'pr-review', 'owner-repo-7.json')));
298 } finally {
299 fs.rmSync(tmp, { recursive: true, force: true });
300 }
301}
302
303function testArtifactVerification() {
304 const tmp = tempProject('citadel-artifacts-');
305 try {
306 const screenshot = path.join(tmp, '.planning', 'screenshots', 'qa.png');
307 fs.mkdirSync(path.dirname(screenshot), { recursive: true });
308 fs.writeFileSync(screenshot, 'fake-png', 'utf8');
309 recordAppArtifact({
310 projectRoot: tmp,
311 workflow: 'qa',
312 kind: 'screenshot',
313 path: '.planning/screenshots/qa.png',
314 status: 'pass',
315 });
316 const pass = verifyAppArtifacts({ projectRoot: tmp, requireExistingPaths: true });
317 assert(pass.pass, JSON.stringify(pass, null, 2));
318
319 recordAppArtifact({
320 projectRoot: tmp,
321 workflow: 'qa',
322 kind: 'screenshot',
323 path: '.planning/screenshots/missing.png',
324 status: 'pass',
325 });
326 const fail = verifyAppArtifacts({ projectRoot: tmp, requireExistingPaths: true });

Calls 4

summarizeAppServerEventsFunction · 0.85
writeAppServerDashboardFunction · 0.85
tempProjectFunction · 0.70
assertFunction · 0.70

Tested by

no test coverage detected