-
Notifications
You must be signed in to change notification settings - Fork 46
Bump Roborazzi + QuickEditorBottomSheetTest #662
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
Conversation
Those tests don't verify the content, just the BottomSheet.
📲 You can test the changes from this Pull Request in Gravatar Demo by scanning the QR code below to install the corresponding build.
|
|
|
||
| fun screenshotTest(composable: @Composable () -> Unit) { | ||
| captureRoboImage { | ||
| composeRule.setContent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to continue using the fun captureRoboImage function. Look like the library does something different 🤷♂️
| <?xml version="1.0" encoding="utf-8"?> | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
|
||
| <application android:theme="@android:style/Theme.Material.NoActionBar" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build environment changeslist! Upgraded Dependencies
com.dropbox.differ:differ:0.3.0, (changed from 0.0.2)
com.dropbox.differ:differ-jvm:0.3.0, (changed from 0.0.2)
io.github.takahirom.roborazzi:io.github.takahirom.roborazzi.gradle.plugin:1.44.0, (changed from 1.26.0)
io.github.takahirom.roborazzi:roborazzi-core:1.44.0, (changed from 1.26.0)
io.github.takahirom.roborazzi:roborazzi-core-jvm:1.44.0, (changed from 1.26.0)
io.github.takahirom.roborazzi:roborazzi-gradle-plugin:1.44.0, (changed from 1.26.0)
org.webjars:webjars-locator-lite:0.0.6, (changed from 0.0.4)tree-\--- io.github.takahirom.roborazzi:io.github.takahirom.roborazzi.gradle.plugin:1.26.0
- \--- io.github.takahirom.roborazzi:roborazzi-gradle-plugin:1.26.0
- +--- io.github.takahirom.roborazzi:roborazzi-core:1.26.0
- | \--- io.github.takahirom.roborazzi:roborazzi-core-jvm:1.26.0
- | +--- com.dropbox.differ:differ:0.0.2
- | | \--- com.dropbox.differ:differ-jvm:0.0.2
- | | +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10 -> 2.0.21 (*)
- | | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 2.1.0 (*)
- | +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 -> 2.0.21 (*)
- | +--- org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3
- | | \--- org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.6.3
- | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 -> 2.0.21 (*)
- | | +--- org.jetbrains.kotlinx:kotlinx-serialization-bom:1.6.3
- | | | +--- org.jetbrains.kotlinx:kotlinx-serialization-core:1.6.3 (c)
- | | | +--- org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.6.3 (c)
- | | | +--- org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3 (c)
- | | | \--- org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.6.3 (c)
- | | +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.22 -> 2.0.21 (*)
- | | \--- org.jetbrains.kotlinx:kotlinx-serialization-core:1.6.3
- | | \--- org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.6.3
- | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 -> 2.0.21 (*)
- | | +--- org.jetbrains.kotlinx:kotlinx-serialization-bom:1.6.3 (*)
- | | \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.22 -> 2.0.21 (*)
- | \--- org.jetbrains.kotlinx:kotlinx-io-core:0.3.3
- | \--- org.jetbrains.kotlinx:kotlinx-io-core-jvm:0.3.3
- | +--- org.jetbrains.kotlinx:kotlinx-io-bytestring:0.3.3
- | | \--- org.jetbrains.kotlinx:kotlinx-io-bytestring-jvm:0.3.3
- | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 -> 2.0.21 (*)
- | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 -> 2.0.21 (*)
- +--- org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3 (*)
- +--- org.webjars:webjars-locator-lite:0.0.4
- | \--- org.jspecify:jspecify:0.3.0
- +--- org.webjars:materializecss:1.0.0
- +--- org.webjars:material-design-icons:4.0.0
- \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 -> 2.0.21 (*)
+\--- io.github.takahirom.roborazzi:io.github.takahirom.roborazzi.gradle.plugin:1.44.0
+ \--- io.github.takahirom.roborazzi:roborazzi-gradle-plugin:1.44.0
+ +--- io.github.takahirom.roborazzi:roborazzi-core:1.44.0
+ | \--- io.github.takahirom.roborazzi:roborazzi-core-jvm:1.44.0
+ | +--- com.dropbox.differ:differ:0.3.0
+ | | \--- com.dropbox.differ:differ-jvm:0.3.0
+ | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 -> 2.0.21 (*)
+ | +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 -> 2.0.21 (*)
+ | +--- org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3
+ | | \--- org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.6.3
+ | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 -> 2.0.21 (*)
+ | | +--- org.jetbrains.kotlinx:kotlinx-serialization-bom:1.6.3
+ | | | +--- org.jetbrains.kotlinx:kotlinx-serialization-core:1.6.3 (c)
+ | | | +--- org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.6.3 (c)
+ | | | +--- org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3 (c)
+ | | | \--- org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.6.3 (c)
+ | | +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.22 -> 2.0.21 (*)
+ | | \--- org.jetbrains.kotlinx:kotlinx-serialization-core:1.6.3
+ | | \--- org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.6.3
+ | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 -> 2.0.21 (*)
+ | | +--- org.jetbrains.kotlinx:kotlinx-serialization-bom:1.6.3 (*)
+ | | \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.22 -> 2.0.21 (*)
+ | \--- org.jetbrains.kotlinx:kotlinx-io-core:0.3.3
+ | \--- org.jetbrains.kotlinx:kotlinx-io-core-jvm:0.3.3
+ | +--- org.jetbrains.kotlinx:kotlinx-io-bytestring:0.3.3
+ | | \--- org.jetbrains.kotlinx:kotlinx-io-bytestring-jvm:0.3.3
+ | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 -> 2.0.21 (*)
+ | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 -> 2.0.21 (*)
+ +--- org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3 (*)
+ +--- org.webjars:webjars-locator-lite:0.0.6
+ | \--- org.jspecify:jspecify:0.3.0
+ +--- org.webjars:materializecss:1.0.0
+ +--- org.webjars:material-design-icons:4.0.0
+ \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 -> 2.0.21 (*) |
AdamGrzybkowski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one suggestion, but other than the LGTM!
| colorScheme = GravatarUiMode.LIGHT, | ||
| modalBottomSheetState = rememberModalBottomSheetState(modalDetents().initialDetent), | ||
| ) { | ||
| Text("Gravatar Quick Editor Bottom Sheet") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Text("Gravatar Quick Editor Bottom Sheet") | |
| AvatarPicker( | |
| uiState = AvatarPickerUiState( | |
| email = Email("[email protected]"), | |
| avatarPickerContentLayout = AvatarPickerContentLayout.Horizontal, | |
| emailAvatars = EmailAvatars( | |
| avatars = listOf( | |
| Avatar { | |
| imageUrl = URI.create("https://gravatar.com/avatar/test") | |
| imageId = "1" | |
| rating = Avatar.Rating.G | |
| altText = "alt" | |
| updatedDate = "" | |
| }, | |
| Avatar { | |
| imageUrl = URI.create("https://gravatar.com/avatar/test2") | |
| imageId = "2" | |
| rating = Avatar.Rating.G | |
| altText = "alt" | |
| updatedDate = "" | |
| }, | |
| ), | |
| selectedAvatarId = "1", | |
| ), | |
| ), | |
| onEvent = { }, |
⛏️ We could add the AvatarPicker here for a nicer screenshot that's closer to reality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! Done! 👍

Description
As mentioned here, we need to update the Roborazzi version to add some screenshot tests for the BottomSheet.
This PR bumps the version to the last stable. After that, I need to record all the screenshots again; in the majority of them, the difference is just a few pixels. (I guess there is some change about how they renderize the composables or how they create the screenshot).
In others, the entire composable is now visible.
Last commit also added a couple of tests to verify the QuickEditorBottomSheet, but only the BottomSheet, not the context.
Testing Steps