Surface audit generations on dashboard audits
This commit is contained in:
@@ -30,7 +30,7 @@ test("audits dashboard page uses a dedicated board component", async () => {
|
||||
);
|
||||
});
|
||||
|
||||
test("audits board renders compact list with convex list query and core columns", async () => {
|
||||
test("audits board renders compact list with dashboard rows query and core columns", async () => {
|
||||
const boardSource = await source("components/audits/audits-board.tsx");
|
||||
|
||||
assert.match(
|
||||
@@ -40,13 +40,13 @@ test("audits board renders compact list with convex list query and core columns"
|
||||
);
|
||||
assert.match(
|
||||
boardSource,
|
||||
/useQuery\s*\(\s*api\.audits\.list,\s*\{\s*limit:\s*100\s*\}\s*\)/,
|
||||
"AuditsBoard should call api.audits.list with { limit: 100 }.",
|
||||
/useQuery\s*\(\s*api\.audits\.listDashboardRows,\s*\{\s*limit:\s*100\s*\}\s*\)/,
|
||||
"AuditsBoard should call api.audits.listDashboardRows with { limit: 100 }.",
|
||||
);
|
||||
assert.match(
|
||||
boardSource,
|
||||
/sort\(\(\s*a,\s*b\s*\)\s*=>\s*b\.createdAt\s*-\s*a\.createdAt\)/,
|
||||
"Audits should be sorted newest first.",
|
||||
/sort\(\(\s*a,\s*b\s*\)\s*=>\s*b\.updatedAt\s*-\s*a\.updatedAt\)/,
|
||||
"Dashboard rows should be sorted newest first.",
|
||||
);
|
||||
assert.match(boardSource, /Loading|lädt|Lade/i);
|
||||
assert.match(boardSource, /Keine Audits|keine Audits/i);
|
||||
@@ -54,10 +54,20 @@ test("audits board renders compact list with convex list query and core columns"
|
||||
assert.match(boardSource, /Domain/);
|
||||
assert.match(boardSource, /Status/);
|
||||
assert.match(boardSource, /Seiten/);
|
||||
assert.match(boardSource, /Generierung läuft|Generierung laeuft/);
|
||||
assert.match(boardSource, /Fehlgeschlagen/);
|
||||
assert.match(boardSource, /Wartet auf finales Audit/);
|
||||
assert.match(boardSource, /Wartet auf Start/);
|
||||
assert.match(boardSource, /Abgebrochen/);
|
||||
assert.match(
|
||||
boardSource,
|
||||
/href=\{`\/dashboard\/audits\/\$\{audit\._id\}`\}/,
|
||||
"Each audit row should link to /dashboard/audits/{id}.",
|
||||
/href=\{row\.detailHref\}/,
|
||||
"Final audit rows should link through their detailHref.",
|
||||
);
|
||||
assert.match(
|
||||
boardSource,
|
||||
/row\.kind\s*===\s*"audit"/,
|
||||
"Board should branch between final audit rows and generation rows.",
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user