Files
vyndr/tests/unit/session43Mobile.test.js
builtbykev 80683e71b4 Session 43: Data pipeline + audit fixes + depth chart foundation (2045 tests)
P0 fixes + wiring real data into the S42 Player Intelligence architecture.

- P0 dropdown z-index: the nav's backdrop-filter stacking context let the
  Ticker/HeartbeatBar paint over the avatar/More dropdowns and eat clicks.
  nav now position:relative zIndex:2; menus zIndex:100. Avatar Settings ->
  /settings.
- Real MLB stats: mlbStatsAdapter.searchPlayer + getPlayerStats (name->id->
  season+gamelog). playerIntelService.resolvePlayerStats normalizes into the
  archetype classifier; getPlayerIntel returns found:true + real season +
  archetype classified from real stats. NBA via nbaStatsClient (degrades).
- Game cards: slateAdapter.groupPropsByPlayer (playerStrips, name once) +
  mapPitchers (MLB probables), folded into mapScheduleToGameCards. Legacy
  GameCard line grid renders BookChip (brand colors) not grey text.
- Grade card intel: analyzeViaEngine1.buildIntelFields computes stat-context +
  form/usage/matchup/rest from the existing feature vector (zero extra I/O);
  gradeAdapter lights up the card sections. Archetype deferred (needs season
  line at grade time).
- Depth chart foundation: depthChartService (getLineup/getDepthChart/
  getCascadeProjection) + /api/stats/lineup|depth|cascade, graceful + injectable.
- Mobile: player hero name overflow-wrap + 24px on <=640px (was clipping).

Backend 2011 -> 2045 tests (+34), 163 suites. Web build clean (exit 0).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 15:38:06 -04:00

27 lines
1.0 KiB
JavaScript

// Session 43 — Phase 6 mobile + cosmetics.
const fs = require('fs');
const path = require('path');
const WEB = path.join(__dirname, '..', '..', 'web', 'src');
const read = (rel) => fs.readFileSync(path.join(WEB, rel), 'utf8');
describe('Player profile hero name (mobile truncation fix)', () => {
const page = read('app/player/[name]/page.tsx');
const css = read('app/globals.css');
it('hero name uses overflow-safe wrapping (no clipping)', () => {
expect(page).toContain('player-hero-name');
expect(page).toContain("overflowWrap: 'anywhere'");
});
it('mobile CSS shrinks + wraps the hero name', () => {
expect(css).toMatch(/\.player-hero-name\s*\{[^}]*font-size: 24px/);
});
});
describe('No runtime font CDN (Session 41 fix still holds)', () => {
it('layout has no fonts.googleapis.com stylesheet link', () => {
const layout = read('app/layout.tsx');
expect(layout).not.toMatch(/href=["'][^"']*fonts\.googleapis\.com/);
expect(layout).toContain("from 'next/font/google'");
});
});