Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using pluralStringResource for a Paparazzi test only ever renders the first item in the plurals array #634

Closed
weverb2 opened this issue Nov 16, 2022 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@weverb2
Copy link

weverb2 commented Nov 16, 2022

Description
When rendering a label in Jetpack Compose using the pluralStringResource the first array entry in the plurals resource is always used.

Steps to Reproduce

  1. Create a label that uses pluralStringResource to show a plural string
  2. Render that label in a paparazzi snapshot with multiple different values passed in for count
  3. Observe that the recorded screenshot only ever uses the first entry in the plurals array

Expected behavior
The rendering should reflect the value passed into count for pluralStringResource

Additional information:

  • Paparazzi Version: 1.0.0
  • OS: MacOS Monterey 12.6.1
  • Compile SDK: 32
  • Gradle Version: 7.5
  • Android Gradle Plugin Version: 7.2.2
@weverb2 weverb2 added the bug Something isn't working label Nov 16, 2022
@jrodbx
Copy link
Collaborator

jrodbx commented Dec 5, 2022

Directly relates to #524, since the deprecated ValueResourceParser.startElement does not handle plural resources properly.

@jrodbx
Copy link
Collaborator

jrodbx commented Jul 6, 2023

This is fixed on master when enabling the new resource loading mechanism, tracked in #524.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants