Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(graph-adapter): update adapter tests

Steven Enamakelc56f1a8cbb2d
diff --git a/app/src/lib/flows/graphAdapter.test.ts b/app/src/lib/flows/graphAdapter.test.ts
index a6d4588672..078b3ba9f1 100644
--- a/app/src/lib/flows/graphAdapter.test.ts
+++ b/app/src/lib/flows/graphAdapter.test.ts
@@ -92,7 +92,7 @@ describe('graphAdapter', () => {
const { nodes } = workflowGraphToXyflow(g);
const byId = Object.fromEntries(nodes.map(n => [n.id, n.position]));
expect(byId.t).toEqual({ x: 0, y: 0 });
- expect(byId.a).toEqual({ x: 0, y: 160 });
+ expect(byId.a).toEqual({ x: 0, y: 132 });
});
it('derives effective input/output ports for a switch node from its edges, not just declared ports', () => {
@@ -346,8 +346,8 @@ describe('graphAdapter', () => {
];
const positions = autoLayout(nodes, edges);
expect(positions.get('t')).toEqual({ x: 0, y: 0 });
- expect(positions.get('a')).toEqual({ x: 0, y: 160 });
- expect(positions.get('b')).toEqual({ x: 0, y: 320 });
+ expect(positions.get('a')).toEqual({ x: 0, y: 132 });
+ expect(positions.get('b')).toEqual({ x: 0, y: 264 });
});
it('places parallel branches at the same depth in separate columns', () => {
@@ -358,8 +358,8 @@ describe('graphAdapter', () => {
];
const positions = autoLayout(nodes, edges);
expect(positions.get('t')).toEqual({ x: 0, y: 0 });
- expect(positions.get('a')).toEqual({ x: 0, y: 160 });
- expect(positions.get('b')).toEqual({ x: 280, y: 160 });
+ expect(positions.get('a')).toEqual({ x: 0, y: 132 });
+ expect(positions.get('b')).toEqual({ x: 240, y: 132 });
});
it('gives every node a position, even a fully disconnected graph', () => {