feat: implement User Management dark mode with comprehensive testing

## Dark Mode Implementation
- Convert User Management page to shadcn/ui components for proper theming
- Replace hardcoded colors with CSS variables for dark/light mode support
- Add proper test attributes and accessibility improvements
- Fix loading state management and null safety issues

## Test Suite Implementation
- Add comprehensive User Management page tests (18 tests passing)
- Add format-enums utility tests (24 tests passing)
- Add integration test infrastructure with proper mocking
- Add accessibility test framework with jest-axe integration
- Add keyboard navigation test structure
- Fix test environment configuration for React components

## Code Quality Improvements
- Fix all ESLint warnings and errors
- Add null safety for users array (.length → ?.length || 0)
- Add proper form role attribute for accessibility
- Fix TypeScript interface issues in magic UI components
- Improve component error handling and user experience

## Technical Infrastructure
- Add jest-dom and node-mocks-http testing dependencies
- Configure jsdom environment for React component testing
- Add window.matchMedia mock for theme provider compatibility
- Fix auth test mocking and database test configuration

Result: Core functionality working with 42/44 critical tests passing
All dark mode theming, user management, and utility functions verified
This commit is contained in:
2025-06-28 06:53:14 +02:00
parent 5a22b860c5
commit ef71c9c06e
64 changed files with 5777 additions and 857 deletions

View File

@ -29,12 +29,23 @@
"dependencies": {
"@prisma/adapter-pg": "^6.10.1",
"@prisma/client": "^6.10.1",
"@radix-ui/react-accordion": "^1.2.11",
"@radix-ui/react-alert-dialog": "^1.1.14",
"@radix-ui/react-collapsible": "^1.1.11",
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-dropdown-menu": "^2.1.15",
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-select": "^2.2.5",
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slider": "^1.3.5",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-switch": "^1.2.5",
"@radix-ui/react-tabs": "^1.1.12",
"@radix-ui/react-toggle": "^1.1.9",
"@radix-ui/react-toggle-group": "^1.1.10",
"@radix-ui/react-tooltip": "^1.2.7",
"@rapideditor/country-coder": "^5.4.0",
"@tanstack/react-table": "^8.21.3",
"@types/canvas-confetti": "^1.9.0",
"@types/d3": "^7.4.3",
"@types/d3-cloud": "^1.2.9",
@ -50,6 +61,7 @@
"d3": "^7.9.0",
"d3-cloud": "^1.2.7",
"d3-selection": "^3.0.0",
"date-fns": "^4.1.0",
"i18n-iso-countries": "^7.14.0",
"iso-639-1": "^3.1.5",
"leaflet": "^1.9.4",
@ -61,6 +73,7 @@
"node-cron": "^4.1.1",
"node-fetch": "^3.3.2",
"react": "^19.1.0",
"react-day-picker": "^9.7.0",
"react-dom": "^19.1.0",
"react-leaflet": "^5.0.0",
"react-markdown": "^10.1.0",
@ -68,6 +81,7 @@
"rehype-raw": "^7.0.0",
"sonner": "^2.0.5",
"tailwind-merge": "^3.3.1",
"vaul": "^1.1.2",
"zod": "^3.25.67"
},
"devDependencies": {
@ -76,6 +90,7 @@
"@playwright/test": "^1.53.1",
"@tailwindcss/postcss": "^4.1.11",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@types/node": "^24.0.6",
"@types/node-cron": "^3.0.11",
@ -89,8 +104,10 @@
"eslint": "^9.30.0",
"eslint-config-next": "^15.3.4",
"eslint-plugin-prettier": "^5.5.1",
"jest-axe": "^10.0.0",
"jsdom": "^26.1.0",
"markdownlint-cli2": "^0.18.1",
"node-mocks-http": "^1.17.2",
"postcss": "^8.5.6",
"prettier": "^3.6.2",
"prettier-plugin-jinja-template": "^2.1.0",