Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update roborazzi to v1.8.0 #1134

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Update roborazzi to v1.8.0 #1134

merged 1 commit into from
Jan 22, 2024

Conversation

slack-oss-bot
Copy link
Collaborator

This PR contains the following updates:

Package Type Update Change
io.github.takahirom.roborazzi plugin minor 1.7.0 -> 1.8.0
io.github.takahirom.roborazzi:roborazzi-junit-rule dependencies minor 1.7.0 -> 1.8.0
io.github.takahirom.roborazzi:roborazzi-compose dependencies minor 1.7.0 -> 1.8.0
io.github.takahirom.roborazzi:roborazzi dependencies minor 1.7.0 -> 1.8.0

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

takahirom/roborazzi (io.github.takahirom.roborazzi)

v1.8.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.

Fix from 1.8.0-rc-1
New Feature from 1.7
Introducing the experimental roboOutputName() function

Streamline the customization of Roborazzi image file names. This utility is especially effective in parameterized tests, allowing for dynamic file naming based on test parameters. For an example of its usage, see the snippet below, which demonstrates generating screenshots before and after UI interactions.

@​Test
fun launchScreen() {
  // Generates a file named "org.your.pkg.TestClassName.launchScreen_before.png"
  onView(ViewMatchers.isRoot()).captureRoboImage("${roboOutputName()}_before.png")
  // Replace with specific actions, e.g., onView(xxx).performClick()
  
  // Generates a file named "org.your.pkg.TestClassName.launchScreen_after.png"
  onView(ViewMatchers.isRoot()).captureRoboImage("${roboOutputName()}_after.png")
}

Tailor your file naming convention in gradle.properties for even more control, such as omitting the package name.
Set roborazzi.record.namingStrategy=testClassAndMethod for a streamlined naming pattern.
Learn more: Roborazzi Documentation

Enhanced Comparison with Grid and Labels 🚀

This update introduces a new grid and label feature, making visual comparisons more intuitive and effective. The grid layout provides a structured view, while labels offer clear identification, streamlining the testing process.

You can use the old style by setting ComparisonStyle to ComparisonStyle.Simple in RoborazziOptions

  data class CompareOptions(
...
    val comparisonStyle: ComparisonStyle = ComparisonStyle.Grid(),
  ) {
    @​ExperimentalRoborazziApi
    sealed interface ComparisonStyle {
      @​ExperimentalRoborazziApi
      data class Grid(
        val bigLineSpaceDp: Int? = 16,
        val smallLineSpaceDp: Int? = 4,
        val hasLabel: Boolean = true
      ) : ComparisonStyle

      object Simple : ComparisonStyle
    }

image

Make Roborazzi's ImageComparator customizable.

You can now modify the ImageComparator using CompareOptions.imageComparator.

Behavior changes 🔧

Set the default value of CompareOptions.changeThreshold to zero. This means it will detect even a single pixel change.

What's Changed

Full Changelog: takahirom/roborazzi@1.7.0...1.8.0


Configuration

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

🚦 Automerge: Enabled.

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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@slack-oss-bot slack-oss-bot added this pull request to the merge queue Jan 22, 2024
Merged via the queue into main with commit 7a86a7e Jan 22, 2024
4 checks passed
@slack-oss-bot slack-oss-bot deleted the renovate/roborazzi branch January 22, 2024 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants