test(suite): update all tests for streaming/locking architecture and mock parity

This commit is contained in:
2026-03-02 10:15:41 -05:00
parent 5de253b15b
commit 0b5552fa01
14 changed files with 130 additions and 77 deletions

View File

@@ -34,7 +34,7 @@ def test_gui2_set_value_hook_works(live_gui: Any) -> None:
response = client.post_gui(gui_data)
assert response == {'status': 'queued'}
# Verify the value was actually set using the new get_value hook
time.sleep(0.5)
time.sleep(1.5)
current_value = client.get_value('ai_input')
assert current_value == test_value
@@ -47,11 +47,11 @@ def test_gui2_click_hook_works(live_gui: Any) -> None:
# First, set some state that 'Reset' would clear.
test_value = "This text should be cleared by the reset button."
client.set_value('ai_input', test_value)
time.sleep(0.5)
time.sleep(1.5)
assert client.get_value('ai_input') == test_value
# Now, trigger the click
client.click('btn_reset')
time.sleep(0.5)
time.sleep(1.5)
# Verify it was reset
assert client.get_value('ai_input') == ""
@@ -69,7 +69,7 @@ def test_gui2_custom_callback_hook_works(live_gui: Any) -> None:
}
response = client.post_gui(gui_data)
assert response == {'status': 'queued'}
time.sleep(1) # Give gui_2.py time to process its task queue
time.sleep(1.5) # Give gui_2.py time to process its task queue
# Assert that the file WAS created and contains the correct data
assert TEST_CALLBACK_FILE.exists(), "Custom callback was NOT executed, or file path is wrong!"
with open(TEST_CALLBACK_FILE, "r") as f: