Skip to content

test: Add screenshot tests for parent graphicsLayer rotation (#717)#889

Draft
chrisbanes wants to merge 5 commits intomainfrom
agent/2d4c-brainstorm-wheth
Draft

test: Add screenshot tests for parent graphicsLayer rotation (#717)#889
chrisbanes wants to merge 5 commits intomainfrom
agent/2d4c-brainstorm-wheth

Conversation

@chrisbanes
Copy link
Copy Markdown
Owner

@chrisbanes chrisbanes commented Mar 30, 2026

Summary

  • Adds ParentRotatedContent test composable that places both hazeSource and hazeEffect inside a parent with graphicsLayer { rotationZ = ...; scaleX = 1.25f; scaleY = 1.25f } transforms
  • Adds parentRotation test using HazePositionStrategy.Local and parentRotation_screenStrategy using HazePositionStrategy.Screen, both exercising 0°/15°/45°/90°/180° rotation angles
  • Extracts shared logic into parentRotationTest() helper
  • Records golden images for JVM/Skiko and Android API 28, 32, 35

Test plan

  • ./gradlew :haze-screenshot-tests:verifyRoborazziJvm passes
  • ./gradlew :haze-screenshot-tests:verifyRoborazziDebug passes
  • Visual inspection of golden images at rotated angles shows blur correctly following parent transforms

Adds ParentRotatedContent composable and parentRotation test to verify
haze effect follows a parent's graphicsLayer rotationZ at 0/15/45/90/180
degrees. Helps validate that the positionInRoot-based offset calculation
correctly handles source+effect inside the same rotated container.
Adds a Screen position strategy variant alongside the existing Local/Auto
test so both strategies are covered for parent graphicsLayer rotation.
Also adds positionStrategy parameter to ParentRotatedContent composable.
Records Robolectric/Android golden images for both parentRotation and
parentRotation_screenStrategy tests at all rotation angles.
)

Extracts common parentRotation test logic into a shared helper that
accepts a HazePositionStrategy parameter. The Local test now explicitly
passes HazePositionStrategy.Local instead of relying on Auto default.

Also records the missing Android API 28 and 32 golden images for both
parentRotation and parentRotation_screenStrategy tests.
Applies scaleX/scaleY = 1.25f alongside rotationZ in the parent
graphicsLayer to exercise more transform combinations. Re-records
all desktop and Android golden images.
@chrisbanes chrisbanes changed the title Brainstorm whether there's any way that we can fix issue #717 (vibe-kanban) Brainstorm whether there's any way that we can fix issue Mar 30, 2026
@chrisbanes chrisbanes changed the title Brainstorm whether there's any way that we can fix issue test: Add screenshot tests for parent graphicsLayer rotation (#717) Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant