Repository navigation
ci(e2e): wait for stable doc screenshots, strip exclude-from-example-doc lines - #4429
Merged
Merged
Conversation
…doc lines Doc screenshots are now taken once two consecutive screenshots match (status bar left out), with a 10 s cap. UserLocationUpdates is excluded from Percy as it shows a wall-clock timestamp. example-docs.ts drops lines ending with // exclude-from-example-doc and blocks between exclude-from-example-doc:start/end.
This branch was successfully deployed
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.
Description
Nightly Percy doc screenshots differ from run to run (label placement, tile timing, a wall-clock timestamp). docScreenshots.e2e.js now saves a screenshot only once two consecutive ones, 500 ms apart, match within 10 pixels, leaving out the status bar. The cap is 10 s, and on timeout it keeps the last one and logs the example. The comparison runs in a separate node process (
e2e/changedPixels.js, ~0.15 s), likecropTop.js. UserLocationUpdates getsexcludeFromPercy: truefor itsTimestamp:line, and its doc site screenshot is still taken.scripts/example-docs.tsnow drops lines ending with// exclude-from-example-doc(until now they leaked into the docs) and blocks between/* exclude-from-example-doc:start */and/* exclude-from-example-doc:end */. Both markers are documented in CONTRIBUTING.md and AGENTS.md.Checklist
CONTRIBUTING.mdyarn generatein the root folder/exampleapp./example)Screenshot OR Video
Local runs used ios.release.ci with
RNMBX_E2E_MAPS_IDLE=1on an iPhone 17 simulator, and the Percy copies were compared with pixelmatch (threshold 0.1).The generated example pages for ViewportGestures, UserLocationPadding and UserLocationUpdates no longer show the
ExampleMetadataimport, and no other page changes.