test(post-form): add edit/delete/anon coverage and fix stale photo-gate assumptions

New specs: edit-mode (ES1 save round-trip + ES2/ES3 prefill 404/500 states),
delete-flow (DEL1-3 happy/cancel/failed), anon-view (AN1 no owner controls,
AN2 draft hidden from anon), photo-editor (live add/delete/reorder). Existing:
P3-P8 now attach a photo to satisfy the create photo-gate; V3 picker cap 4->6.
Full post suite 38/38, stable across parallel (3-worker) runs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mpdu3Dt1iVoozHwAMyjrbn
This commit is contained in:
2026-07-05 23:42:45 +02:00
co-authored by Claude Opus 4.8
parent 7534d7d178
commit d3c17791b7
7 changed files with 565 additions and 27 deletions
+13 -3
View File
@@ -8,13 +8,23 @@ const { execSync } = require('child_process');
*
* Resolution order:
* 1. GRAV_USER_DIR env var (set in .env or shell)
* 2. docker inspect the running intotheeast_grav container
* 3. Sibling `user/` directory (worktree fallback)
* 2. Sibling `user/` directory — authoritative for this repo's layout, where
* docker-compose always bind-mounts `./user` relative to the checkout. This
* is correct for BOTH the main checkout and a git worktree (each worktree
* serves its own `./user`), so it must be preferred over docker inspect.
* 3. `docker inspect intotheeast_grav` — last-resort fallback for running the
* specs detached from the served checkout. NOTE: from a worktree this points
* at the MAIN checkout's container (a different `user/`), so it must never
* win over the sibling dir above, or disk assertions look in the wrong tree.
*/
function resolveUserDir() {
if (process.env.GRAV_USER_DIR) {
return process.env.GRAV_USER_DIR;
}
const sibling = path.join(__dirname, '../../user');
if (fs.existsSync(path.join(sibling, 'config/site.yaml'))) {
return sibling;
}
try {
const raw = execSync(
"docker inspect intotheeast_grav --format '{{range .Mounts}}{{if eq .Destination \"/var/www/html/user\"}}{{.Source}}{{end}}{{end}}'",
@@ -24,7 +34,7 @@ function resolveUserDir() {
} catch (_) {
// docker not available or container not running
}
return path.join(__dirname, '../../user');
return sibling;
}
/**