Fix MVP audit evidence pipeline
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user