refactor(phase5): Comprehensive stabilisation pass. De-duplicated App/Controller state, hardened session reset, and updated integration tests with deterministic polling.
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
import pytest
|
||||
from src import ai_client
|
||||
from src.api_hook_client import ApiHookClient
|
||||
import time
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Ensure project root is in path for imports
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||
|
||||
from src.api_hook_client import ApiHookClient
|
||||
from src import ai_client
|
||||
|
||||
def test_system_prompt_sim(live_gui):
|
||||
"""
|
||||
@@ -22,6 +17,8 @@ def test_system_prompt_sim(live_gui):
|
||||
"""
|
||||
_, gui_script = live_gui
|
||||
client = ApiHookClient()
|
||||
client.click("btn_reset")
|
||||
time.sleep(2)
|
||||
|
||||
# 1. Use client.wait_for_server().
|
||||
assert client.wait_for_server(timeout=15), "Server failed to start in time"
|
||||
@@ -71,4 +68,4 @@ def test_system_prompt_sim(live_gui):
|
||||
|
||||
# Close it
|
||||
client.set_value('show_base_prompt_diff_modal', False)
|
||||
assert client.get_value('show_base_prompt_diff_modal') is False
|
||||
assert client.get_value('show_base_prompt_diff_modal') is False
|
||||
|
||||
Reference in New Issue
Block a user