Files
hive/frontend/package.json
anthonyrawlins aacb45156b Set up comprehensive frontend testing infrastructure
- Install Jest for unit testing with React Testing Library
- Install Playwright for end-to-end testing
- Configure Jest with proper TypeScript support and module mapping
- Create test setup files and utilities for both unit and e2e tests

Components:
* Jest configuration with coverage thresholds
* Playwright configuration with browser automation
* Unit tests for LoginForm, AuthContext, and useSocketIO hook
* E2E tests for authentication, dashboard, and agents workflows
* GitHub Actions workflow for automated testing
* Mock data and API utilities for consistent testing
* Test documentation with best practices

Testing features:
- Unit tests with 70% coverage threshold
- E2E tests with API mocking and user journey testing
- CI/CD integration for automated test runs
- Cross-browser testing support with Playwright
- Authentication system testing end-to-end

🚀 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 14:06:34 +10:00

85 lines
2.5 KiB
JSON

{
"name": "hive-frontend",
"version": "1.0.0",
"description": "Hive Distributed AI Orchestration Platform - Frontend",
"private": true,
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"start": "vite preview --host 0.0.0.0 --port 3000",
"preview": "vite preview --host 0.0.0.0 --port 3000",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint:fix": "eslint . --ext ts,tsx --fix",
"type-check": "tsc --noEmit",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"test:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui",
"test:e2e:debug": "playwright test --debug",
"test:all": "npm run test && npm run test:e2e"
},
"dependencies": {
"@headlessui/react": "^1.7.17",
"@heroicons/react": "^2.0.18",
"@hookform/resolvers": "^3.3.0",
"@tanstack/react-query": "^5.59.0",
"axios": "^1.7.9",
"clsx": "^2.0.0",
"date-fns": "^2.30.0",
"framer-motion": "^10.16.0",
"immer": "^10.0.3",
"lucide-react": "^0.453.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.48.0",
"react-hot-toast": "^2.4.0",
"react-router-dom": "^6.28.0",
"reactflow": "^11.11.4",
"recharts": "^2.8.0",
"socket.io-client": "^4.8.1",
"sonner": "^2.0.6",
"tailwind-merge": "^2.2.0",
"zod": "^3.22.0",
"zustand": "^4.4.7"
},
"devDependencies": {
"@playwright/test": "^1.54.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/jest": "^30.0.0",
"@types/node": "^20.0.0",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.16",
"eslint": "^8.55.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"identity-obj-proxy": "^3.0.0",
"jest": "^30.0.4",
"jest-environment-jsdom": "^30.0.4",
"jest-transform-stub": "^2.0.0",
"postcss": "^8.4.32",
"tailwindcss": "^3.3.6",
"ts-jest": "^29.4.0",
"typescript": "^5.6.3",
"vite": "^5.4.10"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}