Improve audit pipeline and outreach review
This commit is contained in:
38
tests/audits-board-layout.test.ts
Normal file
38
tests/audits-board-layout.test.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import test from "node:test";
|
||||
|
||||
const auditsBoardPath = join(
|
||||
process.cwd(),
|
||||
"components",
|
||||
"audits",
|
||||
"audits-board.tsx",
|
||||
);
|
||||
|
||||
test("AuditsBoard renders dashboard rows as responsive cards", async () => {
|
||||
const source = await readFile(auditsBoardPath, "utf8");
|
||||
|
||||
assert.doesNotMatch(source, /min-w-\[/i);
|
||||
assert.doesNotMatch(source, /overflow-x-auto/i);
|
||||
assert.doesNotMatch(source, /grid-cols-\[minmax/i);
|
||||
|
||||
assert.match(source, /Card/);
|
||||
assert.match(source, /CardHeader/);
|
||||
assert.match(source, /CardTitle/);
|
||||
assert.match(source, /CardContent/);
|
||||
assert.match(source, /className="grid gap-3 sm:grid-cols-2 xl:grid-cols-3"/);
|
||||
assert.match(source, /aria-labelledby=\{rowTitleId\}/);
|
||||
assert.match(source, /id=\{rowTitleId\}/);
|
||||
});
|
||||
|
||||
test("AuditsBoard keeps audit detail links and non-clickable pipeline cards", async () => {
|
||||
const source = await readFile(auditsBoardPath, "utf8");
|
||||
|
||||
assert.match(source, /row\.kind === "audit"/);
|
||||
assert.match(source, /href=\{row\.detailHref\}/);
|
||||
assert.match(source, /Öffnen/);
|
||||
assert.match(source, /Pipeline läuft/);
|
||||
assert.match(source, /getGenerationStatusLabel\(row\)/);
|
||||
assert.match(source, /row\.errorSummary/);
|
||||
});
|
||||
Reference in New Issue
Block a user