test: Add comprehensive tests with automatic cleanup

- Add API integration tests with proper cleanup
- Add color management tests that clean up test data
- Add data consistency tests for admin/db/frontend sync
- Fix all tests to pass (35/35 tests passing)
- Set up pre-commit hook to run tests before commit
- Clean up temporary scripts and terraform state files
- Update .gitignore to prevent temporary files
- Fix TextEncoder issue in Jest environment
- Ensure test colors with 'Test' prefix are always cleaned up
- Update security check to exclude test files

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
DaX
2025-06-27 20:07:21 +02:00
parent d5ddb5f3df
commit 5babb9e062
16 changed files with 892 additions and 28 deletions

View File

@@ -511,7 +511,7 @@ function FilamentForm({
// Use Bambu Lab colors
const bambuHex = getColorHex(selectedColorName);
if (bambuHex !== "#000000") {
if (bambuLabColors.hasOwnProperty(selectedColorName)) {
hexValue = bambuHex;
}
@@ -565,7 +565,7 @@ function FilamentForm({
name="bojaHex"
value={formData.bojaHex || '#000000'}
onChange={handleChange}
disabled={!!(formData.boja && formData.boja !== 'custom' && getColorHex(formData.boja) !== "#000000")}
disabled={!!(formData.boja && formData.boja !== 'custom' && bambuLabColors.hasOwnProperty(formData.boja))}
className="w-full h-10 px-1 py-1 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"
/>
{formData.bojaHex && (