Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5c0e19d08f | |||
| cf9aa5bf88 | |||
| a739a3fc5c |
@@ -1,3 +1,8 @@
|
|||||||
|
## [1.1.1] - 2026-02-05
|
||||||
|
|
||||||
|
* Fix permission issues by running Playwright Docker containers with the host UID/GID, preventing root-owned files during codegen and replay.
|
||||||
|
|
||||||
|
|
||||||
## [1.1.0] - 2026-02-05
|
## [1.1.0] - 2026-02-05
|
||||||
|
|
||||||
* 🎬 Enable replay of recorded Playwright tests in headless mode
|
* 🎬 Enable replay of recorded Playwright tests in headless mode
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ require_cmd xhost
|
|||||||
|
|
||||||
: "${DISPLAY:=:0}"
|
: "${DISPLAY:=:0}"
|
||||||
|
|
||||||
|
# Run containers as the current host user to avoid root-owned files in bind mounts.
|
||||||
|
USER_ID="$(id -u)"
|
||||||
|
GROUP_ID="$(id -g)"
|
||||||
|
|
||||||
ROOT="$(repo_root)"
|
ROOT="$(repo_root)"
|
||||||
REC_DIR="${ROOT}/${RECORDINGS_DIR}"
|
REC_DIR="${ROOT}/${RECORDINGS_DIR}"
|
||||||
WORK_DIR="${REC_DIR}/.work"
|
WORK_DIR="${REC_DIR}/.work"
|
||||||
@@ -107,6 +111,8 @@ if [[ -n "${START_URL}" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
docker run --rm -it \
|
docker run --rm -it \
|
||||||
|
--user "${USER_ID}:${GROUP_ID}" \
|
||||||
|
-e HOME=/tmp \
|
||||||
--ipc=host \
|
--ipc=host \
|
||||||
--network host \
|
--network host \
|
||||||
-e "DISPLAY=${DISPLAY}" \
|
-e "DISPLAY=${DISPLAY}" \
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ repo_root() {
|
|||||||
|
|
||||||
require_cmd docker
|
require_cmd docker
|
||||||
|
|
||||||
|
# Run containers as the current host user to avoid root-owned files in bind mounts.
|
||||||
|
USER_ID="$(id -u)"
|
||||||
|
GROUP_ID="$(id -g)"
|
||||||
|
|
||||||
ROOT="$(repo_root)"
|
ROOT="$(repo_root)"
|
||||||
REC_DIR="${ROOT}/${RECORDINGS_DIR}"
|
REC_DIR="${ROOT}/${RECORDINGS_DIR}"
|
||||||
|
|
||||||
@@ -46,7 +50,12 @@ REC_DIR="${ROOT}/${RECORDINGS_DIR}"
|
|||||||
# Build ephemeral workspace
|
# Build ephemeral workspace
|
||||||
WORK_DIR="${REC_DIR}/.replay-work"
|
WORK_DIR="${REC_DIR}/.replay-work"
|
||||||
|
|
||||||
rm -rf "${WORK_DIR}"
|
# Robust cleanup: handle possible permission issues from previous runs.
|
||||||
|
if [[ -e "${WORK_DIR}" ]]; then
|
||||||
|
chmod -R u+rwX "${WORK_DIR}" 2>/dev/null || true
|
||||||
|
rm -rf "${WORK_DIR}" 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p "${WORK_DIR}/tests"
|
mkdir -p "${WORK_DIR}/tests"
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
@@ -97,6 +106,9 @@ echo "Tests : ${TEST_FILE:-all recordings}"
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
|
--network host \
|
||||||
|
--user "${USER_ID}:${GROUP_ID}" \
|
||||||
|
-e HOME=/tmp \
|
||||||
-v "${WORK_DIR}:/work" \
|
-v "${WORK_DIR}:/work" \
|
||||||
-w /work \
|
-w /work \
|
||||||
"${PLAYWRIGHT_IMAGE}" \
|
"${PLAYWRIGHT_IMAGE}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user