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:
@@ -81,8 +81,7 @@ export const filamentService = {
|
||||
// Transform bojaHex to boja_hex for backend
|
||||
const data = {
|
||||
...filament,
|
||||
boja_hex: filament.bojaHex || filament.boja_hex,
|
||||
brand: '' // Temporary fix until server is updated
|
||||
boja_hex: filament.bojaHex || filament.boja_hex
|
||||
};
|
||||
delete data.bojaHex; // Remove the frontend field
|
||||
const response = await api.post('/filaments', data);
|
||||
@@ -93,8 +92,7 @@ export const filamentService = {
|
||||
// Transform bojaHex to boja_hex for backend
|
||||
const data = {
|
||||
...filament,
|
||||
boja_hex: filament.bojaHex || filament.boja_hex,
|
||||
brand: filament.brand || '' // Temporary fix until server is updated
|
||||
boja_hex: filament.bojaHex || filament.boja_hex
|
||||
};
|
||||
delete data.bojaHex; // Remove the frontend field
|
||||
const response = await api.put(`/filaments/${id}`, data);
|
||||
|
||||
Reference in New Issue
Block a user