from tests.timer_contract_support import run_timer_contract, assert_current_build_contract from pathlib import Path ROOT = Path(__file__).resolve().parents[1] APP_JS = (ROOT / "ui_builder/static/app.js").read_text(encoding="utf-8") APP = (ROOT / "app.py").read_text(encoding="utf-8") def _block(start: str, end: str) -> str: return APP_JS.split(start, 1)[1].split(end, 1)[0] def test_timer_transport_is_independent_from_generic_vmix_queue(): """Current native timer contract, executed against production functions.""" run_timer_contract('web_first') def test_timer_start_stop_protocol_is_minimal(): """Current native timer contract, executed against production functions.""" run_timer_contract('first_start') run_timer_contract('pause_freezes') def test_combined_hockey_timer_shortcut_never_waits_for_agent(): """Current native timer contract, executed against production functions.""" run_timer_contract('web_first') def test_main_and_penalty_resync_do_not_use_generic_queue(): """Current native timer contract, executed against production functions.""" run_timer_contract('native_events') run_timer_contract('penalty_pause') def test_busy_shortcut_can_toggle_timer_without_waiting_for_title_ack(): """Current native timer contract, executed against production functions.""" run_timer_contract('busy_timer') def test_build101_runtime_version(): assert_current_build_contract()