Open sergio-sastre opened 6 months ago
@sergio-sastre The reason is today Paparazzi does not support translatable
attribute for string resource, as per comment here.
In your case, it is using <string name="mtrl_checkbox_button_path_unchecked" translatable="false">M23,7H9C7.9,7,7,7.9,7,9v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V9C25,7.9,24.1,7,23,7z M23,23H9V9h14V23z</string>
from Material Components library. The actual path actually gets pseudo localised, which makes it a invalid format.
cc @jrodbx
Description When running a test with locale = "en-rXA", in an Android View containing a custom View, the test throws app.cash.paparazzi.internal.PaparazziLogger$MultipleFailuresException: There were 3 errors:
java.lang.IllegalArgumentException: Float format error when parsing: Ḿ23,7Ĥ9Ç7.9,7,7,7.9,7,9[ is not a valid verb. Failure occurred at position 0 of path: [Ḿ23,7Ĥ9Ç7.9,7,7,7.9,7,9V14ç0,1.1,0.9,2,2,2ĥ14ç1.1,0,2-0.9,2-2ν9Ç25,7.9,24.1,7,23,7ž Ḿ23,23Ĥ9ν9ĥ14ν23ž one two three four five six seven eight nine ten eleven]...
android.content.res.Resources$NotFoundException: Could not find drawable resource matching value 0x7F0800B1 (resolved name: mtrl_ic_checkbox_checked) in current configuration...
android.view.InflateException: Binary XML file line # 20: Error inflating class com.example.road.to.effective.snapshot.testing.recyclerviewscreen.ui.views.LanguageRadioButton...
Steps to Reproduce The example to reproduce the bug can be found here Repo: https://github.com/sergio-sastre/Android-screenshot-testing-playground Branch: bug/pseudolocale_exception Module: recyclerviewscreen:paparazzi The test class is this one
Expected behavior The test would execute normally as it does with non-pseudolocales
Additional information:
And...
It only happens with pseudolocales "en-rXA" and "ar-rXB". it works perfectly with non-pseudolocales
I've successfully run pseudolocalization tests with other Views. Therefore, I believe the error has to do with the CustomView "LanguageRadioButton".
I've also found no issues with Jetpack Compose.
I've been able to run the very same pseudolocalization test with Roborazzi, Shot, Dropshots without issues.