(self)
| 1764 | assert result.next_steps[0]["id"] == "fallback" |
| 1765 | |
| 1766 | def test_execute_no_default_no_match(self): |
| 1767 | from specify_cli.workflows.steps.switch import SwitchStep |
| 1768 | from specify_cli.workflows.base import StepContext |
| 1769 | |
| 1770 | step = SwitchStep() |
| 1771 | ctx = StepContext( |
| 1772 | steps={"review": {"output": {"choice": "other"}}} |
| 1773 | ) |
| 1774 | config = { |
| 1775 | "id": "route", |
| 1776 | "expression": "{{ steps.review.output.choice }}", |
| 1777 | "cases": { |
| 1778 | "approve": [{"id": "plan", "command": "speckit.plan"}], |
| 1779 | }, |
| 1780 | } |
| 1781 | result = step.execute(config, ctx) |
| 1782 | assert result.output["matched_case"] == "__default__" |
| 1783 | assert result.next_steps == [] |
| 1784 | |
| 1785 | def test_validate_missing_expression(self): |
| 1786 | from specify_cli.workflows.steps.switch import SwitchStep |
nothing calls this directly
no test coverage detected