Compose screenshot tests miss layout breaks at larger font scales
A developer found that a Compose screenshot suite stayed green for months while a real app clipped a price label once a user enlarged their system font. Snapshot tools like Paparazzi and Roborazzi typically render at a default font scale of 1.0, which never exercises the larger scales Android users can select, up to 1.3x or higher on some devices. The article shows a row with a fixed-width price text that truncates a value like $1,249.00 at 1.3x while looking correct at 1.0. The suggested fix is to set the fontScale field in Paparazzi's DeviceConfig, or override LocalDensity in a plain Compose UI test, and render an extra pass at the larger scale. The author recommends auditing for fixed-width siblings beside weighted text rather than snapshotting every screen at every scale.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in