fix(tests): Enhance CrowdSecConfig with new input fields and improve accessibility
- Added IDs to input fields in CrowdSecConfig for better accessibility. - Updated labels to use <label> elements for checkboxes and inputs. - Improved error handling and user feedback in the CrowdSecConfig tests. - Enhanced test coverage for console enrollment and banned IP functionalities. fix: Update SecurityHeaders to include aria-label for delete button - Added aria-label to the delete button for better screen reader support. test: Add comprehensive tests for proxyHostsHelpers and validation utilities - Implemented tests for formatting and help text functions in proxyHostsHelpers. - Added validation tests for email and IP address formats. chore: Update vitest configuration for dynamic coverage thresholds - Adjusted coverage thresholds to be dynamic based on environment variables. - Included additional coverage reporters. chore: Update frontend-test-coverage script to reflect new coverage threshold - Increased minimum coverage requirement from 85% to 87.5%. fix: Ensure tests pass with consistent data in passwd file - Updated tests/etc/passwd to ensure consistent content.
This commit is contained in:
@@ -9,7 +9,7 @@ coverage:
|
||||
threshold: 1%
|
||||
patch:
|
||||
default:
|
||||
target: 85%
|
||||
target: 100%
|
||||
|
||||
# Exclude test artifacts and non-production code from coverage
|
||||
ignore:
|
||||
@@ -38,6 +38,7 @@ ignore:
|
||||
- "frontend/src/testUtils/**" # Mock factories (createMockProxyHost)
|
||||
- "frontend/src/__tests__/**" # i18n.test.ts and other tests
|
||||
- "frontend/src/setupTests.ts" # Vitest setup file
|
||||
- "frontend/src/locales/**" # Locale JSON resources
|
||||
- "**/mockData.ts" # Mock data factories
|
||||
- "**/createTestQueryClient.ts" # Test-specific utilities
|
||||
- "**/createMockProxyHost.ts" # Test-specific utilities
|
||||
|
||||
Reference in New Issue
Block a user