Add Paparazzi preview tests and update dependencies#1298
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds Paparazzi preview testing infrastructure to the project and updates dependencies to support Java 21. The changes enable automated visual regression testing of Compose previews.
Changes:
- Added Paparazzi test infrastructure with parameterized tests for Compose previews
- Updated version catalog from 0.12.0 to 0.12.3
- Migrated project to Java 21 (breaking change) to support Paparazzi requirements
- Updated CI workflows to include Java 21 in the build matrix
- Added screenshot baseline images for Paparazzi tests
- Updated .gitignore to exclude gradle-user-home directory
Reviewed changes
Copilot reviewed 7 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| settings.gradle.kts | Updated version catalog dependency from 0.12.0 to 0.12.3 |
| sample/android/build.gradle.kts | Commented out auto-generated Paparazzi configuration (tests manually written) |
| sample/android/src/test/kotlin/generated/paparazzi/tests/GeneratedComposablePreviewPaparazziTests.kt | Added comprehensive Paparazzi test infrastructure with device config builder, snapshot handlers, and parameterized tests |
| gradle.properties | Added Java 21 version configuration property |
| MIGRATION.md | Documented breaking change for Java 21 requirement |
| .gitignore | Added gradle-user-home directory to exclusions |
| .github/workflows/*.yml | Updated CI workflows to include Java 21 in build matrix |
| sample/android/src/test/snapshots/images/*.png | Added Paparazzi snapshot baseline images (binary files) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Publish Test Report | ||
| if: false && (failure() || success()) && github.event_name == 'pull_request' | ||
| uses: mikepenz/action-junit-report@v6 | ||
| with: | ||
| report_paths: '**/sample/android/build/test-results/testDebugUnitTest/TEST-*.xml' | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| fail_on_failure: true | ||
| annotate_only: true | ||
| detailed_summary: true |
There was a problem hiding this comment.
The test report publishing step is disabled with if: false. This means test results won't be published to the PR even if tests fail or succeed. Consider enabling this by changing to if: (failure() || success()) && github.event_name == 'pull_request' to provide better visibility into test results in pull requests.
| /* | ||
| composablePreviewPaparazzi { | ||
| enable = true | ||
| packages = listOf("com.mikepenz.aboutlibraries.screenshot") | ||
| includePrivatePreviews = false | ||
| testClassName = "PaparazziTests" | ||
| testPackageName = "com.mikepenz.aboutlibraries.screenshot.generated.tests" | ||
| } | ||
| */ |
There was a problem hiding this comment.
The composablePreviewPaparazzi configuration block is commented out, but the plugin com.mikepenz.convention.composable-preview-scanner.paparazzi-plugin is still applied at line 10. If the plugin is not being used to auto-generate tests (since the test file appears to be manually written), consider whether the plugin should also be removed or if this is intentional for future use.
1c619ba to
2f9ec32
Compare
This PR adds Paparazzi preview tests to the project and includes necessary dependency updates.
Changes