Refactor pipeline task handling and UI flows
This commit is contained in:
@@ -122,3 +122,24 @@ test("audits dashboard query suppresses generation rows once a final audit exist
|
||||
"Generation rows should surface run or stage errors.",
|
||||
);
|
||||
});
|
||||
|
||||
test("audits dashboard query hides child generation rows behind root audit runs", async () => {
|
||||
const auditsSource = await source("convex/audits.ts");
|
||||
const querySource = extractExportSource(auditsSource, "listDashboardRows");
|
||||
|
||||
assert.match(
|
||||
querySource,
|
||||
/rootAuditRunLeadIds/,
|
||||
"Query should track lead ids that already have root audit runs.",
|
||||
);
|
||||
assert.match(
|
||||
querySource,
|
||||
/run\.type\s*===\s*"audit_generation"[\s\S]*rootAuditRunLeadIds\.has\(run\.leadId\)/,
|
||||
"Child audit_generation rows should be skipped when a root audit run for the same lead is already visible.",
|
||||
);
|
||||
assert.match(
|
||||
querySource,
|
||||
/continue/,
|
||||
"Child generation rows should be skipped instead of rendered as a duplicate card.",
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user