1#!/bin/bash
2
3# Script to help inspect Playwright test screenshots
4
5echo "šø Shelley E2E Test Screenshots"
6echo "================================="
7
8cd "$(dirname "$0")/.."
9
10# Create screenshots directory if it doesn't exist
11mkdir -p e2e/screenshots
12
13# Check for test results
14if [ -d "test-results" ]; then
15 echo "\nš Recent test failures:"
16 find test-results -name "*.png" -type f -exec ls -la {} \; | head -10
17else
18 echo "\nā No test-results directory found. Run tests first:"
19 echo " pnpm run test:e2e"
20fi
21
22# Check for screenshots in e2e directory
23if [ "$(ls e2e/screenshots/*.png 2>/dev/null | wc -l)" -gt 0 ]; then
24 echo "\nš· Generated screenshots:"
25 ls -la e2e/screenshots/*.png | head -10
26else
27 echo "\nš· No screenshots found in e2e/screenshots/"
28fi
29
30echo "\nš” To view screenshots:"
31echo " - Open files directly with an image viewer"
32echo " - Use 'pnpm exec playwright show-report' for HTML report"
33echo " - Check test-results/ for failure screenshots"