mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-04-06 01:25:33 +00:00
refactor e2e test fail reporting process
This commit is contained in:
parent
fe970d709f
commit
a9c36b9dee
@ -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",
|
"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: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: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",
|
||||||
"report:full": "npm run report:merge && npm run report:generate && npm run report:copy-screenshots",
|
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"lint:fix": "eslint . --fix"
|
"lint:fix": "eslint . --fix"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -19,7 +19,21 @@ fi
|
|||||||
echo "✅ Consolidated HTML report generated successfully"
|
echo "✅ Consolidated HTML report generated successfully"
|
||||||
echo "Report size: $(wc -c < results/html/merged-report.html) bytes"
|
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 ==="
|
echo "=== Final consolidated report ready ==="
|
||||||
ls -la results/html/
|
ls -la results/html/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user