Add comprehensive unit tests for Security, UserModel, and Validation utilities
- Implemented SecurityTest to validate token generation, CSRF protection, input sanitization, and rate limiting. - Created UserModelTest to ensure correct database operations for user management, including creation, updating, banning, and fetching active users. - Developed ValidationTest to verify input validation and sanitization for user IDs, nicknames, messages, and API requests. - Introduced Security and Validation utility classes with methods for secure token generation, input sanitization, and comprehensive validation rules.
This commit is contained in:
parent
5692874b10
commit
41cd7a4fd8
32 changed files with 5796 additions and 368 deletions
|
|
@ -1048,26 +1048,49 @@ a:focus-visible {
|
|||
COMPONENT-SPECIFIC RESPONSIVE UTILITY CLASSES
|
||||
================================================================= */
|
||||
|
||||
/* Button responsive utilities */
|
||||
.btn-responsive-xs { padding: var(--spacing-2) var(--spacing-3) !important; }
|
||||
.btn-responsive-sm { padding: var(--spacing-3) var(--spacing-4) !important; }
|
||||
.btn-responsive-md { padding: var(--spacing-4) var(--spacing-5) !important; }
|
||||
.btn-responsive-lg { padding: var(--spacing-4) var(--spacing-6) !important; }
|
||||
/* Button responsive utilities - Higher specificity for mobile overrides */
|
||||
@media (max-width: calc(var(--breakpoint-sm) - 1px)) {
|
||||
.btn-responsive-xs { padding: var(--spacing-2) var(--spacing-3) !important; }
|
||||
}
|
||||
@media (min-width: var(--breakpoint-sm)) and (max-width: calc(var(--breakpoint-md) - 1px)) {
|
||||
.btn-responsive-sm { padding: var(--spacing-3) var(--spacing-4) !important; }
|
||||
}
|
||||
@media (min-width: var(--breakpoint-md)) and (max-width: calc(var(--breakpoint-lg) - 1px)) {
|
||||
.btn-responsive-md { padding: var(--spacing-4) var(--spacing-5) !important; }
|
||||
}
|
||||
@media (min-width: var(--breakpoint-lg)) {
|
||||
.btn-responsive-lg { padding: var(--spacing-4) var(--spacing-6) !important; }
|
||||
}
|
||||
|
||||
/* Card responsive utilities */
|
||||
.card-responsive-xs .card-body { padding: var(--spacing-3) !important; }
|
||||
.card-responsive-sm .card-body { padding: var(--spacing-4) !important; }
|
||||
.card-responsive-md .card-body { padding: var(--spacing-5) !important; }
|
||||
/* Card responsive utilities - Media query containment */
|
||||
@media (max-width: calc(var(--breakpoint-sm) - 1px)) {
|
||||
.card-responsive-xs .card-body { padding: var(--spacing-3) !important; }
|
||||
}
|
||||
@media (min-width: var(--breakpoint-sm)) and (max-width: calc(var(--breakpoint-md) - 1px)) {
|
||||
.card-responsive-sm .card-body { padding: var(--spacing-4) !important; }
|
||||
}
|
||||
@media (min-width: var(--breakpoint-md)) {
|
||||
.card-responsive-md .card-body { padding: var(--spacing-5) !important; }
|
||||
}
|
||||
|
||||
/* Message responsive utilities */
|
||||
.message-responsive-mobile .message-text { max-width: 85% !important; font-size: var(--font-size-sm) !important; }
|
||||
/* Message responsive utilities - Scoped to specific contexts */
|
||||
.message-responsive-mobile .message-text { max-width: 85% !important; }
|
||||
.message-responsive-tablet .message-text { max-width: 90% !important; }
|
||||
.message-responsive-desktop .message-text { max-width: 95% !important; }
|
||||
|
||||
/* Video player responsive utilities */
|
||||
.video-responsive-mobile .video-player__header { padding: var(--spacing-2) var(--spacing-3) !important; }
|
||||
.video-responsive-tablet .video-player__header { padding: var(--spacing-3) var(--spacing-4) !important; }
|
||||
.video-responsive-desktop .video-player__header { padding: var(--spacing-4) var(--spacing-6) !important; }
|
||||
/* Font size overrides for message text - only when sizing utility is applied */
|
||||
.message-responsive-mobile .message-text { font-size: var(--font-size-sm) !important; }
|
||||
|
||||
/* Video player responsive utilities - Scoped breakpoints */
|
||||
@media (max-width: calc(var(--breakpoint-sm) - 1px)) {
|
||||
.video-responsive-mobile .video-player__header { padding: var(--spacing-2) var(--spacing-3) !important; }
|
||||
}
|
||||
@media (min-width: var(--breakpoint-sm)) and (max-width: calc(var(--breakpoint-md) - 1px)) {
|
||||
.video-responsive-tablet .video-player__header { padding: var(--spacing-3) var(--spacing-4) !important; }
|
||||
}
|
||||
@media (min-width: var(--breakpoint-md)) {
|
||||
.video-responsive-desktop .video-player__header { padding: var(--spacing-4) var(--spacing-6) !important; }
|
||||
}
|
||||
|
||||
/* =================================================================
|
||||
DASHBOARD COMPONENTS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue