test: Unconstrained movement tests of statement and value blocks.#759
Open
johnnesky wants to merge 5 commits intoRaspberryPiFoundation:mainfrom
Open
test: Unconstrained movement tests of statement and value blocks.#759johnnesky wants to merge 5 commits intoRaspberryPiFoundation:mainfrom
johnnesky wants to merge 5 commits intoRaspberryPiFoundation:mainfrom
Conversation
1c60fff to
5dc1b9d
Compare
RoboErikG
reviewed
Oct 14, 2025
| * Expected connection candidates when moving STATEMENT_SIMPLE, after | ||
| * pressing ArrowDown n times. | ||
| */ | ||
| const EXPECTED_STATEMENT_SIMPLE_DOWN = [ |
Contributor
There was a problem hiding this comment.
How does this behave across renderers since the blocks will have different sizes and shapes in different renderers?
5dc1b9d to
da0f57e
Compare
RoboErikG
approved these changes
Nov 3, 2025
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.
Addresses some of the cases in: #697
Added unit tests for a simple and complex statement blocks and simple and "unary" value blocks, moving each block several steps in the cardinal directions via unconstrained movement.
To help initialize the tests, I added helper functions to get the position of an existing block or one of its inputs, and to move the target block to a position near the existing block. I also refactored the
moveTesthelper function to be usable as part of a larger unit test function.