Files
cleveragents-core/features/langgraph_dynamic_router_coverage.feature

35 lines
1.2 KiB
Gherkin

Feature: Dynamic Router Coverage
Behave scenarios that exercise dynamic routing branches and fallback logic.
Scenario: Default route when no rules are provided
Given a dynamic router with no rules
When I route the message
"""
{"text": "hello"}
"""
Then the router should return the default end edge
Scenario: Route to target when no condition is required
Given a dynamic router with a rule targeting "next" and no condition
When I route the message
"""
{"text": "any"}
"""
Then the router should return a single edge to "next"
Scenario: Route to target when condition matches
Given a dynamic router with a rule targeting "match_target" when message type is "match"
When I route the message
"""
{"type": "match", "text": "payload"}
"""
Then the router should return a single edge to "match_target"
Scenario: Fall back to end when condition fails
Given a dynamic router with a rule targeting "conditional" when message type is "expected"
When I route the message
"""
{"type": "other", "text": "payload"}
"""
Then the router should return the default end edge