fix: add boolean to dispose function call #2341
Merged
BeksOmega merged 2 commits intoRaspberryPiFoundation:masterfrom May 7, 2024
sancodes:master
Merged
fix: add boolean to dispose function call #2341BeksOmega merged 2 commits intoRaspberryPiFoundation:masterfrom sancodes:master
BeksOmega merged 2 commits intoRaspberryPiFoundation:masterfrom
sancodes:master
Conversation
BeksOmega
suggested changes
May 6, 2024
Contributor
BeksOmega
left a comment
There was a problem hiding this comment.
Hello! Your testing logic is correct but your test code doesn't do what you want it to.
After that fix I'll pull it down to test manually. Then should be good to go =)
plugins/block-shareable-procedures/test/procedure_blocks.mocha.js
Outdated
Show resolved
Hide resolved
Contributor
Author
|
@BeksOmega applied your suggestions. |
BeksOmega
approved these changes
May 7, 2024
Contributor
BeksOmega
left a comment
There was a problem hiding this comment.
Tested locally and this LGTM =)
Thank you for the fix!!
Contributor
Author
|
@BeksOmega Thank you :) |
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 basics
The details
Resolves
Fixes #2217
Proposed Changes
Reason for Changes
adding
dispose(true)makes sure the blocks that are not associated with the procedures block remain undeletedTest Coverage
Test, I tried to recreate, the blocks being connected to each other, and mimicking the deletion process of procedures child, which should still keep the other blocks intact and undeleted

My testing logic was:
create the def procedure block

"type": "procedures_defnoreturn"create the child block

"type": "procedures_callnoreturn"then basically create two if blocks

"type": "controls_if"then tried to connect those blocks


I tried to pass in
dispose(true), so when the procedure block is deleted, the blocks not associated with procedure block remains intact.