26 lines
1.2 KiB
JavaScript
26 lines
1.2 KiB
JavaScript
import { readFileSync } from "node:fs";
|
|
|
|
const page = readFileSync(new URL("../src/features/dataflow/DataflowPage.tsx", import.meta.url), "utf8");
|
|
const canvas = readFileSync(new URL("../src/features/dataflow/DataflowCanvas.tsx", import.meta.url), "utf8");
|
|
const css = readFileSync(new URL("../src/styles/dataflow.css", import.meta.url), "utf8");
|
|
|
|
const checks = [
|
|
[page.includes("<DataflowCanvas"), "graph canvas"],
|
|
[page.includes("Apply SQL"), "SQL workbench"],
|
|
[page.includes("<NodeInspector"), "node inspector"],
|
|
[page.includes("previewDataflowPipeline"), "preview action"],
|
|
[page.includes("useUnsavedDraftGuard"), "unsaved-change guard"],
|
|
[canvas.includes("application/x-govoplan-dataflow-node"), "palette drop handling"],
|
|
[canvas.includes("isValidConnection"), "edge validation"],
|
|
[canvas.includes("connectionRadius={32}"), "visible connection drop radius"],
|
|
[css.includes("height: calc(100vh - 115px)"), "full-height workspace"],
|
|
[css.includes(".dataflow-preview-table-wrap"), "bounded preview scrolling"]
|
|
];
|
|
|
|
const missing = checks.filter(([present]) => !present).map(([, label]) => label);
|
|
if (missing.length) {
|
|
throw new Error(`Dataflow UI structure is missing: ${missing.join(", ")}`);
|
|
}
|
|
|
|
console.log("Dataflow page structure checks passed.");
|