Repository navigation
example: Resize screen + e2e test for width/height (all capture strategies) - #731
Merged
Merged
Conversation
New "Resize" screen (Rendering correctness) captures a four-quadrant view with the default strategy and with useRenderInContext, at natural size, 100x50 and 400x200. Each capture is decoded with Skia and its quadrant colors and aspect ratio are checked in-app (PASS/FAIL per case), so a cropped or padded capture is caught on any platform. e2e/tests/resize.test.js asserts every case reports PASS. It navigates with swipes, as viewshot-all-screens does, since Detox scroll fails on the home ScrollView on iOS. Covers the iOS useRenderInContext crop/pad bug fixed by #730. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gre
marked this pull request as ready for review
October 24, 2026 10:58
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.
Follow-up to #730: adds example + e2e coverage so
width/heightresizing is checked for every capture strategy, on every platform.What
useRenderInContext, each at natural size, 100×50 and 400×200.result: 'base64') is decoded with Skia, already a dependency of the example. The screen samples the centre of each quadrant and checks the aspect ratio, then shows PASS/FAIL per case plus anALL PASS/SOME FAILEDsummary. A cropped (smaller size) or padded (larger size) capture fails.example/e2e/tests/resize.test.jsopens the screen, taps capture and asserts every case showsPASS.Verified locally
ric-smaller(top-left quadrant only);ric-largeris paddeduseRenderInContextis iOS-only and ignored)Notes
readPixelsreturns the raw bytes (pure green reads aboutrgb(117,252,76)), so colours are matched to the nearest quadrant colour instead of exact thresholds.viewshot-all-screens. The sharedscrollToElementhelper fails on the home ScrollView on iOS ("not scrollable at the given start point"), which is also whystyle-filtersandsnapshot-content-containercurrently fail in the (non-blocking) iOS Detox job.width/heightas pixels (100×50 → 100×50 px), iOS as points (100×50 → 300×150 px at 3x). The screen checks the aspect ratio, so it passes on both.🤖 Generated with Claude Code