(self, project_dir)
| 2758 | engine.load_workflow("nonexistent") |
| 2759 | |
| 2760 | def test_execute_simple_workflow(self, project_dir): |
| 2761 | from unittest.mock import patch |
| 2762 | from specify_cli.workflows.engine import WorkflowEngine, WorkflowDefinition |
| 2763 | from specify_cli.workflows.base import RunStatus |
| 2764 | |
| 2765 | yaml_str = """ |
| 2766 | schema_version: "1.0" |
| 2767 | workflow: |
| 2768 | id: "simple" |
| 2769 | name: "Simple" |
| 2770 | version: "1.0.0" |
| 2771 | integration: claude |
| 2772 | inputs: |
| 2773 | name: |
| 2774 | type: string |
| 2775 | default: "test" |
| 2776 | steps: |
| 2777 | - id: step-one |
| 2778 | command: speckit.specify |
| 2779 | input: |
| 2780 | args: "{{ inputs.name }}" |
| 2781 | """ |
| 2782 | definition = WorkflowDefinition.from_string(yaml_str) |
| 2783 | engine = WorkflowEngine(project_dir) |
| 2784 | with patch("specify_cli.workflows.steps.command.shutil.which", return_value=None): |
| 2785 | state = engine.execute(definition, {"name": "login"}) |
| 2786 | |
| 2787 | assert state.status == RunStatus.FAILED |
| 2788 | assert "step-one" in state.step_results |
| 2789 | assert state.step_results["step-one"]["output"]["command"] == "speckit.specify" |
| 2790 | assert state.step_results["step-one"]["output"]["input"]["args"] == "login" |
| 2791 | |
| 2792 | def test_execute_with_gate_pauses(self, project_dir): |
| 2793 | from specify_cli.workflows.engine import WorkflowEngine, WorkflowDefinition |
nothing calls this directly
no test coverage detected