Trek_CN/server/tests
jubnl ba7b99fb7d
fix: update backend tests and service bugs for gallery 1-to-N schema
updatePhoto: write sort_order to journey_entry_photos (junction) not journey_photos,
since JP_SELECT reads jep.sort_order — updating the gallery row had no visible effect.

deletePhoto: include id in return value so callers that check deleted.id still work.

Tests updated for new schema:
- journeyShareService: insertJourneyPhoto helper now inserts into journey_photos
  (keyed by journey_id) + journey_entry_photos junction instead of the old
  entry_id-keyed table
- SVC-081: deleteEntry cascades junction rows (journey_entry_photos), not gallery
  rows (journey_photos); assert junction is gone, gallery is preserved
- SVC-086: syncTripPhotos now populates the gallery directly — no [Trip Photos]
  wrapper entry; assert journey_photos gallery row instead
- INT-028: error message updated to 'journey_photo_id required'
2026-04-22 16:05:18 +02:00
..
fixtures feat(import): selective GPX/KML element import and performance improvements 2026-04-18 01:28:37 +02:00
helpers feat(notices): add system notice infrastructure 2026-04-16 14:36:33 +02:00
integration fix: update backend tests and service bugs for gallery 1-to-N schema 2026-04-22 16:05:18 +02:00
unit fix: update backend tests and service bugs for gallery 1-to-N schema 2026-04-22 16:05:18 +02:00
websocket test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
setup.ts Add comprehensive backend test suite (#339) 2026-04-03 13:17:53 +02:00