Conversation
2cae0cb to
5e9dae7
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces Roborazzi-based Compose screenshot testing across the UI feature modules, wiring up Robolectric test execution, a shared capture helper, and CI verification to prevent screenshot regressions.
Changes:
- Adds a
:ui:testkitmodule with a sharedcaptureRoboImageshelper that captures both light/dark variants. - Adds Robolectric screenshot tests for multiple Compose preview composables across
ui/*modules (and loosens preview visibility fromprivatetointernalto make them callable from tests). - Integrates the Roborazzi Gradle plugin + dependencies in the root build, and adds a GitHub Actions job to run
verifyRoborazziDebug.
Reviewed changes
Copilot reviewed 45 out of 96 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/testkit/src/main/kotlin/com/github/kr328/clash/ui/RoborazziCompose.kt | Adds shared helper to capture light/dark screenshots with Roborazzi. |
| ui/testkit/build.gradle.kts | Declares :ui:testkit as an Android library with Roborazzi deps. |
| ui/settings/src/test/kotlin/com/github/kr328/clash/settings/ui/SettingsScreenTest.kt | Adds screenshot test invoking the Settings preview. |
| ui/settings/src/test/kotlin/com/github/kr328/clash/settings/ui/OverrideSettingsScreenTest.kt | Adds screenshot test invoking the Override Settings preview. |
| ui/settings/src/test/kotlin/com/github/kr328/clash/settings/ui/NetworkSettingsScreenTest.kt | Adds screenshot tests for Network Settings previews. |
| ui/settings/src/test/kotlin/com/github/kr328/clash/settings/ui/MetaFeatureSettingsScreenTest.kt | Adds screenshot test for Meta Feature Settings preview. |
| ui/settings/src/test/kotlin/com/github/kr328/clash/settings/ui/EditableTextMapScreenTest.kt | Adds screenshot test for EditableTextMap preview. |
| ui/settings/src/test/kotlin/com/github/kr328/clash/settings/ui/EditableTextListScreenTest.kt | Adds screenshot test for EditableTextList preview. |
| ui/settings/src/test/kotlin/com/github/kr328/clash/settings/ui/AppSettingsScreenTest.kt | Adds screenshot tests for App Settings previews. |
| ui/settings/src/test/kotlin/com/github/kr328/clash/settings/ui/AccessControlScreenTest.kt | Adds screenshot tests for Access Control previews/sheets. |
| ui/settings/src/main/kotlin/com/github/kr328/clash/settings/ui/SettingsScreen.kt | Makes preview composable internal for test access. |
| ui/settings/src/main/kotlin/com/github/kr328/clash/settings/ui/OverrideSettingsScreen.kt | Makes preview composable internal for test access. |
| ui/settings/src/main/kotlin/com/github/kr328/clash/settings/ui/NetworkSettingsScreen.kt | Makes preview composables internal for test access. |
| ui/settings/src/main/kotlin/com/github/kr328/clash/settings/ui/MetaFeatureSettingsScreen.kt | Makes preview composable internal for test access. |
| ui/settings/src/main/kotlin/com/github/kr328/clash/settings/ui/EditableTextMapScreen.kt | Makes preview composable internal for test access. |
| ui/settings/src/main/kotlin/com/github/kr328/clash/settings/ui/EditableTextListScreen.kt | Makes preview composable internal for test access. |
| ui/settings/src/main/kotlin/com/github/kr328/clash/settings/ui/AppSettingsScreen.kt | Makes preview composables internal for test access. |
| ui/settings/src/main/kotlin/com/github/kr328/clash/settings/ui/AccessControlScreen.kt | Makes preview composables internal for test access. |
| ui/proxy/src/test/kotlin/com/github/kr328/clash/proxy/ui/ProxyScreenTest.kt | Adds screenshot test invoking the Proxy preview. |
| ui/proxy/src/main/kotlin/com/github/kr328/clash/proxy/ui/ProxyScreen.kt | Makes preview composable internal for test access. |
| ui/profile/src/test/kotlin/com/github/kr328/clash/profile/ui/ProvidersScreenTest.kt | Adds screenshot test invoking the Providers preview. |
| ui/profile/src/test/kotlin/com/github/kr328/clash/profile/ui/PropertiesScreenTest.kt | Adds screenshot test invoking the Properties preview. |
| ui/profile/src/test/kotlin/com/github/kr328/clash/profile/ui/ProfilesScreenTest.kt | Adds screenshot test invoking the Profiles preview. |
| ui/profile/src/test/kotlin/com/github/kr328/clash/profile/ui/NewProfileScreenTest.kt | Adds screenshot test invoking the New Profile preview. |
| ui/profile/src/test/kotlin/com/github/kr328/clash/profile/ui/FilesScreenTest.kt | Adds screenshot test invoking the Files preview. |
| ui/profile/src/main/kotlin/com/github/kr328/clash/profile/ui/ProvidersScreen.kt | Makes preview composable internal for test access. |
| ui/profile/src/main/kotlin/com/github/kr328/clash/profile/ui/PropertiesScreen.kt | Makes preview composable internal for test access. |
| ui/profile/src/main/kotlin/com/github/kr328/clash/profile/ui/ProfilesScreen.kt | Makes preview composable internal and stabilizes preview time data. |
| ui/profile/src/main/kotlin/com/github/kr328/clash/profile/ui/NewProfileScreen.kt | Makes preview composable internal for test access. |
| ui/profile/src/main/kotlin/com/github/kr328/clash/profile/ui/FilesScreen.kt | Makes preview composable internal for test access. |
| ui/log/src/test/kotlin/com/github/kr328/clash/log/ui/LogsScreenTest.kt | Adds screenshot test invoking the Logs preview. |
| ui/log/src/test/kotlin/com/github/kr328/clash/log/ui/LogcatScreenTest.kt | Adds screenshot test invoking the Logcat preview. |
| ui/log/src/main/kotlin/com/github/kr328/clash/log/ui/LogsScreen.kt | Makes preview composable internal for test access. |
| ui/log/src/main/kotlin/com/github/kr328/clash/log/ui/LogcatScreen.kt | Makes preview composable internal for test access. |
| ui/home/src/test/kotlin/com/github/kr328/clash/home/ui/HomeScreenTest.kt | Adds screenshot tests invoking Home previews. |
| ui/home/src/test/kotlin/com/github/kr328/clash/home/ui/HelpScreenTest.kt | Adds screenshot test invoking Help preview. |
| ui/home/src/main/kotlin/com/github/kr328/clash/home/ui/HomeScreen.kt | Makes preview composables internal for test access. |
| ui/home/src/main/kotlin/com/github/kr328/clash/home/ui/HelpScreen.kt | Makes preview composable internal for test access. |
| ui/crash/src/test/kotlin/com/github/kr328/clash/crash/ui/AppCrashedScreenTest.kt | Adds screenshot test invoking crash preview. |
| ui/crash/src/test/kotlin/com/github/kr328/clash/crash/ui/ApkBrokenScreenTest.kt | Adds screenshot test invoking apk-broken preview. |
| ui/crash/src/main/kotlin/com/github/kr328/clash/crash/ui/AppCrashedScreen.kt | Makes preview composable internal for test access. |
| ui/crash/src/main/kotlin/com/github/kr328/clash/crash/ui/ApkBrokenScreen.kt | Makes preview composable internal for test access. |
| settings.gradle.kts | Includes the new :ui:testkit module. |
| gradle/libs.versions.toml | Adds Roborazzi + test libraries and plugin coordinates. |
| build.gradle.kts | Enables Robolectric resources, applies/configures Roborazzi, and adds test deps to Compose modules. |
| .github/workflows/build.yml | Adds CI job running verifyRoborazziDebug and makes it required. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
Author
|
Blocker: takahirom/roborazzi#828 |
This reverts commit f57d9a0
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://github.com/takahirom/roborazzi/blob/4be7f304fa23f2f00fad67ab612aec2035ac9db2/README.md
Closes #219.