Skip to content

Commit

Permalink
Update roborazzi to v1.38.0 (#1868)
Browse files Browse the repository at this point in the history
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[io.github.takahirom.roborazzi](https://redirect.github.com/takahirom/roborazzi)
| plugin | minor | `1.37.0` -> `1.38.0` |
|
[io.github.takahirom.roborazzi:roborazzi-junit-rule](https://redirect.github.com/takahirom/roborazzi)
| dependencies | minor | `1.37.0` -> `1.38.0` |
|
[io.github.takahirom.roborazzi:roborazzi-compose](https://redirect.github.com/takahirom/roborazzi)
| dependencies | minor | `1.37.0` -> `1.38.0` |
|
[io.github.takahirom.roborazzi:roborazzi](https://redirect.github.com/takahirom/roborazzi)
| dependencies | minor | `1.37.0` -> `1.38.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>takahirom/roborazzi (io.github.takahirom.roborazzi)</summary>

###
[`v1.38.0`](https://redirect.github.com/takahirom/roborazzi/releases/tag/1.38.0)

[Compare
Source](https://redirect.github.com/takahirom/roborazzi/compare/1.37.0...1.38.0)

##### Bugfix

##### Fix: Bug preventing the revival of deleted screenshot images

Thanks to
[@&#8203;pedromfmachado](https://redirect.github.com/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
[@&#8203;pedromfmachado](https://redirect.github.com/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
[@&#8203;siarhei-luskanau](https://redirect.github.com/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,
[@&#8203;pedromfmachado](https://redirect.github.com/pedromfmachado),
for this feature.

You can now change the Activity theme like this:

```kotlin
 @&#8203;OptIn(ExperimentalRoborazziApi::class)
 @&#8203;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
[@&#8203;siarhei-luskanau](https://redirect.github.com/siarhei-luskanau)
in
[https://github.com/takahirom/roborazzi/pull/611](https://redirect.github.com/takahirom/roborazzi/pull/611)
- Added RoborazziComposeActivityThemeOption by
[@&#8203;pedromfmachado](https://redirect.github.com/pedromfmachado) in
[https://github.com/takahirom/roborazzi/pull/612](https://redirect.github.com/takahirom/roborazzi/pull/612)
- \[Code Style] Add JetCodeStyleSettings to codestyle setting by
[@&#8203;takahirom](https://redirect.github.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/614](https://redirect.github.com/takahirom/roborazzi/pull/614)
- Removing files from intermediate dir to prevent old screenshots from
reappearing by
[@&#8203;pedromfmachado](https://redirect.github.com/pedromfmachado) in
[https://github.com/takahirom/roborazzi/pull/616](https://redirect.github.com/takahirom/roborazzi/pull/616)
- Rename theme() to activityTheme() by
[@&#8203;takahirom](https://redirect.github.com/takahirom) in
[https://github.com/takahirom/roborazzi/pull/617](https://redirect.github.com/takahirom/roborazzi/pull/617)

##### New Contributors

- [@&#8203;pedromfmachado](https://redirect.github.com/pedromfmachado)
made their first contribution in
[https://github.com/takahirom/roborazzi/pull/612](https://redirect.github.com/takahirom/roborazzi/pull/612)

**Full Changelog**:
takahirom/roborazzi@1.37.0...1.38.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS44Mi42IiwidXBkYXRlZEluVmVyIjoiMzkuODIuNiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: Josh Stagg <jstagg@slack-corp.com>
  • Loading branch information
slack-oss-bot and stagg authored Jan 3, 2025
1 parent 51dbd95 commit 6b3a1aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ okio = "3.9.1"
paparazzi = "1.3.5"
picnic = "0.7.0"
robolectric = "4.14.1"
roborazzi = "1.37.0"
roborazzi = "1.38.0"
skie = "0.10.0"
spotless = "7.0.0.BETA4"
sqldelight = "2.0.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import androidx.compose.ui.test.junit4.createAndroidComposeRule
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.onRoot
import coil.annotation.ExperimentalCoilApi
import com.github.takahirom.roborazzi.RoborazziActivity
import com.github.takahirom.roborazzi.RoborazziRule
import com.github.takahirom.roborazzi.RoborazziTransparentActivity
import com.github.takahirom.roborazzi.captureRoboImage
import com.slack.circuit.sample.coil.test.CoilRule
import com.slack.circuit.sharedelements.PreviewSharedElementTransitionLayout
Expand Down Expand Up @@ -60,7 +60,7 @@ class PetListSnapshotTest(private val useDarkMode: Boolean) {
fun data() = listOf(true, false)
}

@get:Rule val composeTestRule = createAndroidComposeRule<RoborazziTransparentActivity>()
@get:Rule val composeTestRule = createAndroidComposeRule<RoborazziActivity>()

@get:Rule
val roborazziRule =
Expand Down

0 comments on commit 6b3a1aa

Please sign in to comment.