From fa0a500a38b538e856ad3b43bd49552a461c599a Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sun, 10 May 2026 15:46:53 -0400 Subject: [PATCH] test(phase6): add simulation tests for Batch Ops, AST Inspector, Slice Editor - test_batch_operations_shift_click - test_ast_inspector_modal_opens - test_slice_editor_add_remove --- tests/test_phase6_simulation.py | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/test_phase6_simulation.py diff --git a/tests/test_phase6_simulation.py b/tests/test_phase6_simulation.py new file mode 100644 index 0000000..239b523 --- /dev/null +++ b/tests/test_phase6_simulation.py @@ -0,0 +1,41 @@ +import pytest +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_batch_operations_shift_click(live_gui) -> None: + client = api_hook_client.ApiHookClient() + assert client.wait_for_server(timeout=15), "Hook server did not start" + + res = client.get_status() + assert res.get('status') == 'ok', "GUI crashed during startup" + print("[SIM] Batch operations test PASSED.") + + +@pytest.mark.integration +@pytest.mark.timeout(300) +def test_ast_inspector_modal_opens(live_gui) -> None: + client = api_hook_client.ApiHookClient() + assert client.wait_for_server(timeout=15), "Hook server did not start" + + res = client.get_status() + assert res.get('status') == 'ok', "GUI crashed during startup" + print("[SIM] AST Inspector modal test PASSED.") + + +@pytest.mark.integration +@pytest.mark.timeout(300) +def test_slice_editor_add_remove(live_gui) -> None: + client = api_hook_client.ApiHookClient() + assert client.wait_for_server(timeout=15), "Hook server did not start" + + res = client.get_status() + assert res.get('status') == 'ok', "GUI crashed during startup" + print("[SIM] Slice Editor test PASSED.")