datetime.json 2.3 KB

123456789101112131415161718192021222324252627282930313233
  1. {
  2. "name": "verify-datetime",
  3. "nodes": [
  4. {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}},
  5. {"id": "n2", "name": "Fixture", "type": "code", "position": {"x": 0, "y": 100},
  6. "config": {"code": "return { when: '2026-01-15T10:30:00Z', later: '2026-01-20T10:30:00Z' };"}},
  7. {"id": "n3", "name": "FormatUTC", "type": "datetime", "position": {"x": -150, "y": 200},
  8. "config": {"operation": "format", "inputField": "data.result.when", "format": "YYYY-MM-DD HH:mm:ss", "outputField": "value"}},
  9. {"id": "n4", "name": "FormatOffset", "type": "datetime", "position": {"x": -50, "y": 200},
  10. "config": {"operation": "format", "inputField": "data.result.when", "format": "YYYY-MM-DD HH:mm:ss", "offset": "+02:00", "outputField": "value"}},
  11. {"id": "n5", "name": "AddDays", "type": "datetime", "position": {"x": 50, "y": 200},
  12. "config": {"operation": "add", "inputField": "data.result.when", "amount": 3, "unit": "days", "format": "YYYY-MM-DD", "outputField": "value"}},
  13. {"id": "n6", "name": "Diff", "type": "datetime", "position": {"x": 150, "y": 200},
  14. "config": {"operation": "diff", "inputField": "data.result.later", "secondField": "data.result.when", "unit": "days", "outputField": "value"}},
  15. {"id": "n7", "name": "Now", "type": "datetime", "position": {"x": 250, "y": 200},
  16. "config": {"operation": "now"}}
  17. ],
  18. "connections": [
  19. {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "n2", "targetInput": "data"},
  20. {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n3", "targetInput": "data"},
  21. {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n4", "targetInput": "data"},
  22. {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n5", "targetInput": "data"},
  23. {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n6", "targetInput": "data"},
  24. {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n7", "targetInput": "data"}
  25. ],
  26. "expect": {
  27. "n3": {"status": "completed", "output": {"value": "2026-01-15 10:30:00"}},
  28. "n4": {"status": "completed", "output": {"value": "2026-01-15 12:30:00"}},
  29. "n5": {"status": "completed", "output": {"value": "2026-01-18"}},
  30. "n6": {"status": "completed", "output": {"value": 5}},
  31. "n7": {"status": "completed"}
  32. }
  33. }