Folder support, Custom theme support, Boiler Plate Code support
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import asyncio
|
||||
from src.tui.app import TactiTermTUI
|
||||
|
||||
async def test_command_palette_integration():
|
||||
app = TactiTermTUI()
|
||||
async with app.run_test() as pilot:
|
||||
print("Available themes count registered with Textual App:", len(app.available_themes))
|
||||
sample_themes = list(app.available_themes.keys())[:15]
|
||||
print("Sample registered themes in App:", sample_themes)
|
||||
|
||||
# Test system commands
|
||||
commands = list(app.get_system_commands(app.screen))
|
||||
cmd_titles = [c.title for c in commands]
|
||||
print("System commands in Command Palette:", cmd_titles)
|
||||
|
||||
assert "Keys" in cmd_titles, "Keys option missing from Command Palette"
|
||||
assert "Themes" in cmd_titles, "Themes option missing from Command Palette"
|
||||
|
||||
# Test applying a theme from registered themes
|
||||
app.apply_theme("dracula")
|
||||
await pilot.pause(0.1)
|
||||
print("Main box classes after applying Dracula:", app.query_one("#main-container").classes)
|
||||
assert app.query_one("#main-container").has_class("theme-dracula")
|
||||
print("Command Palette Theme Integration test PASSED!")
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(test_command_palette_integration())
|
||||
Reference in New Issue
Block a user