takahirom / roborazzi

Make JVM Android integration test visible 🤖📸
https://takahirom.github.io/roborazzi/
Apache License 2.0
649 stars 24 forks source link

Screenshots are displayed weirdly after migrating to Type-Safety Compose Navigation #408

Closed JackEblan closed 2 weeks ago

JackEblan commented 2 weeks ago

Hi @takahirom, My screenshot images became like these after migrating to Type-Safety Compose Navigation. My layouts are fine in my app.

e.g: BEFORE AppSettingsScreenPopulated_foldable (1)

AFTER AppSettingsScreenPopulated_foldable

takahirom commented 2 weeks ago

Thanks. Do you have a code diff? You can use the dump option of RoborazziOptions to debug.

takahirom commented 2 weeks ago

I've cloned your repository and debugging the tests 👀

takahirom commented 2 weeks ago

@JackEblan I updated the Robolectric's version and it seems fixed 👀

takahirom commented 2 weeks ago

Please wait we might have to add it.systemProperties["robolectric.pixelCopyRenderMode"] = "hardware" as well

    testOptions {
        unitTests {
            // For Robolectric
            isIncludeAndroidResources = true

            isReturnDefaultValues = true
            all {
                it.systemProperties["robolectric.pixelCopyRenderMode"] = "hardware"
            }
        }
takahirom commented 2 weeks ago

I have submitted a pull request for this: https://github.com/JackEblan/Geto/pull/164

I believe the issue is fixed now. Could you please review it? For information on robolectric.pixelCopyRenderMode, you can refer to this link: https://github.com/takahirom/roborazzi/issues/296

takahirom commented 2 weeks ago

Please wait for the screenshots to be updated. https://github.com/takahirom/Geto/pull/1