Add validatePhones, validateEmails, validateAddresses for CardDAV
multi-value contact fields. Validates array structure, required
fields, type checks, and max lengths.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
All 4 previously interdependent tests now use shared aliceContact from
before() hook. 54/54 tests passing with full isolation.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Make all tests independent by creating their own test data
- Remove duplicate Account Management Operations suite (lines 744-801)
- Each test now creates its own accounts instead of relying on previous tests
- Fix unique constraint violations by using distinct account URLs
- All 54 tests now pass independently
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add test coverage for CardDAV account management, addressbook discovery UPSERT logic, and contact merge scenarios. Tests verify plain-text password storage, duplicate prevention, CASCADE SET NULL on account deletion, addressbook toggle functionality, and NULL-only field updates during sync.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add server/services/cardav-sync.js with full CardDAV functionality
- Implement account management (add, delete, list, test connection)
- Implement addressbook discovery and selection toggle
- Add vCard parser with support for all standard fields (FN, N, TEL, EMAIL, ADR, ORG, TITLE, URL, BDAY, PHOTO, NICKNAME, NOTE, CATEGORIES)
- Implement smart merge logic for contact deduplication (UID match, email/phone match)
- Handle multi-value fields (phones, emails, addresses) with primary flag preservation
- Add comprehensive tests for vCard parsing and database operations
- All 46 tests passing
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>