Update roborazzi to v1.26.0 #18
Merged
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.
This PR contains the following updates:
1.8.0-alpha-6
->1.26.0
1.8.0-alpha-6
->1.26.0
Release Notes
takahirom/roborazzi (io.github.takahirom.roborazzi)
v1.26.0
Compare Source
Bugfix for iOS Compose Roborazzi
The iOS Compose Roborazzi has broken. The reason is that GitHub's macos-latest has switched to an ARM-based CPU, and our tests have been running X64Test. We couldn't check the status of iOS Roborazzi. We have fixed this bug that prevented us from writing the test result JSON. Special thanks to @eyedol for the prompt fix!
What's Changed
Full Changelog: takahirom/roborazzi@1.25.0...1.26.0
v1.25.0
Compare Source
New Experimental Gradle Task:
clear
The Roborazzi Gradle Plugin saves image caches in
build/intermediates/roborazzi
. When users remove images inbuild/outputs/roborazzi
and rerun the tests, it doesn't work as expected. To address this, we've added a Gradle taskclearRoborazziDebug
to remove all images.I'm gathering feedback about this task in #452. Please let me know if this causes any issues in your workflow. I'm aware that there are many different ways to use Roborazzi, and I'd like to improve your project workflow.
What's Changed
Full Changelog: takahirom/roborazzi@1.24.0...1.25.0
v1.24.0
Compare Source
New feature: Support for includePrivatePreviews in Compose Preview Support
Compose Preview Support, initially released in version 1.22.0, now includes the
includePrivatePreviews
option. This feature allows you to include private previews in your Compose Preview Support setup. You can enable this by settingincludePrivatePreviews
inroborazzi.generateComposePreviewRobolectricTests.includePrivatePreviews
. Thank you for submitting this feature request, @yuchan2215 !New feature: JUnit rule support in ComposePreviewTester
We've enhanced ComposePreviewTester to support JUnit rules. Previously, ComposePreviewTester lacked lifecycle hooks, which made certain scenarios challenging to handle. Now, you can pass your own Test rules, including your Compose Test Rule, and use them in tests. For a sample implementation, check out this integration test.
Breaking changes for users of the
ComposePreviewTester
interfaceAs we continue to improve Compose Preview Support, we've made some changes to the
ComposePreviewTester
interface. These changes introduce a breaking change for current users.ComposePreviewTester is an interface for modifying the behavior of Compose Preview Support. Previously, the API was prone to breaking changes with each new option added. We've addressed this issue by introducing a new
options()
function. However, this necessitates a change in how you use the interface.Old interface:
New interface (Packages can now be accessed via
options().scanOptions.packages
):Acknowledgments
We'd like to extend our sincere thanks to @yschimke and @sergio-sastre for their valuable design reviews and insightful feedback, which greatly contributed to the improvements in this release.
What's Changed
Full Changelog: takahirom/roborazzi@1.23.0...1.24.0
v1.23.0
Compare Source
Breaking Changes to
roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName
Gradle ExtensionWe released
roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName
in the previous release1.22.0
, allowing customization of preview test behavior. We have since discovered that the interface of RobolectricPreviewTest cannot adapt to Compose Multiplatform Preview because RobolectricPreviewTest usesAndroidPreviewInfo
from ComposablePreviewScanner, which represents Android Compose Preview. To address this, we have added a generic parameter to handle the annotation and renamed RobolectricPreviewTest to ComposePreviewTester.The Gradle extension property has been rena 10000 med:
roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName
->roborazzi.generateComposePreviewRobolectricTests.testerQualifiedClassName
Old interface:
New interface:
What's Changed
Full Changelog: takahirom/roborazzi@1.22.2...1.23.0
v1.22.2
Compare Source
Notice
RobolectricPreviewTest and roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName are used for customizing Experimental Compose Preview Support. However, the name and class signature of RobolectricPreviewTest will be changed in a future release(not in 1.22.2) to support the Compose Multiplatform Preview Annotation.
Bug fixes
We didn't have integration tests for Experimental Compose Preview Support, so we added them. In KMP projects, we used to check only
testImplementation
(androidUnitTest.dependencies.implementation is used for KMP Android Unit tests), and the verification for generateComposePreviewRobolectricTests{} was failing. Therefore, we have added integration tests and fixed the behavior for KMP projects.What's Changed
Full Changelog: takahirom/roborazzi@1.22.1...1.22.2
v1.22.1
Compare Source
Bug fixes
We've released Experimental Compose Preview Support in 1.22.0. In this release, we are going to include a bug fix for it.
The strategy of
generateComposePreviewRobolectricTests{}
is not to modify settings automatically, but to verify that the user settings are correct. This allows our settings to be the single source of truth. However, the assertion had some bugs, so I fixed them.What's Changed
Full Changelog: takahirom/roborazzi@1.22.0...1.22.1
v1.22.0
Compare Source
Experimental Compose Preview Support 🚀
We're excited to announce the experimental release of Compose Preview Support for Roborazzi, a powerful new feature that streamlines the process of generating screenshot tests for Jetpack Compose Previews.
Key Features
How to Use
To enable Compose Preview screenshot test generation, add the following to your
build.gradle.kts
:After configuration, run the
recordRoborazziDebug
task to generate screenshots using the newly created tests.Customization Options
Customize your setup with options like:
Manual Integration
For manual integration, add the following dependency:
testImplementation("io.github.takahirom.roborazzi:roborazzi-compose-preview-scanner-support:[version]")
Then use the
ComposablePreview<AndroidPreviewInfo>.captureRoboImage()
function in your tests. Note thatComposablePreview
is a class provided by the ComposablePreviewScanner library, which Roborazzi utilizes for this feature.This approach allows for more fine-grained control over the screenshot capture process for Compose Previews.
Acknowledgements
Special thanks to @yschimke for the initial proposal, and to @sergio-sastre and @yschimke for their valuable design and code reviews.
For more detailed information on setup and usage, please visit our documentation.
Enhanced Accessibility Text Capture
Thanks to @lukas-mercari 's contribution, we've improved accessibility text dumping for merged Compose elements. Both content descriptions and text are now captured, providing more comprehensive accessibility information in tests.
What's Changed
Full Changelog: takahirom/roborazzi@1.21.0...1.22.0
v1.21.0
Compare Source
Android Studio, IntelliJ IDEA Plugin is coming
The Roborazzi Plugin has been released after the previous release. Please check it out. The Roborazzi plugin enhances your development workflow by automatically displaying screenshots related to Roborazzi's screenshot tests within IntelliJ IDEA. Easily view and verify visual outputs directly in your IDE, streamlining your testing and development process.
screencast.2024-06-07.10-08-00.mp4
https://plugins.jetbrains.com/plugin/24561-roborazzi
Now, test report assets are written in the same directory as the report HTML.
We are using Materialize for the HTML report generated in build/reports/roborazzi. This causes a Content Security Policy (CSP) problem when using iframes. As a result, we can't view the report correctly in some projects. To resolve this, we now save the assets like CSS and JS in the same directory as the report HTML. Thank you, @eyedol, for tackling this difficult problem. Thank you, @realdadfish, for reporting this!
Bug fix
In the Windows environment, the image path in the report file is not written correctly. I fixed the path separator to resolve this issue. Thank you for reporting this, @ben-gooding-hub.
What's Changed
a5ac7e5
by @renovate in https://github.com/takahirom/roborazzi/pull/384692973e
by @renovate in https://github.com/takahirom/roborazzi/pull/406Full Changelog: takahirom/roborazzi@1.20.0...1.21.0
v1.20.0
Compare Source
Workflow Enhancement
We use images as inputs for tests, ensuring that the compare and verify tasks function correctly. However, while running record tasks, we do not need the input images. Despite this, these input images invalidate the record task and disable the cache. Therefore, we no longer use input images for record tasks. Thank you, @lukas-mercari, for informing us and proposing this improvement.
What's Changed
Full Changelog: takahirom/roborazzi@1.19.0...1.20.0
v1.19.0
Compare Source
Bug Fix
I was informed that if you have multiple test suites, the RoborazziPlugin sometimes fails due to concurrent processes. This happens because the cleanup process runs multiple times. Therefore, I made the cleanup process run only once. Thank you for reporting this, @lukas-mercari.
What's Changed
Full Changelog: takahirom/roborazzi@1.18.0...1.19.0
v1.18.0
Compare Source
Migrating from
java.io.File
tokotlinx-io
Note: We are not changing the API for users, so the captureRoboImage methods are still using the java.io.File class.
Roborazzi previously used
java.io.File
for saving and loading files. Although Roborazzi supports iOS, sharing much of the logic is challenging when usingjava.io.File
. Therefore, we have migrated tokotlinx-io
.We are attentive to the Kotlin versions our users employ. We upgraded from version 1.9.21 to 1.9.22 due to a dependency on kotlinx-io. Since Kotlin 1.9.22 was released last year, it should be compatible with most projects.
Thank you, @eyedol, for your outstanding contribution! Your efforts are greatly appreciated.
What's Changed
New Contributors
Full Changelog: takahirom/roborazzi@1.17.0...1.18.0
v1.17.0
Compare Source
Bug Fixes
What's Changed
use
block to prevent leaks by @takahirom in https://github.com/takahirom/roborazzi/pull/376io.github.takahirom.roborazzi
dependency from Renovate updates by @sanao1006 in https://github.com/takahirom/roborazzi/pull/372New Contributors
Full Changelog: takahirom/roborazzi@1.16.1...1.17.0
v1.16.1
Compare Source
Bugfix
We removed the setting for the test task's input directory in 1.16.0, but it caused incorrect results in the compare tests. Therefore, I reverted the changes to the test input directory. This bug is now covered by Roborazzi's integration tests.
What's Changed
Full Changelog: takahirom/roborazzi@1.16.0...1.16.1
v1.16.0
Compare Source
Improvements
What's Changed
Full Changelog: takahirom/roborazzi@1.15.0...1.16.0
v1.15.0
Compare Source
Improvements
We continue to refine our testing processes to prevent similar issues in future releases.
What's Changed
Full Changelog: takahirom/roborazzi@1.14.0...1.15.0
v1.14.0
Compare Source
Bug fixes
Cache-related Flakiness in Comparison Results: We've identified and resolved an intermittent issue where cached data could sometimes prevent users from seeing comparison results in Roborazzi.
https://github.com/takahirom/roborazzi/pull/323
What's Changed
5a6920d
by @renovate in https://github.com/takahirom/roborazzi/pull/3180ad4b8f
by @renovate in https://github.com/takahirom/roborazzi/pull/319New Contributors
Full Changelog: takahirom/roborazzi@1.13.0...1.14.0
v1.13.0
Compare Source
Add experimental, minimal support for iOS in Compose Multiplatform
Roborazzi has supported Compose Desktop, but we hadn't yet supported iOS, which could be a major use case for Compose Multiplatform. Therefore, I have added support for iOS.
Now, you can record, compare, and verify just as you would with Android support.
https://takahirom.github.io/roborazzi/compose-multiplatform.html#experimental-feature-ios-support
However, Roborazzi is fundamentally based on the JVM. Currently, we offer only minimal features. If you are interested in helping to improve these features, please take a look at these issues:
https://github.com/takahirom/roborazzi/issues/302 https://github.com/takahirom/roborazzi/issues/305
Changes Affecting Existing Support
To support iOS, we have made some dependency changes for Android and Compose Desktop. I believe these changes will not affect existing behavior. However, if you notice anything, please let me know.
All
Kotlin:
1.8.22 -> 1.9.21
dropbox/differ:
0.0.1 -> 0.0.2
Desktop Compose Version
Compose Multiplatform:
1.4.3 -> 1.6.1
What's Changed
Full Changelog: takahirom/roborazzi@1.12.0...1.13.0
v1.12.0
Compare Source
Bug Fixes
robolectric.screenshot.hwrdr.native
introduced in Robolectric 4.12, which caused unwanted shadows when using Compose'sroboCaptureImage{}
with this new option. This has now been corrected by @lukas-mercari. Thanks for your contribution!What's Changed
New Contributors
Full Changelog: takahirom/roborazzi@1.11.0...1.12.0
v1.11.0
Compare Source
New feature
In Roborazzi, if you specify outputDir in the Gradle settings, you can use the build cache. Now, Roborazzi passes the setting into the test.
build.gradle
gradle.propeties
Test
What's Changed
Full Changelog: takahirom/roborazzi@1.10.1...1.11.0
v1.10.1
Compare Source
Changes from 1.10.0
This release includes a bug fix for a Javascript error that prevented the HTML report from being displayed.
Changes from 1.9.0
New experimental feature
Custom context data for images and reports
Custom context data enables the addition of information to images and reports in Roborazzi's tests, which I believe is very important. For example, it can include the test class name of a screenshot or whether it is in dark mode.
You can now add custom context data using RoborazziOptions, and Roborazzi will add the test class name metadata if you use RoborazziRule. If you have any opinions about this feature, please let me know at https://github.com/takahirom/roborazzi/issues/257.
Furthermore, this opens up possibilities with AI. Given that AI now possesses multimodal capabilities, it has become feasible for AI to process images.
This feature was made possible thanks to @sanao1006 's contribution of migrating from org.json to gson.
Important bug fix
Gradle attempts to load the test cache whenever possible, but there was an issue where Roborazzi couldn't restore images from the cache. This release includes a fix for this problem. Thank you, @francescocervone, for reporting this issue.
What's Changed
org.json
Library toGson
by @sanao1006 in https://github.com/takahirom/roborazzi/pull/248New Contributors
Full Changelog: takahirom/roborazzi@1.9.0...1.10.0
v1.10.0
Compare Source
New experimental feature
Custom context data for images and reports
Custom context data enables the addition of information to images and reports in Roborazzi's tests, which I believe is very important. For example, it can include the test class name of a screenshot or whether it is in dark mode.
You can now add custom context data using RoborazziOptions, and Roborazzi will add the test class name metadata if you use RoborazziRule. If you have any opinions about this feature, please let me know at https://github.com/takahirom/roborazzi/issues/257.
Furthermore, this opens up possibilities with AI. Given that AI now possesses multimodal capabilities, it has become feasible for AI to process images.
This feature was made possible thanks to @sanao1006 's contribution of migrating from org.json to gson.
Important bug fix
Gradle attempts to load the test cache whenever possible, but there was an issue where Roborazzi couldn't restore images from the cache. This release includes a fix for this problem. Thank you, @francescocervone, for reporting this issue.
What's Changed
org.json
Library toGson
by @sanao1006 in https://github.com/takahirom/roborazzi/pull/248New Contributors
Full Changelog: takahirom/roborazzi@1.9.0...1.10.0
v1.9.0
Compare Source
Announcement: Simplified Release Strategy for Roborazzi
We're making some changes to our release strategy to enhance your experience. Moving forward, we will be streamlining our versioning system. Instead of maintaining separate
alpha/rc/stable
versions, we will integrate experimental features directly into stable releases, marked with clear experimental annotations. This approach aims to simplify updates and improve clarity while ensuring you still have access to the latest features and improvements.We value your input and experience. If you have any thoughts or feedback on this change, please feel free to share them with us on GitHub Issue #243.
New Experimental Features
Introduction of
captureScreenRoboImage()
Function:This function executes screenshot tests that include dialogs on the screen, offering an alternative to the conventional use of Espresso's ViewInteraction or Compose Test's SemanticsNodeInteraction captureRoboImage(). Thank you, @nelletto, for bringing this issue with dialog screenshots to our attention.
Before:
After:
RoborazziTaskType Property:
I developed Roborazzi to facilitate layout viewing during UI tests, addressing the limitations in Robolectric's layout visibility. Initially, Roborazzi couldn't support just viewing layouts during the verification task (roborazziVerifyDebug). Hence, I've introduced a feature allowing task type alteration during test executions.
Behavior Changes
While Robolectric is in the process of introducing technical support for shadow rendering, Roborazzi is adapting its screenshot capture method accordingly. We're shifting towards using the PixelCopy class more extensively instead of relying solely on the View draw method. If you notice any issues with this change, please report them to us. Thank you, @sergio-sastre, for highlighting the advantages of using PixelCopy.
Bug Fixes
Addressed a memory leak issue occurring when using
compose captureRoboImage{}
multiple times within a single test. (Thanks for reporting this @vetoketju )Corrected an issue where not specifying a file path with
relativePathFromRoborazziContextOutputDirectory
resulted in duplicated file paths, likebuild/output/roborazzi/build/output/roborazzi/xxxx.png
.@marianeum Thank you for reporting this issue!
Others
Documentation Enhancement:
Added comprehensive documentation using Writerside, a documentation tool from JetBrains.
Roborazzi Documentation
Thank you, @timothyfroehlich, @sergio-sastre, and @ZacSweers, for your suggestions regarding documentation tools.
Thanks to @itochan's contribution, Roborazzi has moved to a version catalog, reduced unwanted dependencies and organized
Enhanced performance.
Fix Bug Causing Comparison Image to Enlarge and Enhance Performance by Avoiding Creation of Unnecessary Canvases
Use ComposeTestRule interface instead of concrete AndroidComposeTestRule class by @GisoBartels in https://github.com/takahirom/roborazzi/pull/241
Pass the default output directory setting from Gradle
What's Changed
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Renovate Bot.