EmergeTools / emerge-android

Android tooling & gradle plugin for Emerge's size analysis, end-to-end snapshotting, Reaper dead code detection and performance testing
https://docs.emergetools.com/docs/quickstart
Apache License 2.0
22 stars 2 forks source link

[Snapshots] Some custom device specs not rendering expected dimensions #221

Open rbro112 opened 1 month ago

rbro112 commented 1 month ago

As reported by a client:

@Preview(name = "Phone (Portrait)", device = "spec:width=390dp,height=860dp")
@Preview(name = "Phone (Landscape)", device = "spec:width=430dp,height=860dp,orientation=landscape")
@Preview(name = "Tiny Phone (Landscape)", device = "spec:width=320dp,height=812dp,orientation=landscape")
@Preview(name = "Tablet (Landscape)", device = "id:Nexus 9")
@Preview(name = "Tablet (Portrait)", device = "spec:parent=Nexus 9,orientation=portrait")

Some custom specs aren't being rendered as expected.

Expected (based on Android studio): image

Actual: image

rbro112 commented 4 weeks ago

A temporary workaround for this issue if resulting in failing snapshots is to add @IgnoreEmergeSnapshot from the snapshots-annotations dependency. Full details on ignoring snapshots can be found here.

rbro112 commented 2 weeks ago

Fix has landed for this: https://github.com/EmergeTools/emerge-android/pull/243

Will be cutting a 1.3 release soon that will address this! I'll update this issue once the new version is out.