Skip to content

Conversation

@hamorillo
Copy link
Contributor

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

  • CI + Code review

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jun 11, 2025

📲 You can test the changes from this Pull Request in Gravatar Demo by scanning the QR code below to install the corresponding build.
App NameGravatar Demo
Commit85b54e3
Direct Downloadgravatar-demo-prototype-build-pr662-85b54e3.apk


fun screenshotTest(composable: @Composable () -> Unit) {
captureRoboImage {
composeRule.setContent {
Copy link
Contributor Author

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" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applying that theme to the test app, we prevent some screenshots from having the top bar:

image

@wpmobilebot
Copy link
Collaborator

Build environment changes

list
! 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 (*)

@hamorillo hamorillo marked this pull request as ready for review June 11, 2025 14:26
Copy link
Contributor

@AdamGrzybkowski AdamGrzybkowski left a 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")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good! Done! 👍

@hamorillo hamorillo merged commit ddbfbb9 into trunk Jun 12, 2025
14 checks passed
@hamorillo hamorillo deleted the hamorillo/GRA-161 branch June 12, 2025 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants