-
Notifications
You must be signed in to change notification settings - Fork 0
[REFACTOR] Migrate screenshot testing framework #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…o Roborazzi and update Java version
… PostDetailScreen with multiple UI states
…der to PostsScreenPreviewProvider and add screenshot tests for PostsScreen
…t tests in CI pipeline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates screenshot testing from Android's experimental screenshot testing framework to Roborazzi, a more mature and widely-adopted screenshot testing library built on Robolectric.
Key changes include:
- Replacing the experimental Android Compose screenshot testing library with Roborazzi
- Upgrading Java compilation target from version 17 to version 21
- Refactoring screenshot tests from preview-based approach to explicit test cases using Robolectric
Reviewed Changes
Copilot reviewed 21 out of 66 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| gradle/libs.versions.toml | Replaced android-compose-screenshot dependencies with Roborazzi and Robolectric libraries; updated Mockito versions |
| gradle.properties | Removed experimental screenshot testing flag |
| feature/settings/src/screenshotTest/* | Removed all screenshot test files from the screenshotTest directory |
| feature/settings/src/androidTest/java/* | Removed all androidTest compose test files |
| feature/posts/src/test/kotlin/* | Added new Roborazzi-based screenshot tests for Posts and PostDetail screens |
| feature/posts/src/screenshotTest/java/* | Removed preview-based screenshot test files |
| feature/posts/src/main/java/*/PostsScreenPreviewProvider.kt | Renamed preview provider class for consistency |
| feature/posts/src/main/java/*/PostScreen.kt | Updated import to use renamed preview provider |
| feature/authentication/src/androidTest/* | Removed authentication route test file |
| buildSystem/gradle/common-app-base.gradle | Updated Java version from 17 to 21 |
| buildSystem/gradle/common-android-compose.gradle | Replaced screenshot testing plugin with Roborazzi; moved test dependencies from screenshotTest to test source set |
| buildSystem/gradle/common-android-base.gradle | Updated Java version from 17 to 21 |
| .github/workflows/android_ci.yml | Added Roborazzi verification step to CI workflow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… to replace 'Snapshot Tests' and 'Maestro Tests' with 'Screenshot Tests'
6c03bec to
196ba2d
Compare
… refactor: add debug step for screenshot tests in CI pipeline" This reverts commit ac9d5f6. # Conflicts: # .github/workflows/android_ci.yml
…n error handling test case
| testImplementation(platform(libs.junit.bom)) | ||
| testImplementation libs.androidx.compose.ui.tooling | ||
| testImplementation libs.junit.platform.launcher | ||
| testImplementation libs.junit.jupiter.engine | ||
| testImplementation libs.junit.vintage.engine | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really needed?
.../posts/src/test/kotlin/com/alxnophis/jetpack/posts/ui/composable/PostDetailScreenshotTest.kt
Outdated
Show resolved
Hide resolved
...posts/src/test/kotlin/com/alxnophis/jetpack/posts/ui/viewmodel/PostsViewModelBehaviorSpec.kt
Show resolved
Hide resolved
bdb10c9 to
219b191
Compare
…reenshotTestUtils
…anagement in ScreenshotTestUtils
⚡️ Proposed Changes
ℹ️ Additional Info
🔗 Related Links
✅ Checklist
📷 Screenshots