set-fields-errors-string.json 854 B

12345678910111213141516171819202122
  1. {
  2. "name": "verify-set-fields-errors-string",
  3. "nodes": [
  4. {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}},
  5. {"id": "n2", "name": "StringFixture", "type": "code", "position": {"x": 0, "y": 100},
  6. "config": {"code": "return 'just a string';"}},
  7. {"id": "n3", "name": "SetOnString", "type": "set-fields", "position": {"x": 0, "y": 200},
  8. "config": {
  9. "mode": "keep-all",
  10. "fields": [
  11. {"name": "label", "value": "hello"}
  12. ]
  13. }}
  14. ],
  15. "connections": [
  16. {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "n2", "targetInput": "data"},
  17. {"sourceNodeId": "n2", "sourceOutput": "result", "targetNodeId": "n3", "targetInput": "data"}
  18. ],
  19. "expect": {
  20. "n3": {"status": "failed", "errorContains": "keep-all needs an object input"}
  21. }
  22. }