Merging dev into main #49

Merged
8464960 merged 260 commits from dev into main 2026-01-28 10:48:52 +00:00
Showing only changes of commit 42357217e5 - Show all commits

View File

@@ -20,6 +20,7 @@ describe('FlowStore Functionality', () => {
describe('ReactFlow onConnect', () => {
test('adds an edge when onConnect is triggered', () => {
const {onConnect} = useFlowStore.getState();
act(() => {
onConnect({
source: 'A',
@@ -38,6 +39,34 @@ describe('FlowStore Functionality', () => {
});
});
describe('ReactFlow onReconnect', () => {
test('reconnects an existing edge when onReconnect is triggered', () => {
const {onReconnect} = useFlowStore.getState();
const oldEdge = {
id: 'xy-edge__A-B',
source: 'A',
target: 'B'
};
const newConnection = {
source: 'A',
target: 'C',
sourceHandle: null,
targetHandle: null,
};
act(() => {
useFlowStore.setState({
edges: [oldEdge]
});
onReconnect(oldEdge, newConnection);
});
const updatedEdges = useFlowStore.getState().edges;
expect(updatedEdges).toHaveLength(1);
expect(updatedEdges[0]).toMatchObject({
id: 'xy-edge__A-C',
source: 'A',
target: 'C',
});
});
});
describe('ReactFlow onReconnectStart', () => {
});