Repository navigation
Lay out the window through the test backend - #2012
Open
jordanmontt wants to merge 1 commit into
Open
jordanmontt wants to merge 1 commit into
jordanmontt wants to merge 1 commit into
Conversation
SpVerticalBoxLayoutAdapterTest>>#layOutWindow sent Morphic's #fullBounds to the window's widget, so its tests failed on other backends before checking anything. The test backends now lay out a window with #layOutWindowOf:: by default it waits until the UI is redrawn, and the Morphic backend lays out twice around a UI cycle, as before. 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.
The box layout tests added in #2007 now run on every backend, not only Morphic: they no longer reach into Morphic's widgets, and ask the test backend to lay out the window instead.
With Spec-Toplo (its
LabelWrapbranch, pharo-graphics/Spec-Toplo#167), the three wrapping label tests now reach their checks and stop onSpToploLabelAdapter>>#numberOfLines, which Spec-Toplo does not implement yet. On Morphic, the box layout tests pass.Goal
SpVerticalBoxLayoutAdapterTest>>#layOutWindowsent Morphic's#fullBoundsto the window's widget. These tests are in the backend tests, so on another backend they failed before checking anything: with Spec-Toplo,BlSpacedoes not understand#fullBounds.SpAbstractBackendForTest>>#layOutWindowOf:lays out the window of a test, as the UI would.Main changes
#layOutWindowOf:waits until the UI is redrawn (#waitUntilUIRedrawed); Spec-Toplo settles the spaces of its windows there.SpMorphicBackendForTestlays out twice around a UI cycle, as the helper did: when the width of a wrapping label changes, its height may change too, and it asks its owner to lay out again in the next cycle. Only#waitUntilUIRedrawedis not enough on Morphic: two of the tests then fail.#layOutWindowasks the backend.🤖 Generated with Claude Code but reviewed thoroughly by jordanmontt ❤️