left4me/l4d2web/tests/e2e
mwiegand aad8356613
test(files): cover 409 askConflict keep-both path
Tries to create `cfg`, which collides with the seeded directory of the
same name. /files/save returns 409 "destination is not a file";
routedSaveClicked routes that through fo.askConflict, which opens the
inline #files-conflict-modal on top of the still-open routed editor.
Clicking keep-both triggers a second POST with the suffixed path
(`cfg (1)`), the routed modal closes, and the new row materialises in
the tree.

This is the F4 path from 8dc14f0 ("wire askConflict into the routed
new-file 409 path"). Before that commit, the routed code branch fell
through to a generic alert(). With this test in place, a missing
call site fails loudly instead of silently.

Pins three invariants:
  * The conflict dialog is INLINE, not routed — it appears without a
    URL change (the decision tree in AGENTS.md "Modals: inline vs
    routed" hinges on this).
  * .files-conflict-path echoes the original colliding path, not the
    computed suffix — the suffix is internal, the user sees the
    collision.
  * withCollisionSuffix("cfg") → "cfg (1)" (no dot after the last
    slash → trailing-suffix branch in uploads.js).

Per docs/superpowers/plans/2026-05-17-files-overlay-e2e-handoff.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 18:40:56 +02:00
..
__init__.py test(e2e): scaffold Playwright + live-server fixture 2026-05-16 21:00:45 +02:00
conftest.py test(files): add files-overlay e2e fixture 2026-05-17 18:35:43 +02:00
test_editor.py test(editor-v2): Playwright e2e + Tab→acceptCompletion fix 2026-05-17 02:15:51 +02:00
test_files_overlay.py test(files): cover 409 askConflict keep-both path 2026-05-17 18:40:56 +02:00
test_smoke.py test(e2e): scaffold Playwright + live-server fixture 2026-05-16 21:00:45 +02:00