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

Fix CaptureResultTest and Add plan test workflow #238

Merged
merged 6 commits into from Jan 3, 2024

Conversation

momomomo111
Copy link
Contributor

I checked to see if the Json conversion test was working correctly to tackle Issue #236 and found that it was not working correctly.

@takahirom
Copy link
Owner

Thanks. I didn't notice we broke the roborazzi-core tests. I added a test workflow to address this. 👀

@takahirom takahirom changed the title Fix CaptureResultTest Fix CaptureResultTest and Add plan test workflow Jan 3, 2024
@takahirom takahirom merged commit c7295ac into takahirom:main Jan 3, 2024
5 checks passed
github-merge-queue bot pushed a commit to slackhq/circuit that referenced this pull request Jan 27, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[io.github.takahirom.roborazzi](https://togithub.com/takahirom/roborazzi)
| plugin | minor | `1.8.0` -> `1.9.0` |
|
[io.github.takahirom.roborazzi:roborazzi-junit-rule](https://togithub.com/takahirom/roborazzi)
| dependencies | minor | `1.8.0` -> `1.9.0` |
|
[io.github.takahirom.roborazzi:roborazzi-compose](https://togithub.com/takahirom/roborazzi)
| dependencies | minor | `1.8.0` -> `1.9.0` |
|
[io.github.takahirom.roborazzi:roborazzi](https://togithub.com/takahirom/roborazzi)
| dependencies | minor | `1.8.0` -> `1.9.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.9.0`](https://togithub.com/takahirom/roborazzi/releases/tag/1.9.0)

[Compare
Source](https://togithub.com/takahirom/roborazzi/compare/1.8.0...1.9.0)

##### 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
#&#8203;243](https://togithub.com/takahirom/roborazzi/issues/243).

##### New Experimental Features

-   **Introduction of `captureScreenRoboImage()` Function:**
This function executes screenshot tests that include dialogs on the
screen, offering an alternative to the conventional use of Espresso's
ViewInteraction or Compose Test's SemanticsNodeInteraction
captureRoboImage(). Thank you,
[@&#8203;nelletto](https://togithub.com/nelletto), for bringing this
issue with dialog screenshots to our attention.

    *Before:*

    ```kotlin
    onRoot().captureRoboImage()
    onView(isRoot()).captureRoboImage()
    ```

    *After:*

    ```kotlin
    captureScreenRoboImage()
    ```

<img width="384" alt="image"
src="https://github.com/takahirom/roborazzi/assets/1386930/84428e4b-c7b5-40ef-9900-fccc6d4fee52">

-   **RoborazziTaskType Property:**
I developed Roborazzi to facilitate layout viewing during UI tests,
addressing the limitations in Robolectric's layout visibility.
Initially, Roborazzi couldn't support just viewing layouts during the
verification task (roborazziVerifyDebug). Hence, I've introduced a
feature allowing task type alteration during test executions.

    ```kotlin
    onView(ViewMatchers.isRoot())
      .captureRoboImage(
        roborazziOptions = RoborazziOptions(
taskType =
roborazziSystemPropertyTaskType().convertVerifyingToComparing()
        )
      )
    ```

##### Behavior Changes

-   Adjustments for Upcoming Robolectric Shadow Rendering Support:
While Robolectric is in the process of introducing technical support for
shadow rendering, Roborazzi is adapting its screenshot capture method
accordingly. We're shifting towards using the PixelCopy class more
extensively instead of relying solely on the View draw method. If you
notice any issues with this change, please report them to us. Thank you,
[@&#8203;sergio-sastre](https://togithub.com/sergio-sastre), for
highlighting the advantages of using PixelCopy.

##### Bug Fixes

-   **Fixed Potential Memory Leak:**
Addressed a memory leak issue occurring when using `compose
captureRoboImage{}` multiple times within a single test. (Thanks for
reporting this [@&#8203;vetoketju](https://togithub.com/vetoketju) )
-   **Resolved File Path Duplication:**
Corrected an issue where not specifying a file path with
`relativePathFromRoborazziContextOutputDirectory` resulted in duplicated
file paths, like
`build/output/roborazzi/build/output/roborazzi/xxxx.png`.
- Fixed a bug in window ordering for screenshots: Windows are now
accurately layered by type for more reliable and consistent screenshot
results.
- Fixed the issue where captureScreenRoboImage() failed to capture
Material3 Compose dialogs and bottom sheets.
[@&#8203;marianeum](https://togithub.com/marianeum) Thank you for
reporting this issue!
- Resolved the issue causing comparison images to enlarge when using the
scale option.

##### Others

-   **Documentation Enhancement:**
Added comprehensive documentation using Writerside, a documentation tool
from JetBrains.
    [Roborazzi Documentation](https://takahirom.github.io/roborazzi)
Thank you,
[@&#8203;timothyfroehlich](https://togithub.com/timothyfroehlich),
[@&#8203;sergio-sastre](https://togithub.com/sergio-sastre), and
[@&#8203;ZacSweers](https://togithub.com/ZacSweers), for your
suggestions regarding documentation tools.

- Thanks to [@&#8203;itochan](https://togithub.com/itochan)'s
contribution, Roborazzi has moved to a version catalog, reduced unwanted
dependencies and organized

-   Enhanced performance.

- Fix Bug Causing Comparison Image to Enlarge and Enhance Performance by
Avoiding Creation of Unnecessary Canvases

- Use ComposeTestRule interface instead of concrete
AndroidComposeTestRule class by
[@&#8203;GisoBartels](https://togithub.com/GisoBartels) in
[takahirom/roborazzi#241

-   Pass the default output directory setting from Gradle

##### What's Changed

- Fix the issue of the file path being duplicated by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#214
- \[docs]Add Roborazzi documentation using Writerside by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#216
- \[docs]Fix path of document by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#217
- \[docs]Fix writerside errors by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#218
- \[docs]Fix markdown issue by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#219
- \[docs]Fix docs ARTIFACT name by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#220
- \[docs]Add product-web-url to buildprofiles.xml by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#221
- \[docs]Tweak docs by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#222
- \[docs]Add template by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#223
- Add RoborazziTaskType property to RoborazziOptions by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#211
- Add captureScreenRoboImage for capturing screen images, including
dialogs by [@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#225
- \[docs]Fix document tag by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#226
- Add activityScenario.close() to prevent activity leak by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#228
- Fix Window Stacking Order Issue by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#230
- Migrate to version catalog by
[@&#8203;itochan](https://togithub.com/itochan) in
[takahirom/roborazzi#231
- Update dropbox differ and remove bom dependency and remove unneeded
junit dependency by [@&#8203;takahirom](https://togithub.com/takahirom)
in
[takahirom/roborazzi#234
- Update the org.json library to patch the vulnerability by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#235
- Fix CaptureResultTest and Add plan test workflow by
[@&#8203;momomomo111](https://togithub.com/momomomo111) in
[takahirom/roborazzi#238
- Use View draw method to capture for Compose Material3 by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#237
- Fix Bug Causing Comparison Image to Enlarge and Enhance Performance by
Avoiding Creation of Unnecessary Canvases by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#239
- Use ComposeTestRule interface instead of concrete
AndroidComposeTestRule class by
[@&#8203;GisoBartels](https://togithub.com/GisoBartels) in
[takahirom/roborazzi#241
- Pass the default output directory setting from Gradle by
[@&#8203;takahirom](https://togithub.com/takahirom) in
[takahirom/roborazzi#249

##### New Contributors

- [@&#8203;itochan](https://togithub.com/itochan) made their first
contribution in
[takahirom/roborazzi#231
- [@&#8203;momomomo111](https://togithub.com/momomomo111) made their
first contribution in
[takahirom/roborazzi#238
- [@&#8203;GisoBartels](https://togithub.com/GisoBartels) made their
first contribution in
[takahirom/roborazzi#241

**Full Changelog**:
takahirom/roborazzi@1.8.0...1.9.0

</details>

---

### 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.

---

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

---

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

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
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.

None yet

2 participants