haven-cypress-integration 2.1.5 → 2.1.7
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 +28 -5
package/package.json
CHANGED
|
@@ -96,11 +96,18 @@ TEST_ENVIRONMENT=${TEST_ENVIRONMENT:-QA}
|
|
|
96
96
|
if [ -n "$ADO_REPO" ]; then
|
|
97
97
|
echo "=== ADO Clone Mode ==="
|
|
98
98
|
ADO_BRANCH=${ADO_BRANCH:-main}
|
|
99
|
+
echo "Cloning branch: $ADO_BRANCH"
|
|
99
100
|
|
|
100
101
|
git clone --branch "$ADO_BRANCH" --depth 1 \
|
|
101
102
|
"https://${ADO_PAT}@${ADO_REPO}" /app
|
|
102
103
|
|
|
103
104
|
cd /app
|
|
105
|
+
echo "=== Post-Clone Debug ==="
|
|
106
|
+
echo "Cloned to: $(pwd)"
|
|
107
|
+
echo "Branch: $(git branch --show-current)"
|
|
108
|
+
echo "Cypress config files:"
|
|
109
|
+
ls -la cypress.config.* 2>/dev/null || echo " NO cypress.config.* files found!"
|
|
110
|
+
echo "========================="
|
|
104
111
|
npm ci
|
|
105
112
|
echo "=== Clone Complete ==="
|
|
106
113
|
else
|
|
@@ -245,11 +252,27 @@ if [ -n "$E2E_COMMAND" ]; then
|
|
|
245
252
|
|
|
246
253
|
# If E2E_COMMAND contains "cypress run", inject --env args
|
|
247
254
|
if echo "$E2E_COMMAND" | grep -q "cypress run"; then
|
|
248
|
-
#
|
|
249
|
-
|
|
250
|
-
echo "
|
|
251
|
-
|
|
252
|
-
|
|
255
|
+
# Build the full command with proper quoting for special characters
|
|
256
|
+
echo "Final env args: $FINAL_ENV_ARGS"
|
|
257
|
+
echo "Running: npm install && cypress run --env '$FINAL_ENV_ARGS'"
|
|
258
|
+
|
|
259
|
+
# Execute npm install first, then cypress run with env args
|
|
260
|
+
eval "npm install" 2>&1 | tee ${RESULTS_DIR}/logs.txt
|
|
261
|
+
INSTALL_EXIT=$?
|
|
262
|
+
|
|
263
|
+
if [ $INSTALL_EXIT -eq 0 ]; then
|
|
264
|
+
echo "npm install succeeded, running cypress..."
|
|
265
|
+
echo "=== DEBUG: Pre-Cypress Check ==="
|
|
266
|
+
echo "Current directory: $(pwd)"
|
|
267
|
+
echo "Config file check:"
|
|
268
|
+
ls -la cypress.config.* 2>/dev/null || echo " No cypress.config.* found!"
|
|
269
|
+
echo "Root files:"
|
|
270
|
+
ls -la | head -20
|
|
271
|
+
echo "=== END DEBUG ==="
|
|
272
|
+
npx cypress run --env "$FINAL_ENV_ARGS" 2>&1 | tee -a ${RESULTS_DIR}/logs.txt
|
|
273
|
+
else
|
|
274
|
+
echo "npm install failed with exit code $INSTALL_EXIT"
|
|
275
|
+
fi
|
|
253
276
|
else
|
|
254
277
|
# For npm scripts like "npm run test:cy", env vars are already exported with CYPRESS_ prefix
|
|
255
278
|
echo "Note: Custom command doesn't contain 'cypress run'. CYPRESS_* env vars exported as fallback."
|