Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

feat(e2e): expand PDF tests and fix IDPI allowlist

Boschc873efc9a3f9
diff --git a/tests/e2e/Dockerfile.pinchtab b/tests/e2e/Dockerfile.pinchtab
index 1f102200..23b49abc 100644
--- a/tests/e2e/Dockerfile.pinchtab
+++ b/tests/e2e/Dockerfile.pinchtab
@@ -39,10 +39,11 @@ ENV PINCHTAB_BIND=0.0.0.0 \
PINCHTAB_STATE_DIR=/data \
CHROME_BIN=/usr/bin/chromium-browser
-# Create config with Chrome flags for Docker and IDPI disabled for tests
+# Create config with Chrome flags for Docker and IDPI allowlist for test fixtures
# Config goes in XDG_CONFIG_HOME which defaults to ~/.config
+# AllowedDomains replaces defaults, so include localhost + fixtures
RUN mkdir -p /root/.config/pinchtab && \
- echo '{"browser":{"extraFlags":"--no-sandbox --disable-dev-shm-usage"},"security":{"idpi":{"enabled":false}}}' > /root/.config/pinchtab/config.json
+ echo '{"browser":{"extraFlags":"--no-sandbox --disable-dev-shm-usage"},"security":{"idpi":{"enabled":true,"allowedDomains":["localhost","127.0.0.1","::1","fixtures"]}}}' > /root/.config/pinchtab/config.json
EXPOSE 9999
diff --git a/tests/e2e/scenarios/06-screenshot-pdf.sh b/tests/e2e/scenarios/06-screenshot-pdf.sh
index 92b8a32f..ec4c84a4 100755
--- a/tests/e2e/scenarios/06-screenshot-pdf.sh
+++ b/tests/e2e/scenarios/06-screenshot-pdf.sh
@@ -14,13 +14,6 @@ assert_ok "screenshot"
end_test
-# ─────────────────────────────────────────────────────────────────
-start_test "pinchtab pdf (shorthand)"
-
-skip "/pdf shorthand not in server mode"
-
-end_test
-
# ─────────────────────────────────────────────────────────────────
start_test "pinchtab screenshot --tab <id>"
@@ -42,3 +35,14 @@ pt_get "/tabs/${TAB_ID}/pdf"
assert_ok "tab pdf"
end_test
+
+# ─────────────────────────────────────────────────────────────────
+start_test "pinchtab pdf --tab <id> (with options)"
+
+pt_get /tabs
+TAB_ID=$(get_first_tab)
+
+pt_post "/tabs/${TAB_ID}/pdf" -d '{"printBackground":true,"scale":0.8}'
+assert_ok "tab pdf with options"
+
+end_test