Files
manual_slop/tests/test_sim_base.py
Ed_ d1ce0eaaeb feat(gui): implement Phases 2-5 of Comprehensive GUI UX track
- Add cost tracking with new cost_tracker.py module
- Enhance Track Proposal modal with editable titles and goals
- Add Conductor Setup summary and New Track creation form to MMA Dashboard
- Implement Task DAG editing (add/delete tickets) and track-scoped discussion
- Add visual polish: color-coded statuses, tinted progress bars, and node indicators
- Support live worker streaming from AI providers to GUI panels
- Fix numerous integration test regressions and stabilize headless service
2026-03-01 20:17:31 -05:00

32 lines
1.1 KiB
Python

import pytest
from unittest.mock import MagicMock, patch
import os
import sys
# Ensure project root is in path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from simulation.sim_base import BaseSimulation
def test_base_simulation_init() -> None:
with patch('simulation.sim_base.ApiHookClient') as mock_client_class:
mock_client = MagicMock()
mock_client_class.return_value = mock_client
sim = BaseSimulation()
assert sim.client == mock_client
assert sim.sim is not None
def test_base_simulation_setup() -> None:
mock_client = MagicMock()
mock_client.wait_for_server.return_value = True
with patch('simulation.sim_base.WorkflowSimulator') as mock_sim_class:
mock_sim = MagicMock()
mock_sim_class.return_value = mock_sim
sim = BaseSimulation(mock_client)
sim.setup("TestSim")
mock_client.wait_for_server.assert_called()
mock_client.click.assert_any_call("btn_reset")
mock_sim.setup_new_project.assert_called()
from pathlib import Path
assert Path(sim.project_path).as_posix().endswith("tests/artifacts/temp_testsim.toml")