hello, I'm having issues when running `paparazzi` ...
# squarelibraries
r
hello, I'm having issues when running
paparazzi
tests using
coil
. 🧵
I'm setting
coil
like this:
Copy code
val engine = FakeImageLoaderEngine.Builder()
            .intercept(url, ColorDrawable(Color.RED))
            .default(ColorDrawable(Color.BLUE))
            .build()
        val imageLoader = ImageLoader.Builder(paparazzi.context)
            .components { add(engine) }
            .build()
        Coil.setImageLoader(imageLoader)
and
paparazzi
like this:
Copy code
@get:Rule
    val paparazzi = Paparazzi(deviceConfig = DeviceConfig.PIXEL_5)
if I run a single test, the screenshot is generated fine
however, if I have more than 1 test, only the first screenshot shows the image, but the other don't
is there a way to make paparazzi work with several tests using coil?
b
Doesn’t sound related to coil. If you take multiple shots in the same test, you need to set a name to your snapshot. If that’s one snapshot per test, it should be different.
r
Yeah. I have one screenshot per test only
b
Were you able to scope it down and confirm Coil was the difference between tests getting generated or not?
r
No. I don't know why this is happening. I only mentioned coil because is the setup I have.
Hmm. Actually, all the screenshots are created. But the image loaded with coil only shows in the first screenshot. The other screenshots are created but don't show the coil image
b
Maybe share more code? Or try to narrow down the problem
r
I'll try something else tomorrow and update with what i find
I have created this repo to reproduce the issue: https://github.com/guerrerorodrigo/paparazzicoil . I have 3 tests (which are exactly the same). When I run
./gradlew app:recordPaparazziDebug
only one screenshot shows the image, the other don't.
I tried the same with
roborazzi
, with the same
coil
configuration, and the images are generated correctly
b
The repro project is great. I’d create an issue on the Paparazzi repo directly explaining it all. Better way to get visibility
👍 1