-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure that the insertBlock
command works properly in all cases.
#128
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iamdharmesh I noticed the E2E failure on this PR for WP trunk. Should we look into it?
Yes @faisal-alvi. That is due to changes in WP 6.6. I will check on it and fix it. That's why I converted PR to Draft to hold a review on PR. Thanks. |
@faisal-alvi This is ready for review now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iamdharmesh Thanks for the work, LGTM!
Ensure that the `insertBlock` command works properly in all cases.
Description of the Change
This PR removes the
expect
check from the insert block command. Currently, after inserting a block, we check that there is one block in the editor. However, this fails in cases where we need to add more than one block or when the editor already has blocks present and we add another block. In such cases, the block count becomes more than one, and the tests eventually fail. This PR makes changes to remove theexpect
assertion and respond with the ID from the last block.How to test the Change
Make sure the
insertBlock
command's E2E tests are passing.Changelog Entry
Credits
Props @iamdharmesh
Checklist: