test(editor): measure the scroll view's reservation against the insets AppKit already reported - #2894
Merged
Merged
Conversation
…s AppKit already reported
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.
mainis red on Package Tests. #2891 merged before that job reported, and it is the change thatmade this test fail:
Both are exactly 17 higher: the room AppKit reserves for legacy scrollers, on the two edges that
have one.
topandleftwere unaffected and passed.Cause
The test asserts absolute inset values, which silently assumes the scrollers contribute nothing.
The suite's
initsetsscrollView.scrollerStyle = .overlayto get that, and on the runner itdoes not hold: the clip view still comes back with legacy room on the trailing and bottom edges.
Nothing about the production behaviour changed, and nothing about this test changed either. #2891
moved nine suites into this target, and the same test passes on #2893, which did not. It is the
absolute expectation that was never safe, not the reservation it is checking.
Fix
The claim in the test's own name is that the floating views' widths go on top of whatever the
scroll view already had, so it now reads the clip view's insets first and asserts the delta. That
is the shape the sibling test
legacyScrollerRoomIsKeptin the same file already uses, and itholds under either scroller style:
swift test --package-path Packages/TableProEditor --force-resolved-versions: 336 + 153 cases,0 failures.
No CHANGELOG entry: tests only.