chat UI
This commit is contained in:
@@ -52,6 +52,40 @@ def test_dashboard_chat_uses_streaming_fetch():
|
||||
assert 'console.error("chat stream failed", err)' in html
|
||||
|
||||
|
||||
def test_dashboard_chat_model_selector_shows_health_and_speed():
|
||||
tracker = TrackerServer()
|
||||
port = tracker.start()
|
||||
try:
|
||||
html = urllib.request.urlopen(
|
||||
f"http://127.0.0.1:{port}/dashboard"
|
||||
).read().decode()
|
||||
finally:
|
||||
tracker.stop()
|
||||
|
||||
assert "chatModelHealthLabel" in html
|
||||
assert "chatModelTypicalTps" in html
|
||||
assert "chatModelOptionLabel" in html
|
||||
assert "findRoutingForModel" in html
|
||||
assert "tok/s" in html
|
||||
|
||||
|
||||
def test_dashboard_chat_sessions_use_delegated_handlers():
|
||||
tracker = TrackerServer()
|
||||
port = tracker.start()
|
||||
try:
|
||||
html = urllib.request.urlopen(
|
||||
f"http://127.0.0.1:{port}/dashboard"
|
||||
).read().decode()
|
||||
finally:
|
||||
tracker.stop()
|
||||
|
||||
assert "bindChatSessionList" in html
|
||||
assert "data-session-id=" in html
|
||||
assert "data-delete-session=" in html
|
||||
assert 'onclick="selectChatSession(' not in html
|
||||
assert 'onclick="deleteChatSession(' not in html
|
||||
|
||||
|
||||
def test_dashboard_served_by_follower():
|
||||
"""A tracker that is not the leader (unreachable peers → never elected)
|
||||
still serves the dashboard from its own replicated state."""
|
||||
|
||||
Reference in New Issue
Block a user