Connected apps with 3rd-party data hosts jsr.io/@civility
README.md

Self-contained browser acceptance tests #

Python + Playwright tests against the real deno task start server. Everything needed from application source lives in this Civility checkout; no Notes/Music checkout, Inro CLI, published Civility package, or manually running server is required.

Setup #

Requires Deno, Python 3, and Playwright Chromium. The server process fixtures currently support macOS/Linux.

From the Civility repository:

python3 -m venv /tmp/civility-browser-venv
/tmp/civility-browser-venv/bin/pip install -r test/browser/requirements.txt
/tmp/civility-browser-venv/bin/python -m playwright install chromium

On Linux, install Chromium's OS dependencies too (python -m playwright install --with-deps chromium, with appropriate system permissions).

Run #

source /tmp/civility-browser-venv/bin/activate
deno task test:browser:ui

Or run either file independently, from any working directory:

/tmp/civility-browser-venv/bin/python /path/to/civility/test/browser/test_signup.py
/tmp/civility-browser-venv/bin/python /path/to/civility/test/browser/test_connection_sync.py

Each suite starts its own CLI server on an ephemeral port with a fresh SQLite database, blob directory, and generated authentication secret. The connection suite also builds apps/browser-test/ against local workspace packages and serves the resulting app from a temporary directory. There are no sibling-directory assumptions or temporary import-map edits. Moving the Civility checkout does not change setup.

Servers, browser contexts, and browser processes are cleaned up on success or failure. No existing development database or browser profile is used. Temporary artifact directories are retained and printed for inspection; they contain screenshots, Playwright traces, server/build logs, network summaries, and disposable database contents. Traces include test credentials and session data: keep them local and remove them when no longer needed.

Coverage #

  • test_signup.py: UI signup directly to dashboard, storage widget rendering without JavaScript errors, welcome-tour dismissal persistence, logout/sign-in, duplicate email rejection.
  • test_connection_sync.py: UI signup, real popup authorization on two isolated devices, UI create/edit/delete propagation, IndexedDB reload, saved connection restoration without another popup, ordinary JSON patch wire checks.

Both suites reject data-encryption/keychain detours and server 5xx responses. The app uses the actual civ-settings-cloud component, so missing child registration and stuck sync buttons are exercised rather than bypassed.

This target is intentionally separate from deno task test:browser, which tests IDB/OPFS blob GC. Identity provisioning, password recovery, blob transfers, and offline PWA-shell acceptance have their own coverage; the minimal app does not pretend to be a production PWA.