e2e: run.sh keeps playwright arg passthrough with the default project set
The default-project-set rewrite dropped non---project args (e.g. --list), so 'run.sh --list' silently RAN the whole suite instead of listing. Args now ride alongside the default set; an explicit --project still takes over. Verified: default --list = 33 tests listed; opt-in --list = 34 with the frankbook walk.
This commit is contained in:
+9
-9
@@ -31,8 +31,9 @@ fi
|
||||
npx playwright install chromium
|
||||
|
||||
# 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.
|
||||
# frankbook trigger path (E2E_INCLUDE_FRANKBOOK=1). Other playwright args
|
||||
# (--list, --grep, file filters) pass through alongside the default set; an
|
||||
# explicit --project in "$@" takes over untouched.
|
||||
DEFAULT_PROJECTS=(setup standard admin guest)
|
||||
if [[ "${E2E_INCLUDE_FRANKBOOK:-0}" == "1" ]]; then
|
||||
DEFAULT_PROJECTS+=(frankbook)
|
||||
@@ -43,11 +44,10 @@ for arg in "$@"; do
|
||||
--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[@]}"
|
||||
if [[ "$has_project" -eq 0 ]]; then
|
||||
for project in "${DEFAULT_PROJECTS[@]}"; do
|
||||
PROJECT_ARGS+=(--project "$project")
|
||||
done
|
||||
fi
|
||||
exec npx playwright test "$@" "${PROJECT_ARGS[@]}"
|
||||
|
||||
Reference in New Issue
Block a user