e2e: scope the FrankBook-Pro leg to its own trigger-gated Playwright project

The 11-admin spec walked links that terminate on FrankBook-Pro
(192.168.0.112), which sleeps when idle — every deploy gate timed out
there (measured 2026-10-05, two deploy windows). Split: the frankbook
links move to tests/e2e/specs/19-frankbook.spec.ts under a frankbook
project that run.sh excludes by default and deploy.sh triggers ONLY
when a frankbook blast-radius path changed (the spec, frankbook-pro/,
the homepage registry, the Caddyfile arr vhosts). deploy.sh computes
the trigger from the same BASE..HEAD revision range the plan uses.
This commit is contained in:
Frank committed 2026-10-05 18:04:02 -07:00
1 parent 77decb545e
commit 9c508218e9
6 files changed
+158 -7

No files matched your search

+28 -2
View File
@@ -4,8 +4,14 @@
# part of ./tests/run.sh. Credentials live in tests/e2e/.env.local
# (git-ignored; see .env.local.example). Usage:
#
# tests/e2e/run.sh # full suite
# tests/e2e/run.sh # full suite (frankbook project excluded)
# tests/e2e/run.sh --project guest # any playwright args pass through
#
# The frankbook project (19-frankbook.spec.ts — the *arr/qBittorrent walk)
# is NOT in the default project set: its links terminate on FrankBook-Pro,
# which sleeps when idle, so it must not gate unrelated deploys. deploy.sh
# sets E2E_INCLUDE_FRANKBOOK=1 when a frankbook trigger path changed. An
# explicit --project argument in "$@" bypasses the default set entirely.
set -euo pipefail
cd "$(dirname "$0")"
@@ -24,4 +30,24 @@ fi
npx playwright install chromium
exec npx playwright test "$@"
# Default project set; the frankbook project joins only when deploy.sh saw a
# frankbook trigger path (E2E_INCLUDE_FRANKBOOK=1). An explicit --project in
# "$@" takes over untouched.
DEFAULT_PROJECTS=(setup standard admin guest)
if [[ "${E2E_INCLUDE_FRANKBOOK:-0}" == "1" ]]; then
DEFAULT_PROJECTS+=(frankbook)
fi
has_project=0
for arg in "$@"; do
case "$arg" in
--project|--project=*) has_project=1 ;;
esac
done
if [[ "$has_project" -eq 1 ]]; then
exec npx playwright test "$@"
fi
PROJECT_ARGS=()
for project in "${DEFAULT_PROJECTS[@]}"; do
PROJECT_ARGS+=(--project "$project")
done
exec npx playwright test "${PROJECT_ARGS[@]}"