-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Flaky E2E: avoid using the sidebar to insert Paragraph and Image blocks in certain specs. #73561
Conversation
- add an optional param `noSearch` in order to not use the sidebar search to filter out blocks. This is to work around the slow loading of blocks and patterns caused by Gutenberg 15.1.x. test/e2e/specs/editor/editor__post-advanced-flow.ts - update insertion of ParagraphBlock to bypass the search.
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
@@ -58,7 +58,8 @@ describe( DataHelper.createSuiteTitle( `Editor: Advanced Post Flow` ), function | |||
it( 'Enter post content', async function () { | |||
const blockHandle = await editorPage.addBlockFromSidebar( | |||
ParagraphBlock.blockName, | |||
ParagraphBlock.blockEditorSelector | |||
ParagraphBlock.blockEditorSelector, | |||
{ noSearch: true } |
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.
The Paragraph block is only directly inserted with the Editor: Post Advanced Flow spec. Since searching for "Paragraph" returns slow loading patterns, the noSearch
optional param is used to specify that Playwright is to select directly from the block listing that is shown when opening the sidebar.
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.
Thanks for this solution, Edwin! It was much simpler than I thought when I stumbled on this issue.
thought (non-blocking): I see the same issue when running blocks__media.ts
where it also searches for the "Image" block and the return was really slow. The test even focused and hovered on the "Instagram" block instead.
What are your thoughts on implementing the noSearch: true
for the Image block in blocks__media.ts
or we resort to selecting directly from the block listing?
Let's do that - we can retain coverage for "searching for a block to insert" elsewhere using blocks that do not "stress" the editor as much. I'll push changes for |
- set the `noSearch` parameter to true.
Related to #72298
Proposed Changes
This PR works around the pre-existing but exacerbated with Gutenberg 15.1.x issue of slow loading times for page templates, when the block inserter sidebar search is used.
For a demonstration of the issue, please see WordPress/gutenberg#48085.
Key changes:
noSearch
in order to not use the sidebar search to filter out blocks. This is to work around the slow loading of blocks and patterns caused by Gutenberg 15.1.x.Testing Instructions
Ensure the following build configurations are passing reliably. Trigger multiple times as required:
Pre-merge Checklist