Skip to content

spec: foundation-testing-ci track - Testing + CI/CD + Comparison + Sharing - #2

Merged
FranGuh merged 8 commits into
mainfrom
track/foundation-testing-ci
May 11, 2026
Merged

spec: foundation-testing-ci track - Testing + CI/CD + Comparison + Sharing#2
FranGuh merged 8 commits into
mainfrom
track/foundation-testing-ci

Conversation

@FranGuh

@FranGuhFranGuh commented May 10, 2026

Copy link
Copy Markdown
Owner

Track: Foundation — Testing + CI/CD + Comparison + Sharing

✅ All 7 phases complete

PhaseStatus
1. Testing Setup
2. Inference Tests✅ 34 tests
3. Component Tests✅ 38 tests
4. CI/CD Pipeline✅ GitHub Actions
5. Pre-commit Hooks✅ Husky + lint-staged
6. Comparison View✅ Side-by-side comparison
7. Shareable Links✅ URL-encoded results + WhatsApp

🔧 What was rebased/resolved

  • Rebased onto updated main (includes SEO/UI fixes from PR feat: SEO, UI polish, inference fixes, laptop DB update #1)
  • Fixed 3 test failures due to main branch changes:
    • LaptopCard test: emoji removed from heading text
    • prioritizeScreenQuality flag: not set in main version
    • matchLaptopClass: returns empty array instead of generic class

✅ Verification

  • Lint: ✅
  • Tests: ✅ 72 passing
  • Build: ✅ 71 modules, 1.34s

📱 Nuevas features visibles

  1. Comparar laptops:

    • Checkbox "Comparar" debajo de cada laptop card
    • Barra sticky "Comparar X laptops" al seleccionar 2+
    • Vista lado a lado con specs destacadas (verde = mejor, rojo = peor)
  2. Compartir resultados:

    • Botón "Copiar link" (usa clipboard API)
    • Botón "Compartir por WhatsApp" (abre WhatsApp con link)
    • URLs codifican quiz answers + results para restaurar estado

Listo para review y merge.

@vercel

vercelBot commented May 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
computer-selector-helperReadyReadyPreview, CommentMay 11, 2026 6:45am

FranGuh added 7 commits May 9, 2026 20:03
- Testing suite: Vitest + RTL, 80% inference coverage target
- CI/CD: GitHub Actions, Husky pre-commit hooks
- Comparison view: side-by-side laptop comparison
- Shareable links: URL-encoded results + WhatsApp sharing
- Plan, risks, tasks, acceptance criteria documented
…rage)
- Install vitest, RTL, jsdom
- Create vitest.config.js with jsdom environment
- 34 convertToSpecs tests: gaming, creation, macOS, ChromeOS, budget, edge cases
- 22 matchLaptopClass tests: GPU/OS/budget filtering, scoring, sorting
- Fix normalize() regex stripping M1/M2/M3/M4 from Apple Silicon
- Add gamesType scoring (complex +3 gfx, simple +1)
- Add photoVideo:basic scoring (+1 gfx, +1 storage)
- Add missing flags: prioritizeGaming, prioritizeScreenQuality
- Coverage: 92% statements, 88% branches, 100% functions
- 16 new component tests (72 total)
- LaptopCard: rendering, props, link, null handling
- Recommendation: quiz flow, navigation, results, reset
- Mock convertToSpecs for deterministic test results
- Coverage: 90% statements, 85% branches, 86% functions
- Document missing image fallback feature
- Create .github/workflows/ci.yml: lint → test → build
- Node 22.x with npm caching
- Triggers on push/PR to main
- Add CI status badge to README.md
- Update README with testing section and coverage stats
- Install husky and lint-staged
- Configure lint-staged for src/**/*.{js,jsx}
- Pre-commit hook runs eslint --fix on staged files
- Fix unused imports in LaptopCard.test.jsx
- Run eslint --fix on entire codebase to clean violations
- Comparison component: side-by-side laptop comparison
- Compare checkboxes on each laptop card (2-3 selection)
- Sticky compare bar with laptop count
- Spec comparison with better/worse highlighting
- Shareable links: encode/decode results in URL
- Copy link button with clipboard API
- WhatsApp share button with pre-filled message
- URL param decoding on mount to restore results
- Responsive CSS for mobile comparison view
@FranGuh
FranGuh merged commit 5a4d61d into mainMay 11, 2026
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@FranGuh