Fix timer tests and add baseline screenshot update script
- Fix timer.spec.ts button click coordinates (slow: y=125, fast: y=265, reset: y=390) - Add scripts/update-baseline-screenshots.sh for updating baselines - Update all baseline screenshots 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
26181bb929
commit
5561c7c9f2
75 changed files with 81 additions and 49 deletions
28
scripts/update-baseline-screenshots.sh
Executable file
28
scripts/update-baseline-screenshots.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
# Update baseline screenshots from test results
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
TESTS_DIR="$SCRIPT_DIR/../tests"
|
||||
SOURCE_DIR="$TESTS_DIR/test-results"
|
||||
DEST_DIR="$TESTS_DIR/baseline-screenshots"
|
||||
|
||||
if [ ! -d "$SOURCE_DIR" ]; then
|
||||
echo "Error: test-results directory not found at $SOURCE_DIR"
|
||||
echo "Run 'npm test' first to generate screenshots"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$DEST_DIR"
|
||||
|
||||
count=$(ls -1 "$SOURCE_DIR"/*.png 2>/dev/null | wc -l)
|
||||
if [ "$count" -eq 0 ]; then
|
||||
echo "No screenshots found in $SOURCE_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Copying $count screenshots to baseline..."
|
||||
cp "$SOURCE_DIR"/*.png "$DEST_DIR/"
|
||||
|
||||
echo "Updated baseline screenshots:"
|
||||
ls -1 "$DEST_DIR"/*.png | wc -l
|
||||
echo "screenshots in $DEST_DIR"
|
||||
Loading…
Reference in a new issue