1.38.0
Bugfix
Fix: Bug preventing the revival of deleted screenshot images
Thanks to @pedromfmachado's contribution, we've addressed a bug where deleted screenshot test images would be erroneously revived. Previously, when screenshot tests were removed and their corresponding images deleted from the output directory, running the record
task again would cause the Roborazzi Gradle task to recreate the removed images. While this could be temporarily resolved with roborazzi.cleanupOldScreenshots=true
, that approach was undesirable as it would also remove images when test filters were used. This was a complex issue to solve, and we extend our gratitude to @pedromfmachado for the fix.
Fix: Made screenshot dump deterministic
We have a dump feature that allows us to check the properties or hierarchy of views or composables in an image. We sorted the properties to ensure a deterministic output. Thanks to @siarhei-luskanau for this contribution.
New Feature
Feature: Added RoborazziComposeActivityThemeOption
Previously, changing the theme of RoborazziTransparentActivity
was not possible. We have now deprecated RoborazziTransparentActivity
and renamed it to RoborazziActivity
. Additionally, we added RoborazziComposeActivityThemeOption
to enable changing the Activity's theme. Thank you again, @pedromfmachado, for this feature.
You can now change the Activity theme like this:
@OptIn(ExperimentalRoborazziApi::class)
@Test
fun whenNonTransparentThemeItShouldHaveNonTransparentBackground() {
captureRoboImage(
roborazziComposeOptions = RoborazziComposeOptions {
activityTheme(android.R.style.Theme_Material_Light)
}
) {
Text("This composable function should NOT have transparent background!")
}
}
What's Changed
- Sort key order of ComposePrintToString to stabilize output in Dump screenshots. by @siarhei-luskanau in #611
- Added RoborazziComposeActivityThemeOption by @pedromfmachado in #612
- [Code Style] Add JetCodeStyleSettings to codestyle setting by @takahirom in #614
- Removing files from intermediate dir to prevent old screenshots from reappearing by @pedromfmachado in #616
- Rename theme() to activityTheme() by @takahirom in #617
New Contributors
- @pedromfmachado made their first contribution in #612
Full Changelog: 1.37.0...1.38.0