Single-source slice workflow node dimensions

This commit is contained in:
mvschwarz committed 2026-05-07 03:46:58 -07:00
1 parent a5faf034e4
commit d330fe81e8
2 files changed
+11 -1

No files matched your search

@@ -148,7 +148,8 @@ function SliceWorkflowStepNode({ data }: NodeProps<SliceWorkflowNode>) {
data-is-current={step.isCurrent}
data-is-entry={step.isEntry}
data-is-terminal={step.isTerminal}
className={`relative h-[112px] w-[200px] border border-outline-variant bg-white/30 p-3 font-mono hard-shadow ${
style={{ width: NODE_WIDTH, height: NODE_HEIGHT }}
className={`relative border border-outline-variant bg-white/30 p-3 font-mono hard-shadow ${
step.isCurrent ? "ring-2 ring-emerald-500/50 bg-emerald-50/60" : ""
}`}
>
@@ -38,4 +38,13 @@ describe("polish-8 demo-readiness source guards", () => {
expect(graphSrc).toContain("dagre.layout");
expect(graphSrc).toContain("RegistrationMarks");
});
it("SliceWorkflowGraph single-sources rendered node dimensions with dagre layout dimensions", () => {
const graphSrc = read("../src/components/slices/tabs/SliceWorkflowGraph.tsx");
expect(graphSrc.match(/\b200\b/g) ?? []).toHaveLength(1);
expect(graphSrc.match(/\b112\b/g) ?? []).toHaveLength(1);
expect(graphSrc).toContain("style={{ width: NODE_WIDTH, height: NODE_HEIGHT }}");
expect(graphSrc).not.toContain("w-[200px]");
expect(graphSrc).not.toContain("h-[112px]");
});
});