Skip to content

Add snapshot reference image regeneration script#313

Draft
RoyalPineapple wants to merge 1 commit intomainfrom
add-regenerate-snapshots-script
Draft

Add snapshot reference image regeneration script#313
RoyalPineapple wants to merge 1 commit intomainfrom
add-regenerate-snapshots-script

Conversation

@RoyalPineapple
Copy link
Copy Markdown
Collaborator

Summary

  • Adds Scripts/regenerate-snapshots.sh that regenerates all snapshot reference images using the exact device models defined in CI
  • Uses UDID-based simulator lookup (via simctl JSON + python3) for reliable targeting
  • Temporarily enables recordMode via sed with a trap to restore on exit
  • Supports selective platform regeneration: Scripts/regenerate-snapshots.sh iOS_18

Device matrix (mirrors CI)

Platform Device OS
iOS_17 iPhone 15 Pro 17.5
iOS_18 iPhone 16 Pro 18.5
iOS_26 iPhone 17 Pro 26.2

Test plan

  • Ran script on all 3 platforms locally, all snapshot tests pass
  • Verified recordMode is restored to false on exit (including on failure via trap)

🤖 Generated with Claude Code

Add Scripts/regenerate-snapshots.sh that regenerates all snapshot
reference images using the exact device models defined in CI (iPhone 15
Pro/17.5, iPhone 16 Pro/18.5, iPhone 17 Pro/26.2). The script uses
UDID-based simulator lookup for reliable targeting and temporarily
enables recordMode via sed with a trap to restore on exit.

Usage: Scripts/regenerate-snapshots.sh [iOS_17] [iOS_18] [iOS_26]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant