test(server): ajoute tests fonctionnels sync et fixtures versionnees (#187)

Fixe .gitignore pour exclure .build-home/ et .pub-cache-local/ des
environnements locaux de build (bruit non versionne). Documente le
checklist d'integration serveur et met a jour le README en consequence.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-31 16:58:07 +02:00
parent 05d91e3e84
commit 89558808af
16 changed files with 989 additions and 12 deletions

22
server/test/fixtures/README.md vendored Normal file
View File

@ -0,0 +1,22 @@
# Versioned sync fixtures
These JSON files are server contract fixtures. They intentionally model client
payloads as opaque snapshots: server sync tests must push them, pull them back
and compare the payloads strictly without teaching the server the client schema.
Structure:
- `exercises/v1/`: first captured exercise fixture batch.
- `exercises/v2/`: second captured exercise fixture batch used to prove tests
can run multiple fixture generations side by side.
- `programs/v1/`, `workout_templates/v1/`, `workout_histories/v1/`: reusable
minimal sync batches for non-exercise resources.
Folder names such as `v1` and `v2` identify fixture batches, not the payload
schema itself. The authoritative client schema value remains the JSON
`schemaVersion` field inside each fixture, and tests assert that the server
preserves that value exactly.
When the client schema changes, add a new fixture batch folder instead of
rewriting older fixtures. Old fixture versions are kept to verify backward and
forward compatibility.