Repository navigation
test: let the horizontal list test pass with scroll bars always shown - #415
Conversation
horizontalPopupListsScrollToTheirLastEntry expected a list that fills an 80-point popup to be 80 points tall. Where macOS always shows scroll bars, as on CI's Macs, the horizontal scroll bar takes 17 of them, so the list is 63 points tall and the test failed on main and on every pull request. The test now expects the height left above a scroll bar that is always shown.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Calculate expected document height Tests/StableBarTests/PopupClickTests.swift |
The test accounts for legacy scroller width when the popup fills its height. Otherwise, it expects a height of 20 points. The calculated value is used in the layout wait and subsequent height checks. |
Possibly related PRs
- Seb-GRAF/StableBar#410: Added the horizontal popup scrolling test whose expected height this change updates.
Severity of issue fixed: Low
Merge Risk: 
Minimal · up to adcd9
-
This test-only adjustment introduces no actionable merge-blocking risk.
Pre-merge checks: 
3
-
Full details: Description check
-
Explanation
The description includes all required sections: Problem, Changes, Testing, and Merging. It explains the macOS scroll bar failure, the test-only fix, the test commands and results, and the merge preference. It ends with the required agent and harness attribution.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
|
🎉 This PR is included in version 0.10.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Problem
horizontalPopupListsScrollToTheirLastEntry(fillsHeight: true), added in baa1c7e, fails the Test check onmain(ea0b4e4) and on every pull request since, such as #412 and #414. CI's Macs always show scroll bars. A list that fills an 80-point popup gives 17 points to its horizontal scroll bar, so its document is 63 points tall, and the test expected 80:With a trackpad, macOS overlays the scroll bars instead, so the test passes locally.
Changes
The test now expects a list that fills the popup's height to leave room for a scroll bar macOS always shows (
NSScroller.scrollerWidth(for: .regular, scrollerStyle: .legacy)), and nothing for overlay scroll bars. The non-filling case and the scrolling checks are unchanged. The app doesn't change: a scroll bar that's always shown under a horizontal list is how macOS draws it.Testing
I ran the test bundle through
swiftpm-testing-helper, with and without-AppleShowScrollBars Always, which sets the preference for that process only:swift test --filter Popup: 23 tests pass.Merging
One commit, any merge method.
Claude Opus 5.5 via Claude Code