form-trigger-shape.json 773 B

12345678910111213141516
  1. {
  2. "name": "verify-form-trigger-shape",
  3. "nodes": [
  4. {"id": "n1", "name": "Form", "type": "form-trigger", "position": {"x": 0, "y": 0},
  5. "config": {"title": "Send an image",
  6. "fields": [{"name": "image", "label": "Image", "type": "file", "required": true}]}},
  7. {"id": "n2", "name": "Check", "type": "code", "position": {"x": 0, "y": 100},
  8. "config": {"code": "return { hasForm: typeof input.data.form === 'object' && input.data.form !== null, submitted: typeof input.data.submittedAt === 'number' };"}}
  9. ],
  10. "connections": [
  11. {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "n2", "targetInput": "data"}
  12. ],
  13. "expect": {
  14. "n2": {"status": "completed", "output": {"result": {"hasForm": true, "submitted": true}}}
  15. }
  16. }