forked from HAL9000/cleveragents-core
dc1359fc07
Add a specification-aligned slash command catalog and wire it into TUI overlay initialization so command discovery reflects the complete command surface. Cover command and group cardinality plus representative command presence in Behave tests. ISSUES CLOSED: #1002
29 lines
973 B
Python
29 lines
973 B
Python
"""Step definitions for TUI slash command catalog coverage."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from behave import given, then
|
|
|
|
|
|
@given("the TUI slash command catalog module is loaded")
|
|
def step_catalog_loaded(context):
|
|
from cleveragents.tui.slash_catalog import slash_command_groups, slash_command_names
|
|
|
|
context._slash_command_names = slash_command_names()
|
|
context._slash_command_groups = slash_command_groups()
|
|
|
|
|
|
@then("the slash command catalog should contain at least {minimum:d} commands")
|
|
def step_catalog_command_count(context, minimum):
|
|
assert len(context._slash_command_names) >= minimum
|
|
|
|
|
|
@then("the slash command catalog should contain exactly {expected:d} groups")
|
|
def step_catalog_group_count(context, expected):
|
|
assert len(context._slash_command_groups) == expected
|
|
|
|
|
|
@then('the slash command catalog should include "{command}"')
|
|
def step_catalog_contains_command(context, command):
|
|
assert command in context._slash_command_names
|