Wedemy / eggeum-android

나에게 맞는 카페 찾기, 이끔
MIT License
12 stars 0 forks source link

Update test.roborazzi to v1.6.0 #134

Closed renovate[bot] closed 1 year ago

renovate[bot] commented 1 year ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
io.github.takahirom.roborazzi 1.5.0 -> 1.6.0 age adoption passing confidence
io.github.takahirom.roborazzi:roborazzi-junit-rule 1.5.0 -> 1.6.0 age adoption passing confidence
io.github.takahirom.roborazzi:roborazzi 1.5.0 -> 1.6.0 age adoption passing confidence

Release Notes

takahirom/roborazzi (io.github.takahirom.roborazzi) ### [`v1.6.0`](https://togithub.com/takahirom/roborazzi/releases/tag/1.6.0) [Compare Source](https://togithub.com/takahirom/roborazzi/compare/1.5.0...1.6.0) ##### Experimental feature: Compose Desktop support Roborazzi supports Compose Desktop. You can use Roborazzi with Compose Desktop as follows: Gradle settings ```kotlin plugins { kotlin("multiplatform") id("org.jetbrains.compose") id("io.github.takahirom.roborazzi") } kotlin { // You can use your source set name jvm("desktop") sourceSets { ... val desktopTest by getting { dependencies { implementation(project("io.github.takahirom.roborazzi:roborazzi-compose-desktop:[1.6.0-alpha-2 or higher]")) implementation(kotlin("test")) } } ... // Roborazzi Desktop support uses Context Receivers tasks.withType().configureEach { kotlinOptions { freeCompilerArgs += "-Xcontext-receivers" } } ``` Test target Composable function ```kotlin @​Composable fun App() { var text by remember { mutableStateOf("Hello, World!") } MaterialTheme { Button( modifier = Modifier.testTag("button"), onClick = { text = "Hello, Desktop!" }) { Text( style = MaterialTheme.typography.h2, text = text ) } } } ``` Test with Roborazzi ```kotlin class MainKmpTest { @​OptIn(ExperimentalTestApi::class) @​Test fun test() = runDesktopComposeUiTest { setContent { App() } val roborazziOptions = RoborazziOptions( recordOptions = RoborazziOptions.RecordOptions( resizeScale = 0.5 ), compareOptions = RoborazziOptions.CompareOptions( changeThreshold = 0F ) ) onRoot().captureRoboImage(roborazziOptions = roborazziOptions) onNodeWithTag("button").performClick() onRoot().captureRoboImage(roborazziOptions = roborazziOptions) } } ``` Then, you can run the Gradle tasks for Desktop Support, just like you do for Android Support. ./gradlew recordRoborazzi[SourceSet] ./gradlew recordRoborazziDesktop ./gradlew compareRoborazziDesktop ./gradlew verifyRoborazziDesktop ... If you use the Kotlin JVM plugin, the task will be `recordRoborazzi**Jvm**`. The sample image module/build/outputs/roborazzi/com.\[package].MainKmpTest.test.png ![MainJvmTest test](https://togithub.com/takahirom/roborazzi/assets/1386930/41287c29-26ae-4539-b387-de570ae3f2b3) module/build/outputs/roborazzi/com.\[package].MainKmpTest.test\_2.png ![MainJvmTest test\_2](https://togithub.com/takahirom/roborazzi/assets/1386930/2edc828c-6fd8-4a9a-8f3d-b0e7baa85f0d) ##### Update Library Versions We had to use [`targetHierarchy.custom`](https://kotlinlang.org/docs/multiplatform-hierarchy.html#adjust-the-resulting-hierarchy) to create common JVM source sets between Android and JVM. Therefore, Roborazzi has updated Kotlin from version 1.7.20 to 1.8.22. ##### What's Changed - Experimental desktop by [@​takahirom](https://togithub.com/takahirom) in [https://github.com/takahirom/roborazzi/pull/137](https://togithub.com/takahirom/roborazzi/pull/137) - Supports KMP plugin by [@​takahirom](https://togithub.com/takahirom) in [https://github.com/takahirom/roborazzi/pull/138](https://togithub.com/takahirom/roborazzi/pull/138) - Fix the issue where Roborazzi changes the timing of the configuration by [@​takahirom](https://togithub.com/takahirom) in [https://github.com/takahirom/roborazzi/pull/141](https://togithub.com/takahirom/roborazzi/pull/141) **Full Changelog**: https://github.com/takahirom/roborazzi/compare/1.5.0...1.6.0

Configuration

📅 Schedule: Branch creation - "before 4am" in timezone Asia/Seoul, 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.



This PR has been generated by Mend Renovate. View repository job log here.

height[bot] commented 1 year ago

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.