21 lines
723 B
Python
21 lines
723 B
Python
import asyncio
|
|
from src.tui.app import TactiTermTUI
|
|
from textual.widgets import OptionList
|
|
|
|
async def test_theme_popup():
|
|
app = TactiTermTUI()
|
|
async with app.run_test() as pilot:
|
|
print("Call action_cycle_theme()...")
|
|
app.action_cycle_theme()
|
|
await pilot.pause(0.2)
|
|
|
|
main_box = app.query_one("#main-container")
|
|
print("Is show-theme-menu in classes:", main_box.has_class("show-theme-menu"))
|
|
|
|
theme_list = app.query_one("#theme_list_popup", OptionList)
|
|
print("Theme list option count:", theme_list.option_count)
|
|
print("Focused widget ID:", getattr(app.focused, "id", None))
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(test_theme_popup())
|