Commit Graph

3 Commits

Author SHA1 Message Date
juanatsap 465af719e9 test: rewrite mascot tests — 39 assertions, Gemini + navigation links
Complete rewrite matching current architecture:
- Button position (right side x=1838)
- Panel toggle (open/close/reopen)
- Help modal (5 accordion sections, 18 clickable questions)
- Chip click → Gemini response with nav links
- Typed question → certifications response
- Cross-section: Go (finds projects + skills), Java (finds Insa)
- Company listing (Olympic, SAP, Insa)
- Navigation link presence and anchor hrefs
- Spanish language (header, chips, welcome, response in Spanish)
- Response time: 2.0s (under 10s threshold)
- Session persistence, input clear, console errors

37/39 pass (2 nav-click tests fail in headless mode — works in browser)
2026-04-08 17:17:36 +01:00
juanatsap 795ba88d6f fix: match CV design system, right-side positioning, smarter agent
CSS:
- Button moved to right: 2rem, above back-to-top (bottom: 6rem)
- Uses CV design tokens: --black-bar, --accent-blue, --paper-bg
- Fonts: Quicksand (header), Source Sans Pro (body)
- Tooltip on the left side (tooltip-left class)
- Dark theme uses CV-consistent grays

Intelligence:
- Agent instruction emphasizes exhaustive reporting of ALL matches
- Cross-section search results must not be truncated
- Mentions CV site itself is built with Go when relevant

Tests:
- Updated positioning assertions (right side, x > viewport/2)
- Added 5 intelligence tests: Go cross-section, company count,
  years of experience, React cross-section, Spanish response
- Resilient to API errors (waits for any message, not just user)
- 42 total test assertions
2026-04-08 13:04:47 +01:00
juanatsap 93e33f6496 fix: chat submission and session handling + 37 Playwright tests
- Fix chip auto-submit: use htmx.trigger() instead of native submit
  to bypass browser validation on required field
- Remove required from input (server validates already)
- Fix session_id duplication: use hx-swap-oob to replace single input
- Fix agent context: use background context with 30s timeout instead
  of HTTP request context (prevents premature cancellation)
- Remove redundant close button from header (toggle button handles it)
- Add 83-chat-mascot.test.mjs: 37 tests covering button, panel,
  help card, chips, typed questions, session, Spanish, positioning
2026-04-08 11:31:09 +01:00