Skip to content

Releases: takahirom/roborazzi

idea-1.8.0

07 Sep 07:52
1924d40
Compare
Choose a tag to compare
idea-1.8.0 Pre-release
Pre-release

Thanks again to @sanao1006's contribution, we now have searching support for file names in the Roborazzi IntelliJ Plugin.

video_filter.mov

What's Changed

Full Changelog: idea-1.7.0...idea-1.8.0

idea-1.7.0

20 Aug 01:10
91c5e45
Compare
Choose a tag to compare

Thanks to @sanao1006's contribution, we now have multi-line name support for file names in the Roborazzi IntelliJ Plugin.

robo_video.mov

https://plugins.jetbrains.com/plugin/24561-roborazzi

What's Changed

Full Changelog: 1.26.0...idea-1.7.0

1.26.0

06 Aug 01:30
1087091
Compare
Choose a tag to compare

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

  • [IntelliJ IDEA Plugin] Don't crop dropdown task run button by @eyedol in #455
  • [Sample / Tests]Update dependency androidx.compose.runtime:runtime to v1.6.8 by @renovate in #343
  • Set a classDiscriminator to avoid polymorphic serializer error by @eyedol in #464

Full Changelog: 1.25.0...1.26.0

1.25.0

29 Jul 05:21
754ec92
Compare
Choose a tag to compare

New Experimental Gradle Task: clear

The Roborazzi Gradle Plugin saves image caches in build/intermediates/roborazzi. When users remove images in build/outputs/roborazzi and rerun the tests, it doesn't work as expected. To address this, we've added a Gradle task clearRoborazziDebug 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

  • [IDE Plugin] Hide dropdown border if no gradle tasks exists by @eyedol in #451 Thank you for your contribution!
  • [Feature] Add clear roborazzi task by @takahirom in #453

Full Changelog: 1.24.0...1.25.0

1.24.0

27 Jul 11:23
430f8ad
Compare
Choose a tag to compare

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 setting includePrivatePreviews in roborazzi.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 interface

As 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:

fun previews(vararg packages: String): List<ComposablePreview<T>>

New interface (Packages can now be accessed via options().scanOptions.packages):

fun previews(): List<ComposablePreview<T>>

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

  • [Idea Plugin] Improve performance of idea plugin by @takahirom in #439
  • [Idea Plugin] Prepare for release of IntelliJ IDEA plugin by @takahirom in #442
  • [Idea Plugin] Tweak idea plugin UI by @takahirom in #443
  • [Feature, Breaking Changes] Support includePrivatePreviews of ComposablePreviewScanner by @takahirom in #445
  • [Docs] Add mention to the sample in Compose Preview Support document by @takahirom in #448
  • [Docs] Fix URL of the README link by @takahirom in #449

Full Changelog: 1.23.0...1.24.0

Roborazzi IntelliJ idea plugin 1.4.0

20 Jul 00:49
0faf2e8
Compare
Choose a tag to compare

Thanks to @eyedol's contribution, we now have a feature that allows us to run Roborazzi Gradle tasks from the Roborazzi IntelliJ Plugin. This is more intuitive for beginners and enables us to set up the Roborazzi Plugin as a required plugin.

run.Roborazzi.Gradle.tasks.from.the.Roborazzi.IntelliJ.Plugin2.mov

https://plugins.jetbrains.com/plugin/24561-roborazzi

What's Changed

Full Changelog: idea-1.3.0...idea-1.4.0

1.23.0

18 Jul 03:22
b10e3e9
Compare
Choose a tag to compare

Breaking Changes to roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName Gradle Extension

We released roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName in the previous release 1.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 uses AndroidPreviewInfo 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 renamed:

roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName -> roborazzi.generateComposePreviewRobolectricTests.testerQualifiedClassName

Old interface:

interface RobolectricPreviewTest {
  fun previews(vararg packages: String): List<ComposablePreview<AndroidPreviewInfo>>

  fun test(
    preview: ComposablePreview<AndroidPreviewInfo>,
  )
}

New interface:

interface ComposePreviewTester<T : Any> {
  fun previews(vararg packages: String): List<ComposablePreview<T>>

  fun test(
    preview: ComposablePreview<T>,
  )
}

What's Changed

  • Rename ComposePreviewRobolectricTest to ComposePreviewTester to support custom Preview annotation tests in Experimental Compose Preview Support by @takahirom in #438
  • [Idea Plugin]Adjust some idea plugin behaviors by @takahirom in #431 We haven't released this feature yet. Stay tuned!

Full Changelog: 1.22.2...1.23.0

1.22.2

15 Jul 06:38
f546728
Compare
Choose a tag to compare

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

  • Refactor Roborazzi integration tests to support multiple modules by @takahirom in #434
  • Fix warning of RoborazziPreviewParameterizedTests by @takahirom in #436
  • Fix GenerateRobolectricComposePreviewTests to support KMP by @takahirom in #435

Full Changelog: 1.22.1...1.22.2

1.22.1

14 Jul 08:29
7443acf
Compare
Choose a tag to compare

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

  • [Roborazzi Idea Plugin] Generate Roborazzi images via its IntelliJ Plugin by @eyedol in #429 (We will address this topic in a future release)
  • [Bug fixes] Fix assertions in Automated Test Generation for Experimental Compose Preview Support by @takahirom in #432

Full Changelog: 1.22.0...1.22.1

1.22.0

13 Jul 11:27
179fc12
Compare
Choose a tag to compare

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

  • Automated Test Generation: Automatically generate screenshot tests for Composable Previews using the ComposablePreviewScanner library
  • Manual Integration Support: For those who prefer more control, we've added helper functions to manually integrate Compose Preview screenshot tests.

How to Use

To enable Compose Preview screenshot test generation, add the following to your build.gradle.kts:

roborazzi {
  generateComposePreviewRobolectricTests {
    enable = true
  }
}

After configuration, run the recordRoborazziDebug task to generate screenshots using the newly created tests.

Customization Options

Customize your setup with options like:

  • Specifying package names to scan
  • Defining a custom test class
  • Configuring Robolectric settings

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 that ComposablePreview 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.

image

What's Changed

  • [roborazzi-idea-plugin] Fix: Icons are not shown in the new UI by @takahirom in #421
  • [CI]Wait for main to succeed for compare ci by @takahirom in #422
  • [CI] Remove main push trigger from compare ci by @takahirom in #423
  • [CI] Add unit test for WebAssets class by @eyedol in #412
  • [Sample]Update dependency androidx.compose.foundation:foundation to v1.6.8 by @renovate in #340
  • [Bug fixes] Dump both content description as well as text for the case when two elements are merged by @lukas-mercari in #430
  • [Improvement] Add roborazzi-compose-preview-scanner-support module to handle preview settings by @takahirom in #427
  • [Feature] Implement generateRobolectricPreviewTests prototype by @takahirom in #416

Full Changelog: 1.21.0...1.22.0