Skip to content

1.23.0

Compare
Choose a tag to compare
@takahirom takahirom released this 18 Jul 03:22
· 66 commits to main since this release
b10e3e9

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