if-condition-unresolved-path-fails.json 1.4 KB

123456789101112131415161718192021222324252627
  1. {
  2. "name": "verify-if-condition-unresolved-path-fails",
  3. "nodes": [
  4. {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}},
  5. {"id": "n2", "name": "Params", "type": "set-fields", "position": {"x": 0, "y": 100},
  6. "config": {"mode": "keep", "fields": [{"name": "generate", "value": "{{true}}"}]}},
  7. {"id": "n3", "name": "Should Generate", "type": "if-condition", "position": {"x": 0, "y": 200},
  8. "config": {"conditions": [{"field": "data.result.generate", "operator": "is_true", "value": ""}], "combineWith": "and"}},
  9. {"id": "n4", "name": "OnTrue", "type": "code", "position": {"x": -100, "y": 300},
  10. "config": {"code": "return { marker: 'should not run' };"}},
  11. {"id": "n5", "name": "OnFalse", "type": "code", "position": {"x": 100, "y": 300},
  12. "config": {"code": "return { marker: 'should not run' };"}}
  13. ],
  14. "connections": [
  15. {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "n2", "targetInput": "data"},
  16. {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n3", "targetInput": "data"},
  17. {"sourceNodeId": "n3", "sourceOutput": "true", "targetNodeId": "n4", "targetInput": "data"},
  18. {"sourceNodeId": "n3", "sourceOutput": "false", "targetNodeId": "n5", "targetInput": "data"}
  19. ],
  20. "expect": {
  21. "n3": {
  22. "status": "failed",
  23. "errorContains": "nothing found at \"data.result.generate\""
  24. }
  25. },
  26. "expectMissing": ["n4", "n5"]
  27. }