Remove otvoreno field references from all test files
- Updated ui-features.test.ts to remove otvoreno field expectations - Updated api-integration.test.ts to remove otvoreno from test data - Updated data-consistency.test.ts to remove otvoreno from structure definitions - Updated filament-crud.test.ts to remove otvoreno from CRUD operations - Updated quantity calculations to only use refill and vakuum fields All tests pass after these changes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,6 @@ describe('Data Structure Consistency Tests', () => {
|
||||
'bojaHex', // Frontend uses camelCase
|
||||
'refill',
|
||||
'vakum',
|
||||
'otvoreno',
|
||||
'kolicina',
|
||||
'cena',
|
||||
'createdAt',
|
||||
@@ -28,8 +27,7 @@ describe('Data Structure Consistency Tests', () => {
|
||||
boja: 'string',
|
||||
bojaHex: 'string',
|
||||
refill: 'string',
|
||||
vakum: 'string',
|
||||
otvoreno: 'string',
|
||||
vakum: 'string',
|
||||
kolicina: 'string',
|
||||
cena: 'string'
|
||||
}
|
||||
@@ -45,7 +43,6 @@ describe('Data Structure Consistency Tests', () => {
|
||||
'boja_hex', // Database uses snake_case
|
||||
'refill',
|
||||
'vakum',
|
||||
'otvoreno',
|
||||
'kolicina',
|
||||
'cena',
|
||||
'created_at',
|
||||
@@ -60,7 +57,6 @@ describe('Data Structure Consistency Tests', () => {
|
||||
boja_hex: 'character varying',
|
||||
refill: 'character varying',
|
||||
vakum: 'character varying',
|
||||
otvoreno: 'character varying',
|
||||
kolicina: 'integer',
|
||||
cena: 'character varying',
|
||||
created_at: 'timestamp with time zone',
|
||||
@@ -73,7 +69,7 @@ describe('Data Structure Consistency Tests', () => {
|
||||
// Check Filament interface matches admin structure
|
||||
const filamentKeys: (keyof Filament)[] = [
|
||||
'id', 'tip', 'finish', 'boja', 'bojaHex', 'boja_hex',
|
||||
'refill', 'vakum', 'otvoreno', 'kolicina', 'cena',
|
||||
'refill', 'vakum', 'kolicina', 'cena',
|
||||
'status', 'createdAt', 'updatedAt'
|
||||
];
|
||||
|
||||
@@ -89,7 +85,7 @@ describe('Data Structure Consistency Tests', () => {
|
||||
it('should have consistent form fields in admin dashboard', () => {
|
||||
const formFields = [
|
||||
'tip', 'finish', 'boja', 'bojaHex',
|
||||
'refill', 'vakum', 'otvoreno', 'kolicina', 'cena'
|
||||
'refill', 'vakum', 'kolicina', 'cena'
|
||||
];
|
||||
|
||||
// Check all form fields are in admin structure
|
||||
@@ -173,9 +169,9 @@ describe('Data Structure Consistency Tests', () => {
|
||||
});
|
||||
|
||||
it('should handle quantity fields correctly', () => {
|
||||
// Admin form shows refill, vakuum, otvoreno as numbers
|
||||
// Database stores them as strings like "2", "1 vakuum", "Ne"
|
||||
const quantityFields = ['refill', 'vakum', 'otvoreno'];
|
||||
// Admin form shows refill, vakuum as numbers
|
||||
// Database stores them as strings like "2", "1 vakuum"
|
||||
const quantityFields = ['refill', 'vakum'];
|
||||
|
||||
quantityFields.forEach(field => {
|
||||
expect(ADMIN_STRUCTURE.fieldTypes[field]).toBe('string');
|
||||
@@ -193,7 +189,6 @@ describe('Data Structure Consistency Tests', () => {
|
||||
boja_hex: '#000000',
|
||||
refill: '2',
|
||||
vakum: '1 vakuum',
|
||||
otvoreno: 'Ne',
|
||||
kolicina: '3',
|
||||
cena: '3999'
|
||||
};
|
||||
@@ -218,7 +213,6 @@ describe('Data Structure Consistency Tests', () => {
|
||||
bojaHex: '#000000',
|
||||
refill: '2',
|
||||
vakum: '1 vakuum',
|
||||
otvoreno: 'Ne',
|
||||
kolicina: '3',
|
||||
cena: '3999'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user