fix(tui): set default THEME to dracula on TUI app class #10917
@@ -510,3 +510,13 @@ def step_alias_check(context):
|
||||
assert (
|
||||
context._tui_app_mod.CleverAgentsTuiApp.__name__ == "_TextualCleverAgentsTuiApp"
|
||||
)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# THEME class variable (issue #4742)
|
||||
# ---------------------------------------------------------------------------
|
||||
@then('the app class should have THEME set to "{theme}"')
|
||||
def step_theme_class_var(context, theme: str) -> None:
|
||||
assert theme == context._tui_app.THEME, (
|
||||
f"Expected THEME='{theme}', got '{context._tui_app.THEME}'"
|
||||
)
|
||||
|
||||
@@ -196,3 +196,11 @@ Feature: TUI App Coverage
|
||||
And I call on_mount on the app
|
||||
And I submit "!true" to the app
|
||||
Then the conversation widget should contain "(empty output)"
|
||||
|
||||
# --- THEME class variable (issue #4742) ---
|
||||
|
||||
@tdd_issue @tdd_issue_4742
|
||||
Scenario: The Textual TUI app has THEME set to dracula by default
|
||||
Given a mock command router and persona state
|
||||
When I instantiate the Textual TUI app
|
||||
Then the app class should have THEME set to "dracula"
|
||||
|
||||
@@ -89,6 +89,7 @@ if _TEXTUAL_AVAILABLE:
|
||||
"""Main TUI app."""
|
||||
|
||||
CSS_PATH: ClassVar[str] = "cleveragents.tcss"
|
||||
THEME: ClassVar[str] = "dracula"
|
||||
BINDINGS: ClassVar[list[tuple[str, str, str]]] = [
|
||||
("ctrl+q", "quit", "Quit"),
|
||||
("f1", "help", "Help"),
|
||||
|
||||
Reference in New Issue
Block a user