Improve audit pipeline and outreach review

This commit is contained in:
2026-06-08 22:16:32 +02:00
parent ff18fc202e
commit 1695110e0a
34 changed files with 2792 additions and 238 deletions

View File

@@ -104,6 +104,11 @@ test("audit detail component uses getDetail query and renders skills overview se
/const\s+lead\s*=\s*result\?\.lead;/,
"AuditDetail should destructure lead from result.lead.",
);
assert.match(
detailSource,
/const\s+findings\s*=/,
"AuditDetail should derive findings from result.findings.",
);
assert.match(
detailSource,
/leadSummary\(\s*lead\s*\)/,
@@ -141,6 +146,43 @@ test("audit detail component uses getDetail query and renders skills overview se
);
});
test("audit detail component renders verified findings before checked-page evidence", async () => {
const detailSource = await source("components/audits/audit-detail.tsx");
const findingsIndex = detailSource.indexOf("Geprüfte Befunde");
const checkedPagesIndex = detailSource.indexOf("Geprüfte Seiten");
assert.notEqual(findingsIndex, -1, "AuditDetail should render a findings section.");
assert.notEqual(checkedPagesIndex, -1, "AuditDetail should still render checked pages.");
assert.equal(
findingsIndex < checkedPagesIndex,
true,
"Findings should be rendered before raw checked-page evidence.",
);
assert.match(
detailSource,
/findings\.map/,
"AuditDetail should render one row per verified finding.",
);
for (const field of [
"claim",
"recommendation",
"customerBenefit",
"evidenceRefs",
"confidence",
]) {
assert.match(
detailSource,
new RegExp(field),
`AuditDetail should surface finding.${field}.`,
);
}
assert.match(
detailSource,
/Evidence|Beleg|Quelle/,
"AuditDetail should label evidence chips for each finding.",
);
});
test("audit detail component renders compact checked-page evidence", async () => {
const detailSource = await source("components/audits/audit-detail.tsx");