haven-cypress-integration 2.1.5 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/run-filtered.sh +14 -5
package/package.json
CHANGED
|
@@ -245,11 +245,20 @@ if [ -n "$E2E_COMMAND" ]; then
|
|
|
245
245
|
|
|
246
246
|
# If E2E_COMMAND contains "cypress run", inject --env args
|
|
247
247
|
if echo "$E2E_COMMAND" | grep -q "cypress run"; then
|
|
248
|
-
#
|
|
249
|
-
|
|
250
|
-
echo "
|
|
251
|
-
|
|
252
|
-
|
|
248
|
+
# Build the full command with proper quoting for special characters
|
|
249
|
+
echo "Final env args: $FINAL_ENV_ARGS"
|
|
250
|
+
echo "Running: npm install && cypress run --env '$FINAL_ENV_ARGS'"
|
|
251
|
+
|
|
252
|
+
# Execute npm install first, then cypress run with env args
|
|
253
|
+
eval "npm install" 2>&1 | tee ${RESULTS_DIR}/logs.txt
|
|
254
|
+
INSTALL_EXIT=$?
|
|
255
|
+
|
|
256
|
+
if [ $INSTALL_EXIT -eq 0 ]; then
|
|
257
|
+
echo "npm install succeeded, running cypress..."
|
|
258
|
+
npx cypress run --env "$FINAL_ENV_ARGS" 2>&1 | tee -a ${RESULTS_DIR}/logs.txt
|
|
259
|
+
else
|
|
260
|
+
echo "npm install failed with exit code $INSTALL_EXIT"
|
|
261
|
+
fi
|
|
253
262
|
else
|
|
254
263
|
# For npm scripts like "npm run test:cy", env vars are already exported with CYPRESS_ prefix
|
|
255
264
|
echo "Note: Custom command doesn't contain 'cypress run'. CYPRESS_* env vars exported as fallback."
|