mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-30 03:00:41 -04:00
fix(frontend): update stale assertion in applyConnectNodes duplicate-edge test
After the double-call fix removed the direct setAppliedActionKeys call from the alreadyExists branch, the test still expected it to be called once. Updated to .not.toHaveBeenCalled() since the caller (handleApplyAction) now handles marking applied keys.
This commit is contained in:
@@ -579,9 +579,9 @@ describe("applyConnectNodes", () => {
|
||||
deps,
|
||||
);
|
||||
expect(result).toBe(true);
|
||||
// No new edge written; applied key still marked.
|
||||
// No new edge written; caller (handleApplyAction) marks the key.
|
||||
expect(mockSetEdges).not.toHaveBeenCalled();
|
||||
expect(deps.setAppliedActionKeys).toHaveBeenCalledTimes(1);
|
||||
expect(deps.setAppliedActionKeys).not.toHaveBeenCalled();
|
||||
// No undo entry for a no-op.
|
||||
expect(deps.setUndoStack).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user