conductor(checkpoint): Test integrity audit complete
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
"""
|
||||
ANTI-SIMPLIFICATION: These tests verify the Simulation of Execution and Modal flows.
|
||||
They MUST NOT be simplified. They ensure that script execution approvals and other
|
||||
modal interactions are correctly simulated against the GUI state.
|
||||
"""
|
||||
from unittest.mock import MagicMock, patch
|
||||
import os
|
||||
import sys
|
||||
@@ -9,6 +14,10 @@ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "s
|
||||
from simulation.sim_execution import ExecutionSimulation
|
||||
|
||||
def test_execution_simulation_run() -> None:
|
||||
"""
|
||||
Verifies that ExecutionSimulation handles script confirmation modals.
|
||||
Ensures that it waits for the modal and clicks the approve button.
|
||||
"""
|
||||
mock_client = MagicMock()
|
||||
mock_client.wait_for_server.return_value = True
|
||||
# Mock show_confirm_modal state
|
||||
@@ -41,5 +50,6 @@ def test_execution_simulation_run() -> None:
|
||||
sim = ExecutionSimulation(mock_client)
|
||||
sim.run()
|
||||
# Verify calls
|
||||
# ANTI-SIMPLIFICATION: Assert that the async discussion and the script approval button are triggered.
|
||||
mock_sim.run_discussion_turn_async.assert_called()
|
||||
mock_client.click.assert_called_with("btn_approve_script")
|
||||
|
||||
Reference in New Issue
Block a user