refactor e2e test fail reporting process

This commit is contained in:
mahula 2025-10-06 17:07:08 +02:00
parent fe970d709f
commit a9c36b9dee
2 changed files with 16 additions and 3 deletions

View File

@ -9,8 +9,7 @@
"test:split:auto": "SPEC_COUNT=$(find e2e -name '*.cy.ts' | wc -l) && echo \"Running $SPEC_COUNT chunks in parallel\" && for i in $(seq 0 $((SPEC_COUNT-1))); do SPLIT=$SPEC_COUNT SPLIT_INDEX=$i cypress run --e2e --browser chromium & done; wait",
"report:merge": "mochawesome-merge 'results/*.json' -o results/merged-report.json",
"report:generate": "marge results/merged-report.json --reportDir results/html --reportTitle 'Utopia Map E2E Tests' --reportPageTitle 'Utopia Map E2E Test Report' --inline --charts --showPassed --showFailed --showPending --showSkipped",
"report:copy-screenshots": "if [ -d screenshots ]; then cp -r screenshots results/html/ 2>/dev/null || true; fi",
"report:full": "npm run report:merge && npm run report:generate && npm run report:copy-screenshots",
"report:full": "npm run report:merge && npm run report:generate",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},

View File

@ -19,7 +19,21 @@ fi
echo "✅ Consolidated HTML report generated successfully"
echo "Report size: $(wc -c < results/html/merged-report.html) bytes"
npm run report:copy-screenshots
# Copy screenshots with proper structure for the HTML report
echo "Copying screenshots to HTML report directory..."
if [ -d "screenshots" ]; then
# Create screenshots directory in the HTML output
mkdir -p "results/html/screenshots"
# Copy all screenshots maintaining directory structure
cp -r screenshots/* results/html/screenshots/ 2>/dev/null || true
echo "✅ Screenshots copied successfully"
echo "Screenshot structure:"
find results/html/screenshots -type f -name "*.png" | head -5
else
echo "⚠️ No screenshots directory found"
fi
echo "=== Final consolidated report ready ==="
ls -la results/html/