Fix MVP audit evidence pipeline

This commit is contained in:
2026-06-08 08:33:15 +02:00
parent a45b92ea0a
commit ff18fc202e
16 changed files with 771 additions and 52 deletions

View File

@@ -141,6 +141,53 @@ test("audit detail component uses getDetail query and renders skills overview se
);
});
test("audit detail component renders compact checked-page evidence", async () => {
const detailSource = await source("components/audits/audit-detail.tsx");
assert.match(
detailSource,
/sourceSummaries/,
"AuditDetail should read sourceSummaries from getDetail.",
);
assert.match(
detailSource,
/checkedPageEvidence/,
"AuditDetail should derive checked page evidence from sourceSummaries.checkedPages.",
);
assert.match(
detailSource,
/Geprüfte Seiten/,
"AuditDetail should render a checked-pages evidence card.",
);
assert.match(
detailSource,
/checkedPageEvidence\.map/,
"AuditDetail should render one compact row per checked page.",
);
for (const label of [
"Meta",
"Kontaktformular",
"CTA",
"Interne Links",
]) {
assert.match(
detailSource,
new RegExp(label),
`AuditDetail should expose ${label} evidence for each page.`,
);
}
assert.match(
detailSource,
/page\.screenshots\.map/,
"AuditDetail should render optional screenshot thumbnails when present.",
);
assert.match(
detailSource,
/<img[\s\S]*src=\{screenshot\.url\}/,
"AuditDetail should render screenshot URLs from the detail query.",
);
});
test("audits detail route passes id to AuditDetail via Promise params", async () => {
const pageSource = await source("app/dashboard/audits/[id]/page.tsx");