afda294639
Co-authored-by: ayattara <alassane.yattara@savoirfairelinux.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
32 lines
662 B
Bash
Executable File
32 lines
662 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Run Playwright directly, while keeping the deprecated project alias usable.
|
|
set -euo pipefail
|
|
|
|
PW_ARGS=()
|
|
while [[ $# -gt 0 ]]; do
|
|
case "$1" in
|
|
--project)
|
|
if [[ $# -lt 2 ]]; then
|
|
printf '%s\n' "--project requires a project name" >&2
|
|
exit 2
|
|
fi
|
|
if [[ "$2" == docker ]]; then
|
|
PW_ARGS+=(--project=containers)
|
|
else
|
|
PW_ARGS+=("$1" "$2")
|
|
fi
|
|
shift 2
|
|
;;
|
|
--project=docker)
|
|
PW_ARGS+=(--project=containers)
|
|
shift
|
|
;;
|
|
*)
|
|
PW_ARGS+=("$1")
|
|
shift
|
|
;;
|
|
esac
|
|
done
|
|
|
|
exec playwright test --config e2e/playwright.config.ts "${PW_ARGS[@]}"
|