-
Notifications
You must be signed in to change notification settings - Fork 41
Rename ComposePreviewRobolectricTest to ComposePreviewTester to support custom Preview annotation tests in Experimental Compose Preview Support #438
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
Merged
takahirom
merged 5 commits into
main
from
takahirom/support-multiplatform-preview/2024-07-16
Jul 18, 2024
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54636a3
to
05fcb01
Compare
…rt custom Preview annotation tests in Experimental Compose Preview Support
05fcb01
to
9f0a6c8
Compare
chrisbanes
referenced
this pull request
in chrisbanes/haze
Jul 19, 2024
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.github.takahirom.roborazzi](https://togithub.com/takahirom/roborazzi) | `1.22.2` -> `1.23.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [io.github.takahirom.roborazzi:roborazzi-junit-rule](https://togithub.com/takahirom/roborazzi) | `1.22.2` -> `1.23.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [io.github.takahirom.roborazzi:roborazzi-compose-desktop](https://togithub.com/takahirom/roborazzi) | `1.22.2` -> `1.23.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [io.github.takahirom.roborazzi:roborazzi-compose](https://togithub.com/takahirom/roborazzi) | `1.22.2` -> `1.23.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [io.github.takahirom.roborazzi:roborazzi](https://togithub.com/takahirom/roborazzi) | `1.22.2` -> `1.23.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>takahirom/roborazzi (io.github.takahirom.roborazzi)</summary> ### [`v1.23.0`](https://togithub.com/takahirom/roborazzi/releases/tag/1.23.0) [Compare Source](https://togithub.com/takahirom/roborazzi/compare/1.22.2...1.23.0) ### Breaking Changes to `roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName` Gradle Extension We released `roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName` in the previous release `1.22.0`, allowing customization of preview test behavior. We have since discovered that the interface of RobolectricPreviewTest cannot adapt to Compose Multiplatform Preview because RobolectricPreviewTest uses `AndroidPreviewInfo` from [ComposablePreviewScanner](https://togithub.com/sergio-sastre/ComposablePreviewScanner), which represents Android Compose Preview. To address this, we have added a generic parameter to handle the annotation and renamed RobolectricPreviewTest to ComposePreviewTester. The Gradle extension property has been renamed: `roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName` -> `roborazzi.generateComposePreviewRobolectricTests.testerQualifiedClassName` Old interface: ```kotlin interface RobolectricPreviewTest { fun previews(vararg packages: String): List<ComposablePreview<AndroidPreviewInfo>> fun test( preview: ComposablePreview<AndroidPreviewInfo>, ) } ``` New interface: ```kotlin interface ComposePreviewTester<T : Any> { fun previews(vararg packages: String): List<ComposablePreview<T>> fun test( preview: ComposablePreview<T>, ) } ``` #### What's Changed - Rename ComposePreviewRobolectricTest to ComposePreviewTester to support custom Preview annotation tests in Experimental Compose Preview Support by [@​takahirom](https://togithub.com/takahirom) in [https://github.com/takahirom/roborazzi/pull/438](https://togithub.com/takahirom/roborazzi/pull/438) - \[Idea Plugin]Adjust some idea plugin behaviors by [@​takahirom](https://togithub.com/takahirom) in [https://github.com/takahirom/roborazzi/pull/431](https://togithub.com/takahirom/roborazzi/pull/431) We haven't released this feature yet. Stay tuned! **Full Changelog**: takahirom/roborazzi@1.22.2...1.23.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **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 [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/chrisbanes/haze). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjQzMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
github-merge-queue bot
referenced
this pull request
in slackhq/circuit
Jul 19, 2024
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [io.github.takahirom.roborazzi](https://togithub.com/takahirom/roborazzi) | plugin | minor | `1.22.2` -> `1.23.0` | | [io.github.takahirom.roborazzi:roborazzi-junit-rule](https://togithub.com/takahirom/roborazzi) | dependencies | minor | `1.22.2` -> `1.23.0` | | [io.github.takahirom.roborazzi:roborazzi-compose](https://togithub.com/takahirom/roborazzi) | dependencies | minor | `1.22.2` -> `1.23.0` | | [io.github.takahirom.roborazzi:roborazzi](https://togithub.com/takahirom/roborazzi) | dependencies | minor | `1.22.2` -> `1.23.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.23.0`](https://togithub.com/takahirom/roborazzi/releases/tag/1.23.0) [Compare Source](https://togithub.com/takahirom/roborazzi/compare/1.22.2...1.23.0) ##### Breaking Changes to `roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName` Gradle Extension We released `roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName` in the previous release `1.22.0`, allowing customization of preview test behavior. We have since discovered that the interface of RobolectricPreviewTest cannot adapt to Compose Multiplatform Preview because RobolectricPreviewTest uses `AndroidPreviewInfo` from [ComposablePreviewScanner](https://togithub.com/sergio-sastre/ComposablePreviewScanner), which represents Android Compose Preview. To address this, we have added a generic parameter to handle the annotation and renamed RobolectricPreviewTest to ComposePreviewTester. The Gradle extension property has been renamed: `roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName` -> `roborazzi.generateComposePreviewRobolectricTests.testerQualifiedClassName` Old interface: ```kotlin interface RobolectricPreviewTest { fun previews(vararg packages: String): List<ComposablePreview<AndroidPreviewInfo>> fun test( preview: ComposablePreview<AndroidPreviewInfo>, ) } ``` New interface: ```kotlin interface ComposePreviewTester<T : Any> { fun previews(vararg packages: String): List<ComposablePreview<T>> fun test( preview: ComposablePreview<T>, ) } ``` ##### What's Changed - Rename ComposePreviewRobolectricTest to ComposePreviewTester to support custom Preview annotation tests in Experimental Compose Preview Support by [@​takahirom](https://togithub.com/takahirom) in [https://github.com/takahirom/roborazzi/pull/438](https://togithub.com/takahirom/roborazzi/pull/438) - \[Idea Plugin]Adjust some idea plugin behaviors by [@​takahirom](https://togithub.com/takahirom) in [https://github.com/takahirom/roborazzi/pull/431](https://togithub.com/takahirom/roborazzi/pull/431) We haven't released this feature yet. Stay tuned! **Full Changelog**: takahirom/roborazzi@1.22.2...1.23.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:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjQzMy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.