mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-04-06 01:25:33 +00:00
fix: improve screenshot handling in e2e test reports
- Add debugging output to trace screenshot copying process in CI - Clean up unwanted 'before-intentional-failure' screenshots - Fix artifact upload path formatting in workflow
This commit is contained in:
parent
a9c36b9dee
commit
c69507fecf
3
.github/workflows/test.e2e.yml
vendored
3
.github/workflows/test.e2e.yml
vendored
@ -194,8 +194,7 @@ jobs:
|
|||||||
uses: actions/upload-artifact@2848b2cda0e5190984587ec6bb1f36730ca78d50 # v4.6.2
|
uses: actions/upload-artifact@2848b2cda0e5190984587ec6bb1f36730ca78d50 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: e2e-test-report-${{ github.run_id }}
|
name: e2e-test-report-${{ github.run_id }}
|
||||||
path: |
|
path: cypress/results/html/
|
||||||
cypress/results/html/
|
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
if-no-files-found: warn
|
if-no-files-found: warn
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,20 @@ echo "Report size: $(wc -c < results/html/merged-report.html) bytes"
|
|||||||
|
|
||||||
# Copy screenshots with proper structure for the HTML report
|
# Copy screenshots with proper structure for the HTML report
|
||||||
echo "Copying screenshots to HTML report directory..."
|
echo "Copying screenshots to HTML report directory..."
|
||||||
|
echo "DEBUG: Current working directory: $(pwd)"
|
||||||
|
echo "DEBUG: Available directories:"
|
||||||
|
ls -la
|
||||||
|
|
||||||
if [ -d "screenshots" ]; then
|
if [ -d "screenshots" ]; then
|
||||||
|
echo "DEBUG: Screenshots directory found"
|
||||||
|
echo "DEBUG: Screenshots directory structure:"
|
||||||
|
find screenshots -type f -name "*.png" | head -10
|
||||||
|
|
||||||
|
# Remove unwanted screenshots (like before-intentional-failure)
|
||||||
|
echo "Cleaning up unwanted screenshots..."
|
||||||
|
find screenshots -name "*before-intentional-failure*" -type f -delete 2>/dev/null || true
|
||||||
|
find screenshots -name "*before-*" -type f -delete 2>/dev/null || true
|
||||||
|
|
||||||
# Create screenshots directory in the HTML output
|
# Create screenshots directory in the HTML output
|
||||||
mkdir -p "results/html/screenshots"
|
mkdir -p "results/html/screenshots"
|
||||||
|
|
||||||
@ -29,10 +42,15 @@ if [ -d "screenshots" ]; then
|
|||||||
cp -r screenshots/* results/html/screenshots/ 2>/dev/null || true
|
cp -r screenshots/* results/html/screenshots/ 2>/dev/null || true
|
||||||
|
|
||||||
echo "✅ Screenshots copied successfully"
|
echo "✅ Screenshots copied successfully"
|
||||||
echo "Screenshot structure:"
|
echo "DEBUG: Final screenshot structure in HTML output:"
|
||||||
find results/html/screenshots -type f -name "*.png" | head -5
|
find results/html/screenshots -type f -name "*.png" | head -10
|
||||||
|
|
||||||
|
echo "DEBUG: Full results/html structure:"
|
||||||
|
find results/html -type f | head -20
|
||||||
else
|
else
|
||||||
echo "⚠️ No screenshots directory found"
|
echo "⚠️ No screenshots directory found"
|
||||||
|
echo "DEBUG: Available files and directories:"
|
||||||
|
find . -maxdepth 2 -type d
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "=== Final consolidated report ready ==="
|
echo "=== Final consolidated report ready ==="
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user