test: Add screenshot tests for parent graphicsLayer rotation (#717)#889
Draft
chrisbanes wants to merge 5 commits intomainfrom
Draft
test: Add screenshot tests for parent graphicsLayer rotation (#717)#889chrisbanes wants to merge 5 commits intomainfrom
chrisbanes wants to merge 5 commits intomainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ParentRotatedContenttest composable that places bothhazeSourceandhazeEffectinside a parent withgraphicsLayer { rotationZ = ...; scaleX = 1.25f; scaleY = 1.25f }transformsparentRotationtest usingHazePositionStrategy.LocalandparentRotation_screenStrategyusingHazePositionStrategy.Screen, both exercising 0°/15°/45°/90°/180° rotation anglesparentRotationTest()helperTest plan
./gradlew :haze-screenshot-tests:verifyRoborazziJvmpasses./gradlew :haze-screenshot-tests:verifyRoborazziDebugpasses