Files
cleveragents-core/features/tui_slash_command_overlay_coverage.feature
T
freemo 8ea00f5185
CI / unit_tests (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / typecheck (push) Has been cancelled
CI / security (push) Has been cancelled
CI / quality (push) Has been cancelled
CI / integration_tests (push) Has been cancelled
CI / e2e_tests (push) Has been cancelled
CI / coverage (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
CI / build (push) Has been cancelled
CI / push-validation (push) Has been cancelled
CI / status-check (push) Has been cancelled
CI / docker (push) Has been cancelled
CI / helm (push) Has been cancelled
fix: restore CI quality tests to passing state (#4175)
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
2026-04-08 11:02:14 +00:00

60 lines
2.8 KiB
Gherkin

Feature: TUI Slash Command Overlay Coverage
Scenarios exercising uncovered lines in slash_command_overlay.py,
including the FallbackStatic init/update and the set_commands method.
Background:
Given the slash command overlay module is imported
Scenario: Instantiating SlashCommandOverlay initialises internal text
When I create a SlashCommandOverlay instance
Then the overlay internal text should be empty
Scenario: Calling update on the overlay sets internal text
Given I have a SlashCommandOverlay instance
When I call update with "hello world"
Then the overlay internal text should be "hello world"
Scenario: set_commands filters matching commands when query is provided
Given I have a SlashCommandOverlay instance
When I call set_commands with query "he" and commands "help,history,hello,quit"
Then the overlay text should contain "/he"
And the overlay text should contain " /help"
And the overlay text should contain " /hello"
And the overlay text should not contain " /history"
And the overlay text should not contain " /quit"
Scenario: set_commands returns all commands when query is empty
Given I have a SlashCommandOverlay instance
When I call set_commands with empty query and commands "help,history,quit"
Then the overlay text should contain "/"
And the overlay text should contain " /help"
And the overlay text should contain " /history"
And the overlay text should contain " /quit"
Scenario: set_commands shows no-commands message when nothing matches
Given I have a SlashCommandOverlay instance
When I call set_commands with query "zzz" and commands "help,history,quit"
Then the overlay text should contain "/zzz"
And the overlay text should contain " (no commands)"
Scenario: set_commands truncates to at most twelve command entries
Given I have a SlashCommandOverlay instance
When I call set_commands with query "" and 15 commands prefixed with "cmd"
Then the overlay text should have exactly 13 lines
And the overlay text should not contain " /cmd13"
Scenario: FallbackStatic class is returned when textual import fails
When I force the fallback static base to load
Then the fallback class should be usable as a standalone object
And calling update on the fallback instance should store the text
# @tdd_issue @tdd_issue_4294 @tdd_expected_fail @skip
@skip
Scenario: set_commands renders descriptions alongside command names
Given I have a SlashCommandOverlay instance
When I call set_commands with query "" and commands "session:create,session:list"
Then the overlay text should contain " /session:create"
And the overlay text should contain "Desc for session:create"
And the overlay text should contain " /session:list"
And the overlay text should contain "Desc for session:list"