Repository navigation
fix: measure the iOS viewport again when a Safari tip takes the native tap - #1307
Merged
Merged
Conversation
…e tap On the first Safari start of a new iOS 26 simulator, a Safari tip takes the native tap of the viewport measurement, so the overlay reports 0x0. The empty viewport made full page screenshots fail with a negative scroll position. Check the overlay data on iOS too and measure again (3 attempts). Replace the unit test that expected the 0x0 result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 581e878 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
plum117
marked this pull request as ready for review
October 9, 2026 15:04
|
This was referenced Oct 9, 2026
plum117
added a commit
that referenced
this pull request
Oct 9, 2026
#1307 is a fix that users can notice, but it did not update the guide. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
On the first Safari start of a new iOS simulator (the normal case in CI), every full page screenshot of the session fails:
The error log shows that the cause is earlier: the measured viewport is empty.
Root cause.
getMobileViewPortPosition()loads a test page with an overlay and makes a native tap in the center of the screen; the overlay stores where the tap landed. On the first Safari start, iOS 26 shows a tip ("View Bookmarks, Share Menu, and Open Tabs"). The tap only closes that tip and never reaches the overlay, so the overlay reports0x0. Debug screenshots of the measurement: the tip is on the screen before the tap, and gone after it. On Android the function already checks for0x0and measures again (for Chrome's Start Surface). On iOS it made 1 attempt with no check, and a unit test even expected the0x0result.The device rectangles are measured once per session, so all full page checks of that session fail. The next sessions work, because the tip does not come back.
What
packages/image-comparison-core/src/helpers/utils.ts: the0x0check now applies to iOS too, with up to 3 attempts (MAX_IOS_VIEWPORT_MEASUREMENT_ATTEMPTS). On iOS nothing is needed between attempts: the first tap already closed the tip. The Android flow (Back button between attempts) does not change. The warning and the final error now name the cause for each platform.0x0result on iOS is replaced by 2 tests: a second attempt that succeeds, and all 3 attempts failing (initial device rectangles + error log). Both fail on the old code.@wdio/image-comparison-corepatch.Test
pnpm exec vitest run packages/image-comparison-core: 791 passed.pnpm test.local.sims.webon the first boot of a new simulator:Viewport measurement attempt 1/3: overlay did not receive the native click. Safari may be showing a tip, which the tap closed, then the second attempt measures the right viewport.scheduled-testswithrefs/pull/1307/head, run 37958519730): all 5 jobs pass; the 6 iOS web sessions on LambdaTest pass (6 or 7 tests each), so the iOS flow without a tip does not change.Notes (not changed here)
appium:orientation: LANDSCAPEhas no effect on iOS 26.3 simulators: thetest.local.sims.websessions stay in portrait.🤖 Generated with Claude Code