strat-gameplay-webapp/backend/tests/unit
Cal Corum cf7cc23f45 CLAUDE: Fix runner_advancement for new GameState structure
Updated runner_advancement.py and its tests to use the new GameState
structure where current_batter is a LineupPlayerState object instead of
an integer ID.

Changes:
- runner_advancement.py: Replaced all 17 references to
  state.current_batter_lineup_id with state.current_batter.lineup_id

- tests/unit/core/test_runner_advancement.py: Updated test fixtures
  - Mock fixture: Added mock_batter object with lineup_id attribute
  - GameState constructor calls: Create LineupPlayerState objects instead
    of using current_batter_lineup_id parameter (9 tests fixed)

All 34 runner advancement tests now passing. This fixes the AttributeError
that was preventing X-Check resolution from completing in the terminal
client ("'GameState' object has no attribute 'current_batter_lineup_id'").

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 16:03:46 -06:00
..
config CLAUDE: Complete Phase 3B - Add all 6 infield error charts 2025-11-02 14:33:59 -06:00
core CLAUDE: Fix runner_advancement for new GameState structure 2025-11-04 16:03:46 -06:00
models CLAUDE: Phase 3E-Prep - Refactor GameState to use full LineupPlayerState objects 2025-11-03 14:11:40 -06:00
terminal_client CLAUDE: Update REPL for new GameState and standardize UV commands 2025-11-04 09:59:13 -06:00
websocket CLAUDE: Update tests to match Phase 2 model changes 2025-10-31 16:11:39 -05:00
__init__.py CLAUDE: Complete Week 4 - State Management & Persistence 2025-10-22 12:01:03 -05:00