cashapp / paparazzi

Render your Android screens without a physical device or emulator
https://cashapp.github.io/paparazzi/
Apache License 2.0
2.24k stars 213 forks source link

compose bottomsheet does not screenshot #974

Open rulogarcillan opened 1 year ago

rulogarcillan commented 1 year ago

Description Take a screenshot of a bottomsheet Steps to Reproduce Add a bottomsheet in compose Expected behavior Get the screenshot of the modal

Problem The problem is that as a bottomshet to be displayed has an animation where it appears after a second, the screenshot obtained is a completely white screen

jrodbx commented 1 year ago

@rulogarcillan thanks for the issue, however it's a bit sparse. can you please provide a repro? it's hard to know if this is a byproduct of how you set up the view or a true Paparazzi bug.

xavijimenezmulet commented 5 months ago

Same here:

` class ModalBottomSheetTest : BaseScreenshotTest() {

@Test
fun testModalBottomSheet() {
    paparazzi.snapshot {
        ModalBottomSheetTestCase()
    }
}

@OptIn(ExperimentalMaterial3Api::class)
@Composable
private fun ModalBottomSheetTestCase() {
    ModalBottomSheet(
        onDismissRequest = {}
    ) {
        Text(text = "Content")
    }
}

} `

siddh1004 commented 2 months ago

I'm facing the same issue. @jrodbx are we still looking into this.

leo-beliakov commented 1 month ago

@jrodbx Any updates on this?