pediatric-ai-scribe-v3/e2e
Daniel b37c565cf0 fix(ui): replace native alert/confirm with showConfirm/showToast helpers
Daniel flagged the native browser confirm() dialogs in Extensions as ugly
and incompatible with the app's design. There was also a stray alert()
in calculators.js resus-meds weight validation.

Replaced:
- extensions.js: confirmDelete → showConfirm(..., {confirmText: 'Move to trash'})
- extensions.js: confirmPurge  → showConfirm(..., {danger: true, confirmText: 'Delete permanently'})
- calculators.js:2060 alert() → showToast(..., 'error')

All three helpers (showConfirm, showToast) are already defined as globals
in public/js/app.js. The design already had a modal — I should have used
it from the start.

Audit confirmation: `grep -rnE '\b(alert|confirm|prompt)\s*\(' public/`
now returns only comment references and the showConfirm definition
itself. No native dialogs remain anywhere in the frontend.

Playwright test updated to click the in-app modal's #confirm-modal-ok
and #confirm-modal-cancel buttons instead of intercepting page.on('dialog').
2026-04-22 19:29:53 +02:00
..
tests fix(ui): replace native alert/confirm with showConfirm/showToast helpers 2026-04-22 19:29:53 +02:00
fixtures.js test(e2e): shared fixture with pageerror + console-error guards + Extensions CRUD suite 2026-04-22 19:27:05 +02:00
package-lock.json feat: A1+A2 — Playwright smoke suite + index.html mtime-based caching 2026-04-20 03:51:22 +02:00
package.json feat: A1+A2 — Playwright smoke suite + index.html mtime-based caching 2026-04-20 03:51:22 +02:00
playwright.config.js test(e2e): run full suite at mobile viewport too (Pixel 5) 2026-04-20 23:21:32 +02:00