-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-e2e-deep.sh
More file actions
26 lines (23 loc) · 840 Bytes
/
Copy pathrun-e2e-deep.sh
File metadata and controls
26 lines (23 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/zsh
export PW_SKIP_WEBSERVER=1
export PLAYWRIGHT_BASE_URL=http://localhost:3002
cd /Users/ejaz/FormaOS
# Trust localhost:3002 in CSRF checks (production build runs on :3002 for E2E)
export CSRF_TRUSTED_ORIGINS=http://localhost:3002
export NEXT_PUBLIC_APP_URL=http://localhost:3002
export NEXT_PUBLIC_SITE_URL=http://localhost:3002
if ! curl -fsS http://localhost:3002/ >/dev/null 2>&1; then
echo "[run-e2e-deep] Server on :3002 is down. Starting Next.js production server..."
PORT=3002 node_modules/.bin/next start -p 3002 > /tmp/next-server.log 2>&1 &
fi
for i in {1..90}; do
if curl -fsS http://localhost:3002/ >/dev/null 2>&1; then
break
fi
if [[ "$i" -eq 90 ]]; then
echo "[run-e2e-deep] ERROR: localhost:3002 did not become ready in time"
exit 1
fi
sleep 1
done
npx playwright test --max-failures=25 --workers=1