AndroidUiTestingUtils icon indicating copy to clipboard operation
AndroidUiTestingUtils copied to clipboard

Cross-Library screenshot tests executed with Roborazzi do not render shadows for Dialogs ONLY

Open sergio-sastre opened this issue 1 year ago • 0 comments

Describe the bug Even though we enable Hardware native graphics, Cross-Library screenshot tests executed with Roborazzi do not render shadows when screenshot testing dialogs. It works for Composables and Views though.

Additional context That happens because in the method snapshotDialog(), The RoborazziScreenshotTestRuleForViewuses drawToBitmap(), which uses Canvas (no elevation). The best fix for this would be to add an option in RoborazziConfig for the BitmapCaptureMethod, analogue to that of DropshotsConfig, ShotConfig and AndroidTestifyConfig, to choose whether to render with or without elevation

sergio-sastre avatar Apr 20 '24 13:04 sergio-sastre