mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
fix(test): require passing Telegram evidence reports
This commit is contained in:
@@ -372,11 +372,14 @@ export function writeTelegramEvidence(rawArgs = process.argv.slice(2)) {
|
||||
if (!existsSync(observedPath)) {
|
||||
throw new Error(`Missing Telegram observed messages: ${observedPath}`);
|
||||
}
|
||||
const summary = readJson(summaryPath);
|
||||
const pass = summary.counts?.failed === 0 && Number(summary.counts?.total ?? 0) > 0;
|
||||
if (!existsSync(reportPath)) {
|
||||
if (pass) {
|
||||
throw new Error(`Missing Telegram QA report for passing summary: ${reportPath}`);
|
||||
}
|
||||
writeFileSync(reportPath, "# Mantis Telegram Live QA\n\nTelegram QA report was unavailable.\n");
|
||||
}
|
||||
|
||||
const summary = readJson(summaryPath);
|
||||
const observedMessages = readJson(observedPath);
|
||||
const transcriptHtml = renderTelegramEvidenceHtml({ observedMessages, summary });
|
||||
writeFileSync(path.join(outputDir, "telegram-live-transcript.html"), transcriptHtml, "utf8");
|
||||
|
||||
Reference in New Issue
Block a user