from pathlib import Path import shutil import subprocess def test_assigned_penalty_display_with_real_runtime_functions(): node = shutil.which("node") assert node is not None, "Node.js is required for the browser regression" result = subprocess.run([node, str(Path(__file__).with_name("hotfix_penalty_visibility.cjs"))], capture_output=True, text=True, timeout=10) assert result.returncode == 0, result.stdout + result.stderr assert "PASS: prepared penalty display" in result.stdout, result.stdout + result.stderr