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
|
npx playwright install chromium
|
||||||
|
|
||||||
# Default project set; the frankbook project joins only when deploy.sh saw a
|
# Default project set; the frankbook project joins only when deploy.sh saw a
|
||||||
# frankbook trigger path (E2E_INCLUDE_FRANKBOOK=1). An explicit --project in
|
# frankbook trigger path (E2E_INCLUDE_FRANKBOOK=1). Other playwright args
|
||||||
# "$@" takes over untouched.
|
# (--list, --grep, file filters) pass through alongside the default set; an
|
||||||
|
# explicit --project in "$@" takes over untouched.
|
||||||
DEFAULT_PROJECTS=(setup standard admin guest)
|
DEFAULT_PROJECTS=(setup standard admin guest)
|
||||||
if [[ "${E2E_INCLUDE_FRANKBOOK:-0}" == "1" ]]; then
|
if [[ "${E2E_INCLUDE_FRANKBOOK:-0}" == "1" ]]; then
|
||||||
DEFAULT_PROJECTS+=(frankbook)
|
DEFAULT_PROJECTS+=(frankbook)
|
||||||
@@ -43,11 +44,10 @@ for arg in "$@"; do
|
|||||||
--project|--project=*) has_project=1 ;;
|
--project|--project=*) has_project=1 ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
if [[ "$has_project" -eq 1 ]]; then
|
|
||||||
exec npx playwright test "$@"
|
|
||||||
fi
|
|
||||||
PROJECT_ARGS=()
|
PROJECT_ARGS=()
|
||||||
for project in "${DEFAULT_PROJECTS[@]}"; do
|
if [[ "$has_project" -eq 0 ]]; then
|
||||||
PROJECT_ARGS+=(--project "$project")
|
for project in "${DEFAULT_PROJECTS[@]}"; do
|
||||||
done
|
PROJECT_ARGS+=(--project "$project")
|
||||||
exec npx playwright test "${PROJECT_ARGS[@]}"
|
done
|
||||||
|
fi
|
||||||
|
exec npx playwright test "$@" "${PROJECT_ARGS[@]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user