Skip to content

Tests: Fix the "outside view position" test in Headless Chrome#5728

Merged
mgol merged 1 commit intojquery:mainfrom
mgol:test-outside-view-position-fix
Nov 24, 2025
Merged

Tests: Fix the "outside view position" test in Headless Chrome#5728
mgol merged 1 commit intojquery:mainfrom
mgol:test-outside-view-position-fix

Conversation

@mgol
Copy link
Member

@mgol mgol commented Nov 20, 2025

Summary

In Headless Chrome, when run locally on macOS together with a few other modules, the scroll handler for the appended element in the "outside view position" dimensions test doesn't fire, timing out the test & failing it as a result.

While the scroll handler may not fire, the new position data is available immediately, so just do the checks directly, without relying on scroll handlers.

3.x version: gh-5729

Ref gh-5729

Checklist

In Headless Chrome, when run locally on macOS together with a few other modules,
the scroll handler for the appended element in the "outside view position"
dimensions test doesn't fire, timing out the test & failing it as a result.

While the scroll handler may not fire, the new position data is available
immediately, so just do the checks directly, without relying on scroll handlers.
@mgol mgol self-assigned this Nov 20, 2025
@mgol mgol added Needs review Tests Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. labels Nov 20, 2025
@mgol mgol added this to the 4.0.0 milestone Nov 20, 2025
Copy link
Member

@timmywil timmywil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Strange that it only happens when run with other modules, but we may as well make the tests simpler.

@timmywil timmywil removed Needs review Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. labels Nov 24, 2025
@mgol mgol merged commit 23d72cb into jquery:main Nov 24, 2025
16 checks passed
@mgol mgol deleted the test-outside-view-position-fix branch November 24, 2025 17:25
mgol added a commit that referenced this pull request Nov 24, 2025
In Headless Chrome, when run locally on macOS together with a few other modules,
the scroll handler for the appended element in the "outside view position"
dimensions test doesn't fire, timing out the test & failing it as a result.

While the scroll handler may not fire, the new position data is available
immediately, so just do the checks directly, without relying on scroll handlers.

Closes gh-5729
Ref gh-5728
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants