Skip to content

feat(snapshots): Add generateTests flag to disable preview scanning#1146

Merged
runningcode merged 1 commit intomainfrom
no/eme-1039-add-generate-tests-flag
Apr 15, 2026
Merged

feat(snapshots): Add generateTests flag to disable preview scanning#1146
runningcode merged 1 commit intomainfrom
no/eme-1039-add-generate-tests-flag

Conversation

@runningcode
Copy link
Copy Markdown
Contributor

@runningcode runningcode commented Apr 15, 2026

Use the hidewhitespace diff to review: https://github.com/getsentry/sentry-android-gradle-plugin/pull/1146/changes?w=1

Summary

  • Adds a generateTests property (default true) to SnapshotsExtension that controls whether the plugin auto-generates Paparazzi snapshot tests from Compose @Preview composables
  • When false, skips the ComposablePreviewScanner dependency, test generation task, and source directory wiring — but keeps the upload task wired to recordPaparazzi
  • Useful for customers who already have their own Paparazzi snapshot tests and only want to upload results
sentry {
  snapshots {
    enabled = true
    generateTests = false
  }
}

Fixes EME-1039

#skip-changelog

🤖 Generated with Claude Code

…EME-1039)

Customers who already have Paparazzi snapshot tests and just want to
upload them can now set `generateTests = false` to prevent the plugin
from auto-discovering Compose previews and generating test code. The
upload task remains wired to recordPaparazzi regardless of this setting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@linear-code
Copy link
Copy Markdown

linear-code bot commented Apr 15, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 96eb423

@runningcode runningcode merged commit 6a2af45 into main Apr 15, 2026
24 of 25 checks passed
@runningcode runningcode deleted the no/eme-1039-add-generate-tests-flag branch April 15, 2026 07:17
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.

2 participants