feat: add testing infrastructure and improve component feedback

- Added React testing setup with JSDOM
- Added component tests for AddTransactionForm and TransactionTable
- Improved error handling and success messages in components
- Updated test configuration and dependencies
- Added CSS for error and success states
This commit is contained in:
GitHub Copilot
2025-05-05 17:41:39 +00:00
parent d3855aa7e4
commit 7e5ed585f7
19 changed files with 1299 additions and 1096 deletions

View File

@@ -213,6 +213,58 @@ tbody tr:hover {
border-color: #f5c6cb;
}
.error-message {
color: #dc3545;
background-color: #f8d7da;
border: 1px solid #f5c6cb;
border-radius: 4px;
padding: 8px 12px;
margin-bottom: 15px;
font-size: 0.9em;
}
.success-message {
color: #198754;
background-color: #d1e7dd;
border: 1px solid #badbcc;
border-radius: 4px;
padding: 8px 12px;
margin-bottom: 15px;
font-size: 0.9em;
}
.button-group {
display: flex;
gap: 10px;
margin-top: 15px;
}
.cancel-btn {
background-color: #6c757d;
color: white;
padding: 8px 15px;
border: none;
border-radius: 3px;
cursor: pointer;
}
.cancel-btn:hover {
background-color: #5a6268;
}
.cancel-btn:disabled {
background-color: #6c757d;
opacity: 0.65;
cursor: not-allowed;
}
.help-text {
display: block;
margin-top: 4px;
color: #6c757d;
font-size: 0.85em;
}
/* Basic Responsive */
@media (max-width: 768px) {
.dashboard-layout {