pediatric-ai-scribe-v3/public/e2e-harness.html
Daniel 1024b4741b feat: A1+A2 — Playwright smoke suite + index.html mtime-based caching
Safety net for upcoming refactors:
- 26 Playwright smoke tests via @playwright/test 1.50.0 in an official
  Playwright container (no host Node needed). Covers every Bedside sub-pill,
  the age→weight estimator, dose calculators (seizure/sepsis/anaphylaxis/
  burns/airway), and interactive widgets (lightbox, vent SVG).
- `npm run e2e` wrapper runs tests inside mcr.microsoft.com/playwright:v1.50.0-noble
  on the ped-ai_default Docker network so no host port mapping is needed.
- public/e2e-harness.html + public/js/e2e-bootstrap.js load the calculators
  component without the SPA auth wall (scripts external to satisfy CSP).

Server:
- server.js now re-reads public/index.html on mtime change instead of
  caching at boot. Fixes the "edit HTML, restart container" friction.
- CSP upgradeInsecureRequests disabled in helmet config; Caddy still
  enforces HTTPS at the reverse-proxy layer in production.
2026-04-20 03:51:22 +02:00

22 lines
794 B
HTML

<!DOCTYPE html>
<!-- E2E test harness — loads the calculators component + JS in isolation
(no auth wall). Playwright points here instead of the full SPA.
All scripts are external because the app's CSP blocks inline scripts. -->
<html lang="en">
<head>
<meta charset="UTF-8">
<title>E2E harness — calculators</title>
<link rel="stylesheet" href="/css/styles.css">
<style>
body { margin: 0; padding: 16px; background: #f9fafb; }
#calculators-tab { max-width: 1100px; margin: 0 auto; }
</style>
</head>
<body>
<section id="calculators-tab" class="tab-content active" data-component="calculators"></section>
<script defer src="/js/calc-math.js"></script>
<script defer src="/js/calculators.js"></script>
<script defer src="/js/e2e-bootstrap.js"></script>
</body>
</html>