Integration/stress test tool for synclib sync. Run as different users, join shared rooms, insert/delete items, and watch changes propagate in real-time across browser tabs.
createdb synclib_test
cd /Users/phil/projects/sync/org/synclib_server
JWT_SECRET=synclib_test_secret DATABASE_URL=ecto://phil@localhost/synclib_test mix ecto.migratecd /Users/phil/projects/sync/org/synclib_server
JWT_SECRET=synclib_test_secret DATABASE_URL=ecto://phil@localhost/synclib_test mix phx.serverServer runs on localhost:4444.
cd /Users/phil/projects/sync/org/test-harness
pnpm install
pnpm devClient runs on localhost:3000.
Automated integration tests using Playwright. Requires the Phoenix server running on localhost:4444.
Note: The sync server must be running locally on localhost:4444 before running tests (see Start the server above).
# Install (first time)
pnpm install
npx playwright install chromium
# Run all tests
pnpm test
# Run with Playwright UI
pnpm test:ui
# Run a single test file
npx playwright test tests/topic-matching.spec.tsVite dev server starts automatically via the Playwright webServer config.
- Open
localhost:3000in two browser tabs - Tab 1: User =
alice, Room =room-1→ click Connect - Tab 2: User =
bob, Room =room-1→ click Connect - Add items in either tab — they should appear in the other tab within a second
- Delete items — deletions should sync across tabs too
- Basic sync: Add item as Alice → appears in Bob's tab
- Delete sync: Delete item as Bob → disappears from Alice's tab
- Reconnect: Disconnect Alice, add items as Bob, reconnect Alice → items appear
- Room isolation: Connect Charlie to
room-2— should NOT seeroom-1items - Event log: Watch the right panel for sync state changes, push/pull counts, and remote change events
- Reset Local — clears IndexedDB in the current browser tab (server data stays)
- Reset All — clears both server items and all local IndexedDB databases