"""Removing the manual shot button must also ignore its old saved state.""" import os from pathlib import Path import shutil import subprocess import pytest ROOT = Path(__file__).resolve().parents[1] CASES = ("dock_has_no_manual_shot", "old_flag_cannot_block_sql_home", "old_flag_cannot_block_sql_away", "old_pending_flag_cannot_block_manual", "explicit_goal_type_preserves_penalty_shot_rule") @pytest.mark.parametrize("case", CASES) def test_shb_removal(case): node = shutil.which("node") assert node, "Node is required" result = subprocess.run([node, str(ROOT / "tests/build201_shb_removal.cjs"), case, os.environ.get("BUILD201_RUNTIME_ROOT", str(ROOT))], text=True, capture_output=True, timeout=20) assert result.returncode == 0, result.stdout + result.stderr assert "PASS BUILD201 SHB: " + case in result.stdout, result.stdout + result.stderr