| 123456789101112131415161718192021222324252627282930 |
- {
- "name": "verify-single-node-target-loop-iteration",
- "nodes": [
- {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}},
- {"id": "items", "name": "Items", "type": "code", "position": {"x": 0, "y": 100},
- "config": {"code": "return { items: ['a', 'b', 'c'] };"}},
- {"id": "loop", "name": "Loop", "type": "loop", "position": {"x": 0, "y": 200},
- "config": {"inputField": "data.result.items"}},
- {"id": "work", "name": "Work", "type": "set-fields", "position": {"x": 0, "y": 300},
- "config": {"mode": "only-set", "fields": [{"name": "seen", "value": "{{loop.item}}"}]}}
- ],
- "connections": [
- {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "items", "targetInput": "data"},
- {"sourceNodeId": "items", "sourceOutput": "main", "targetNodeId": "loop", "targetInput": "data"},
- {"sourceNodeId": "loop", "sourceOutput": "loop", "targetNodeId": "work", "targetInput": "data"},
- {"sourceNodeId": "work", "sourceOutput": "main", "targetNodeId": "loop", "targetInput": "data"}
- ],
- "trigger": {"_targetNodeId": "work", "_targetLoopIteration": 2},
- "expect": {
- "work": {"status": "completed", "output": {"seen": "c"}, "loopIteration": 0}
- },
- "expectCounts": {
- "work": 1
- },
- "expectExecution": {
- "status": "completed",
- "singleNodeTarget": "work",
- "singleNodeIteration": 2
- }
- }
|