feat(ui): Expose cache status and controls in UI

This commit is contained in:
2026-05-04 05:18:04 -04:00
parent 186e99a616
commit 6bf6c79db4
3 changed files with 50 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
import pytest
import time
import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
from src import api_hook_client
@pytest.mark.integration
@pytest.mark.timeout(300)
def test_ui_cache_controls(live_gui) -> None:
client = api_hook_client.ApiHookClient()
assert client.wait_for_server(timeout=15), "Hook server did not start"
# Simply click the new clear cache button
client.click('btn_clear_summary_cache')
time.sleep(1.0)
# Ensure GUI is still responsive
res = client.get_status()
assert res.get('status') == 'ok', "GUI crashed during cache clear"
print("[SIM] Cache controls UI test PASSED.")