feat: Sistema controllo accessi Focolari completo con test E2E
🎯 Funzionalità Implementate: - Frontend React/TypeScript/Tailwind ottimizzato per tablet - Backend mock FastAPI con API complete - Hook RFID multi-pattern (US: ;? / IT: ò_) - Flusso validatore → partecipante → conferma ingresso - Carosello benvenuto multilingua (10 lingue, animazione smooth) - Gestione sessione con invalidazione su server restart - Pagina debug RFID accessibile da /debug 🧪 Test Implementati: - 56 unit test (Vitest) - hook RFID, API, componenti - 14 test E2E (Playwright) - flussi completi con browser reale - Test sicurezza: verifica blocco backend per utenti non ammessi 📋 Comandi Disponibili: - ./dev.sh install → Setup dipendenze - ./dev.sh dev → Sviluppo (hot reload) - ./dev.sh server → Produzione locale - ./dev.sh test → Unit test - ./dev.sh test:e2e → Test E2E headless - ./dev.sh test:e2e:headed → Test E2E con browser visibile - ./dev.sh test:e2e:ui → Playwright UI per debug 📝 Documentazione: - README.md con guida completa - API_SPECIFICATION.md per backend reale - TEST_CHECKLIST.md per test manuali - Piani sviluppo in ai-prompts/ ⏳ Stato: MVP completo, in attesa di feedback e richieste future
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import {defineConfig} from 'vite'
|
||||
/// <reference types="vitest" />
|
||||
import {defineConfig} from 'vitest/config'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
|
||||
@@ -15,6 +16,19 @@ export default defineConfig({
|
||||
emptyOutDir: true,
|
||||
},
|
||||
|
||||
// Configurazione test Vitest
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
setupFiles: ['./src/test/setup.ts'],
|
||||
include: ['src/**/*.{test,spec}.{js,ts,jsx,tsx}'],
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'html'],
|
||||
exclude: ['node_modules/', 'src/test/'],
|
||||
},
|
||||
},
|
||||
|
||||
// Proxy API in sviluppo verso il backend (porta 8000)
|
||||
// In produzione il backend serve direttamente il frontend
|
||||
server: {
|
||||
|
||||
Reference in New Issue
Block a user