managarten/services/mana-events/src/__tests__
Till JS 6a60e22a31 feat(events): bring list (wer bringt was?) — Phase 2
Add an "eventItems" mini-collection attached to each social event so
hosts can track what each guest is bringing, and so public visitors
on the share-link page can claim an item without an account.

Local-first side
- New eventItems table (Dexie v11), module config update for sync.
- LocalEventItem type + EventItem domain type, useEventItems query.
- eventItemsStore: addItem / updateItem / toggleDone / assign /
  deleteItem. Every mutation pushes the full list to the server
  snapshot via eventsStore.syncItems if the event is published.
- BringListEditor component on the host DetailView with assign-to-
  guest dropdown, quantity, and done-checkbox.
- eventsStore.syncItems + a syncItems call in publishEvent so the
  public page sees pre-existing items as soon as the event ships.

Server side
- New event_items_published table (FK cascade from events_published
  so unpublishing wipes the bring list along with the snapshot).
- Host endpoints PUT/GET /events/:eventId/items: full-replace upsert
  that preserves any existing claimed_by_name across host edits, max
  100 items, ownership check.
- Public POST /rsvp/:token/items/:itemId/claim: name-only claim, 1×
  per item (first write wins), shares the per-token hourly rate
  bucket with RSVP submissions to keep the abuse surface uniform.
- GET /rsvp/:token now also returns the bring list (sorted) so the
  public page renders in a single round-trip.

Public RSVP page
- Renders the bring list with claim buttons; clicking prompts for a
  name and POSTs the claim, then optimistically updates the UI.
- New bring-list i18n keys for all five locales (de/en/it/fr/es).

Tests
- 15 new server tests covering host PUT/GET (insert / update / prune /
  ownership / claimed-name preservation / cascade), GET /rsvp item
  exposure, and POST /claim (success / double-claim / cross-token /
  cancelled / validation). 50 server tests total, all green.
- E2E spec scoped to .guest-editor where the new BringListEditor
  introduced a duplicate "Hinzufügen" button label.
2026-04-07 19:31:39 +02:00
..
cleanup.test.ts test(mana-events): 35 server tests covering routes + sweeper 2026-04-07 19:02:54 +02:00
events.test.ts test(mana-events): 35 server tests covering routes + sweeper 2026-04-07 19:02:54 +02:00
health.test.ts test(mana-events): 35 server tests covering routes + sweeper 2026-04-07 19:02:54 +02:00
helpers.ts test(mana-events): 35 server tests covering routes + sweeper 2026-04-07 19:02:54 +02:00
items.test.ts feat(events): bring list (wer bringt was?) — Phase 2 2026-04-07 19:31:39 +02:00
rsvp.test.ts test(mana-events): 35 server tests covering routes + sweeper 2026-04-07 19:02:54 +02:00