Trek_CN/server/tests
jubnl a438652a50
fix(trips): preserve day content when trip date range changes
Rewrites generateDays to remap days positionally by day_number instead
of matching by date identity. Previously any date range shift with no
overlap would cascade-delete all day_assignments, day_notes, and
day_accommodations.

New behaviour:
- Shift/partial overlap: existing days remapped to new dates in order
- Shrink: overflow days become dateless (date=NULL) instead of deleted,
  preserving all child data for manual reassignment
- Grow: existing days kept, new empty days appended
- Clear dates: all days nullified, content intact

Also fixes a UNIQUE(trip_id, day_number) collision that would occur when
spare dateless days remained after growing into a partially-dateless trip
(maxAssigned base was wrong).

Closes #646
2026-04-15 01:28:53 +02:00
..
fixtures Add comprehensive backend test suite (#339) 2026-04-03 13:17:53 +02:00
helpers fix(tests): update test helpers and assertions for migration-98 photo schema 2026-04-14 13:54:48 +02:00
integration fix(trips): preserve day content when trip date range changes 2026-04-15 01:28:53 +02:00
unit fix(trips): preserve day content when trip date range changes 2026-04-15 01:28:53 +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