Slider snap test draws its slider before pressing it - #210
Open
FitFocusMedia wants to merge 1 commit into
Open
FitFocusMedia wants to merge 1 commit into
FitFocusMedia wants to merge 1 commit into
Conversation
A slider cell learns its track's rectangle only when it draws. Built against the macOS 27 SDK (Xcode 27), ordering a window front no longer draws it, so the test pressed a slider that had never drawn: the snap saw a track no wider than the knob, left the value alone, and native tracking jumped it to 1.0. Drawing the window first, as a person always sees a slider before clicking it, lets the test check the snap again. 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.
Built with Xcode 27 (macOS 27 SDK),
SliderSnapTests.clickingTheTrackSnapsBeforeNativeTrackingBeginsfails every run:It passes in CI (Xcode 26.6), and the app's slider snapping is unaffected. Only the test's setup changed meaning.
Cause
A slider cell learns its track's rectangle only when it draws. Linked against the macOS 27 SDK,
makeKeyAndOrderFrontno longer draws the window right away, so the test presses a slider that has never drawn. Tracing the hook during the failing test showed:The track is no wider than the knob, so
snapValuesees no travel and returns without setting a value. Native tracking then jumps to the end (1.0). The hook itself is installed and called as intended.Fix
The test calls
window.displayIfNeeded()before pressing, as a person always sees a slider before clicking it. The app code is unchanged.Verification
On macOS 26.6.2, Apple silicon, Xcode 27.0 (27A266a):
FloatingPanelTests+SliderSnapTestsrun serially: 7/7 pass, three runs in a row (failed every time before).CompositorTestsin parallel: 510/510 pass.I haven't run it under Xcode 26.6 locally. Drawing an already ordered-front window should be harmless there, and this PR's CI covers it.
🤖 Generated with Claude Code