Skip to content

Conversation

@tiwiz
Copy link
Contributor

@tiwiz tiwiz commented Nov 7, 2025

Add Roborazzi for screenshot testing and add it to the workflow

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @tiwiz, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a robust screenshot testing framework to the application, leveraging Roborazzi and Robolectric. The primary goal is to enhance UI stability by automatically detecting unintended visual changes in Compose components. This integration includes necessary build system updates, the addition of dedicated screenshot test cases, and minor refactoring of existing UI tests to support this new testing approach.

Highlights

  • Screenshot Testing Integration: The project now incorporates Roborazzi for screenshot testing, enabling visual regression checks for Compose UI components.
  • Build Configuration Updates: The app/build.gradle.kts and gradle/libs.versions.toml files have been updated to include the Roborazzi plugin, its dependencies (including Robolectric), and specific configurations for screenshot output and unit test resource inclusion.
  • New Screenshot Tests: A new ScreenshotTest.kt file has been added, containing tests that capture and compare screenshots of the HomePane composable across different device configurations (tablet and phone).
  • UI Test Refactoring: Existing UI tests in CahierListDetailTest.kt were refactored to use predefined DpSize constants and extract the HomePane content into a reusable @Composable function, improving readability and maintainability.
  • Dependency Cleanup: The gson dependency has been removed from the project's build configuration.
Ignored Files
  • Ignored by pattern: .github/workflows/** (3)
    • .github/workflows/build.yml
    • .github/workflows/screenshot_test.yml
    • .github/workflows/test.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces screenshot testing using Roborazzi, which is a valuable addition for ensuring UI consistency. The configuration and initial tests are well-structured. I've provided a few suggestions to enhance maintainability by reducing code duplication in test helpers, updating to a stable dependency version, and correcting the screenshot file paths. Overall, this is a solid implementation.

@romanofranz romanofranz merged commit d525bdd into main Nov 10, 2025
3 checks passed
@tiwiz tiwiz deleted the screenshot-testing-roborazzi branch November 10, 2025 15:34
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