Sweep stale e2e fixtures before a run, not after one

An aborted Playwright run never reaches `afterAll`, so its flows and
dashboards stayed in the store until somebody deleted them by hand. A
setup-project test now removes them before the next run, which is the
only point that is reached even when the run before it died.

The suite runs against whatever stack is up — somebody's own instance
with real flows in it — so the predicate matches only the shape every
fixture has, `test_<spec>_<base36 Date.now()>` with an optional suffix,
and only once that timestamp is an hour old.

Also correct the coverage-html fallback hint: `make clean` cannot clear
a root-owned htmlcov either, for the same reason `coverage html` cannot
write it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VfgHWr7AQDiLsTQVu7hpKB
This commit is contained in:
2026-09-14 16:27:36 +02:00
co-authored by Claude Opus 5
parent 6ccdabb520
commit 81fbd1ee54
2 changed files with 65 additions and 2 deletions
+4 -2
View File
@@ -6,6 +6,8 @@ set -x
coverage run -m pytest tests/
coverage report
# The HTML report is a convenience: a container run can leave htmlcov/ owned by
# root, and failing here after a green suite reads like a test failure.
# root, and failing here after a green suite reads like a test failure. `make
# clean` is no way out of that one — removing the files inside a directory
# needs write permission on it, which is the permission that is missing.
coverage html --title "${@-coverage}" \
|| echo " ! coverage html failed (htmlcov/ not writable? try 'make clean') — tests passed" >&2
|| echo " ! coverage html failed — tests passed (htmlcov/ root-owned? sudo rm -rf htmlcov)" >&2