cd450837a2
Added comprehensive tests for remaining core functionality: ✅ 3-hyperscript.test.mjs - Parse error detection - Function definition verification - Keyboard event handler validation - Def statement count (≤3 limit) - Operator precedence checks ✅ 4-htmx.test.mjs - HTMX library loaded - Element presence (hx-get, hx-post, hx-swap, hx-target) - Request/response cycle validation - Loading indicators ✅ 5-language.test.mjs - Language toggle controls - Default language (English) - Spanish via URL parameter (?lang=es) - Toggle button functionality - localStorage/cookie persistence ✅ 6-modals.test.mjs - Modal elements (info, shortcuts, PDF) - ? key opens shortcuts modal - ESC key closes modals - Accessibility attributes (role, aria-label, aria-modal) Updated TEST-SUMMARY.md: - Now 7 active tests (0-6) - Complete core feature coverage - Updated coverage gaps (removed completed items) All tests follow established patterns: - Playwright browser automation - Real-time validation - Clear pass/fail indicators - Browser stays open for manual verification - Auto-discovered by master runner Master runner: bun tests/run-all.mjs
CV Project Test Suite
Organized test files for the CV application. All tests use Playwright for browser automation.
Test Files
0-zoom.test.mjs
Purpose: Test zoom control functionality
- Verifies zoom control elements exist
- Tests visibility toggle
- Validates zoom slider interaction
- Checks real-time zoom updates
Run: bun tests/mjs/0-zoom.test.mjs
1-toggles.test.mjs
Purpose: Comprehensive toggle testing with real-time visual verification
- Tests all 3 toggles (Length, Icons, Theme)
- Validates action bar toggles
- Tests hamburger menu toggles
- Verifies synchronization between action bar and menu
- Checks localStorage persistence
- Critical: Validates that toggles update DOM immediately (no refresh needed)
- Takes screenshots for visual comparison
Run: bun tests/mjs/1-toggles.test.mjs
Running All Tests
# Run individual tests
bun tests/mjs/0-zoom.test.mjs
bun tests/mjs/1-toggles.test.mjs
# Run all tests sequentially
for test in tests/mjs/*.test.mjs; do
echo "Running $test..."
bun "$test"
echo ""
done
Test Requirements
- Server must be running on http://localhost:1999
- Browser window will stay open after tests for manual verification
- Press Ctrl+C to exit test
Test Output
All tests provide:
- ✅ Clear pass/fail indicators
- 📊 Summary of results
- ❌ Detailed error messages
- 🎉 Success confirmation
Screenshots
Toggle tests save screenshots to tests/screenshots/:
before-icon-toggle.png- Before clicking icon toggleafter-icon-toggle.png- After clicking icon toggle
Use these to visually verify rendering changes.