Repository navigation
fix: hide the hideAfterFirstScroll elements before the full page scroll wait - #1315
Merged
plum117 merged 1 commit intoOct 10, 2026
Merged
Conversation
…ll wait The elements were hidden after the fullPageScrollTimeout wait, just before the screenshot, so nothing waited for the page to be drawn again without them. On a slow CI iOS simulator, the second part of a full page image still showed the sticky header (0.413 % mismatch). Hide them before the wait in the 3 full page functions (mobile native web, Android ChromeDriver, desktop). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 8aa088b 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 10, 2026 00:00
|
This was referenced Oct 10, 2026
plum117
added a commit
that referenced
this pull request
Oct 10, 2026
A check of the 30 changesets against the v11 guide found 4 user-visible changes that the guide did not list: the Jasmine `expect.extend()` path (#1332), the warning for Android browser sessions in BiDi (#1314), `hideAfterFirstScroll` before the wait (#1315) and the clear error for a mobile full page screenshot without a viewport (#1334). Also the reporter no longer publishes the generated route types (#1304), and the report UI uses React Router 8. 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
Found with the new iOS simulator CI job (#1310): the full page check "with ignore elements" failed with 0.413 % in the compare run. The test hides the sticky top bar after the first scroll (
hideAfterFirstScroll: [$('nav.navbar')]). In the baseline the bar was hidden in the second part of the full page image; in the failing image it was still there (rows 2106–2346, exactly at the top of the second viewport screenshot).Cause: in all 3 full page functions the order was: scroll → wait
fullPageScrollTimeout→ hide the elements → take the screenshot immediately. Nothing waited between hiding and the screenshot, so on a slow device the screenshot could come before the page was drawn again. The same 0.413 % failure happened on a local iOS 26.3 simulator earlier.What
packages/image-comparison-core/src/methods/screenshots.ts: ingetMobileFullPageNativeWebScreenshotsData,getAndroidChromeDriverFullPageScreenshotsDataandgetDesktopFullPageScreenshotsData, hide thehideAfterFirstScrollelements before the wait, so the page has the whole wait to be drawn again. The wait is still before the screenshot, so lazy loading keeps the same time.hideAfterFirstScrolltests also checks the order (the hide call runs after the first wait and before the wait of the second scroll). These checks fail without the change.@wdio/image-comparison-corepatch.Test
pnpm exec vitest run packages/image-comparison-core: 791 passed. Lint and types pass.hideAfterFirstScroll) on a real emulator.Known limit (not changed)
If
hideAfterFirstScrollgets an unresolved element ($('…')withoutawait), the browser script finds it by its selector at the moment of the call. An element that the page creates or replaces during the scroll wait (for example a header that a script adds on scroll) was found by the old order (after the wait) and is not found now. We have not seen this case; if it happens, the fix is to run the hide again after the wait as well.🤖 Generated with Claude Code