pediatric-ai-scribe-v3/e2e/tests
Daniel 520a1f8fb1 feat(client): port Settings — Integrations (Nextcloud + Documents)
Second of three commits porting the vanilla settings.html. This one
delivers the two Integrations sub-sections, rendered below the Security
block and shown to every authenticated user (not gated by canLocalAuth —
SSO users also integrate Nextcloud and manage documents).

client/src/pages/Settings.tsx — NextcloudCard
  Form + status line driven by /api/auth/me. Connect POSTs
  /api/nextcloud/connect (nextcloudUrl / username / appPassword), which
  does a PROPFIND probe against the remote, creates the target folder
  via MKCOL, and encrypts the app password at rest. On success we
  invalidate the ['auth-me'] query so the status line flips to
  "Connected to …" without a reload. Disconnect goes through a
  ConfirmModal (not a native confirm) and POSTs /api/nextcloud/disconnect.

  When connected, a second row exposes the "Learning Hub — Default
  Browse Path" input backed by POST /api/user/webdav-path. (That handler
  lives inline in server.ts, not in userPreferences.ts — a quirk of the
  existing codebase that the port preserves.)

client/src/pages/Settings.tsx — DocumentsCard
  React Query feed off /api/documents. When S3 is not configured the
  server returns { s3_configured: false } and we render a static notice
  instead of the upload area (same branch as vanilla documents.js). The
  upload form bypasses the JSON api wrapper to send multipart FormData
  directly via fetch with credentials: 'include' (cookie auth continues
  to work). Downloads hit /api/documents/:id/download to receive a 5-min
  presigned URL which we open in a new tab. Delete goes through the
  shared ConfirmModal — replaces the vanilla showConfirm({ danger, … }).

  Downloading-state spinner is per-row (useMutation.variables === doc.id)
  so other rows stay clickable while one is in flight.

shared/types.ts + client/src/shared/types.ts
  Additive only:
    - AuthUser gains webdav_learning_path — already returned by
      /api/auth/me but missing from the type.
    - New response shapes: NextcloudConnectOk, UserDocument,
      DocumentsListOk, DocumentUploadOk, DocumentDownloadOk.

e2e/tests/settings-react-integrations.spec.js
  Four smoke tests: field presence, empty-form validation error, the
  S3-configured-or-notice branch renders, and a repeat of the
  no-native-dialog guard covering the Integrations interactions.

Client tsc -b, server tsc --noEmit, and vite build all pass locally.
Bundle 404.56 kB / 117.12 kB gzipped (+9 kB over commit 1). The e2e
container still predates /app/*; running these specs needs a rebuild.
2026-04-23 23:35:12 +02:00
..
ai-endpoints-contract.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
auth-gated-smoke.spec.js feat(pe-guide): unified single-play + remove badges; fix(e2e): shared fixture + raised login limit 2026-04-22 22:57:11 +02:00
auth-screen.spec.js test(e2e): +44 tests — sick visit, hospital course, auth screen, 2026-04-23 18:58:38 +02:00
bedside-smoke.spec.js fix(nav): move image lightbox to index.html so NRP + seizure pathways 2026-04-23 18:58:38 +02:00
chart-review-workflow.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
encounter-save-load.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
encounter-workflow.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
extensions-crud.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
hospitalcourse-workflow.spec.js test(e2e): +44 tests — sick visit, hospital course, auth screen, 2026-04-23 18:58:38 +02:00
learning-tab.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
model-selector.spec.js test(e2e): +44 tests — sick visit, hospital course, auth screen, 2026-04-23 18:58:38 +02:00
pe-guide-smoke.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
session-persistence.spec.js test(e2e): +44 tests — sick visit, hospital course, auth screen, 2026-04-23 18:58:38 +02:00
settings-faq-dictation.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
settings-react-integrations.spec.js feat(client): port Settings — Integrations (Nextcloud + Documents) 2026-04-23 23:35:12 +02:00
settings-react-security.spec.js feat(client): port Settings — Security (password, 2FA, sessions) 2026-04-23 23:31:14 +02:00
sickvisit-workflow.spec.js test(e2e): +44 tests — sick visit, hospital course, auth screen, 2026-04-23 18:58:38 +02:00
soap-hospital-workflow.spec.js feat(ui-state): persist sub-pill selections across reload + sign-out 2026-04-23 18:58:38 +02:00
top-calculators.spec.js test(e2e): add 27 Playwright smoke tests for top-row calculator tabs 2026-04-20 23:19:50 +02:00
ui-state-persistence.spec.js feat(ui-state): persist sub-pill selections across reload + sign-out 2026-04-23 18:58:38 +02:00
vaxschedule-content.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
wellvisit-workflow.spec.js test(e2e): +44 tests — sick visit, hospital course, auth screen, 2026-04-23 18:58:38 +02:00