File tree Expand file tree Collapse file tree
dev-packages/e2e-tests/test-applications/nuxt-4 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545
4646echo " Starting nuxt dev with Sentry server config..."
4747
48- # 4. Start the actual dev command which should be used for the tests
49- NODE_OPTIONS=' --import ./.nuxt/dev/sentry.server.config.mjs' nuxt dev
48+ # 4. Start the actual dev command in the background first
49+ NODE_OPTIONS=' --import ./.nuxt/dev/sentry.server.config.mjs' nuxt dev &
50+ DEV_PID=$!
51+
52+ # 5. Wait for port 3030 to be ready before Playwright starts running tests
53+ echo " Waiting for port 3030 to be ready..."
54+ COUNTER=0
55+ while ! nc -z localhost 3030 2> /dev/null && [ $COUNTER -lt 60 ]; do
56+ sleep 0.5
57+ (( COUNTER++ ))
58+ done
59+
60+ if nc -z localhost 3030 2> /dev/null; then
61+ echo " Port 3030 is ready!"
62+ else
63+ echo " WARNING: Port 3030 not ready after 30 seconds"
64+ fi
65+
66+ # 6. Keep the script running (wait for the background process)
67+ wait $DEV_PID
You can’t perform that action at this time.
0 commit comments