MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m26s
Phase 2 of the collaboration plan: - frontend/src/lib/docSync: TypeScript port of the block tree, operations, effects and order keys (kept identical to Go via shared test vectors), diff from the editor's flat list to operations, IndexedDB persistence, HTTP transport and DocSyncEngine (one request in flight, idempotent resends, backoff, 3 s/30 s polling, keepalive flush and leave on exit, block leases for focus, 20 s grace and new blocks). - Text changes carry the version the user saw when typing (first change wins when coalescing; a stale focused field keeps its old base), so a concurrent edit becomes a conflict copy instead of a silent overwrite. - DocumentEditor uses the engine instead of the 800 ms whole-document PUT; editors (not only owners) can edit, remote changes appear live. - Server: task IDs of linked blocks are delivered again, linked tasks follow ticked/deleted blocks after sync, note tags are derived, title changes notify other users; block IDs already used in another note are renamed (starter content with fixed IDs was empty for every further user). - Fix: unlinking tasks from blocks wrote to non-existent columns and never worked (error was swallowed). - Tests: Go/TS order key vectors, diff round trips, engine races (lost responses, offline + reload, edits arriving between typing and sending, stale focused field, duplicate first block), plus a Playwright test with two browsers against the real image (e2e/run.sh). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
1.0 KiB
Markdown
28 lines
1.0 KiB
Markdown
# Ende-zu-Ende-Tests
|
|
|
|
Browser-Tests mit Playwright gegen einen echten MindSift-Server.
|
|
|
|
```bash
|
|
e2e/run.sh # baut das Image, startet es im Demo-Modus und führt die Tests aus
|
|
ENGINE=docker e2e/run.sh
|
|
```
|
|
|
|
Gegen einen bereits laufenden Server (Demo-Modus mit `admin/admin` und `user/user` nötig):
|
|
|
|
```bash
|
|
cd e2e && npm install && MINDSIFT_URL=http://localhost:8080 node collab.e2e.mjs
|
|
```
|
|
|
|
## collab.e2e.mjs
|
|
|
|
Zwei Browser (Eigentümer und Bearbeiter) arbeiten in derselben Notiz. Geprüft wird:
|
|
|
|
- Tippen wird gespeichert und erscheint beim anderen ohne Neuladen
|
|
- neue Bullets per Enter, in beide Richtungen
|
|
- Offline-Phase: Text bleibt lokal und wird nach Rückkehr übertragen
|
|
- beide Browser und der Server zeigen denselben Stand, auch nach Neuladen
|
|
- Sperren eines geschlossenen Browsers laufen nach spätestens 20 s ab
|
|
- Einrücken (Tab) und Zusammenführen (Backspace) bleiben nach Neuladen erhalten
|
|
|
|
Der Test dauert wegen des Sperrablaufs etwa eine Minute. Er läuft nicht in der CI, weil er Browser-Images braucht.
|