diff --git a/Makefile b/Makefile index 87e0a8f0..0eea204a 100644 --- a/Makefile +++ b/Makefile @@ -265,7 +265,9 @@ code-check-userfront-e2e-tests: (cd "$$tmp_dir/userfront-e2e" && $(PLAYWRIGHT_INSTALL_CHROMIUM)) || status=$$?; \ fi; \ if [ $$status -eq 0 ]; then \ - (cd "$$tmp_dir/userfront-e2e" && npm test) || status=$$?; \ + port="$$(node -e "const net=require('node:net'); const s=net.createServer(); s.listen(0,'127.0.0.1',()=>{console.log(s.address().port); s.close();});")"; \ + echo "==> userfront-e2e using PORT=$$port"; \ + (cd "$$tmp_dir/userfront-e2e" && PORT=$$port npm test) || status=$$?; \ fi; \ [ -d "$$tmp_dir/userfront-e2e/playwright-report" ] && cp -R "$$tmp_dir/userfront-e2e/playwright-report" reports/userfront-e2e/ || true; \ [ -d "$$tmp_dir/userfront-e2e/test-results" ] && cp -R "$$tmp_dir/userfront-e2e/test-results" reports/userfront-e2e/ || true; \