Skip to content

Commit

Permalink
Try to fix performance test failure on trunk (WordPress#51407)
Browse files Browse the repository at this point in the history
* Try to fix performance test failure

* Use more semantic manipulation

* Revert unnecessary changes
  • Loading branch information
t-hamano authored and sethrubenstein committed Jul 13, 2023
1 parent 63f5d02 commit 90ab114
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions packages/e2e-tests/specs/performance/site-editor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,21 @@ describe( 'Site Editor Performance', () => {
postType: 'page',
} );

// Wait for the first paragraph to be ready.
const firstParagraph = await canvas().waitForXPath(
'//p[contains(text(), "Lorem ipsum dolor sit amet")]'
);
// Wait for the first block to be ready.
await canvas().waitForSelector( '.wp-block' );

// Get inside the post content.
await enterEditMode();

// Insert a new paragraph right under the first one.
await firstParagraph.click(); // Once to select the block overlay.
await firstParagraph.click(); // Once again to select the paragraph.
// Select the post content block wrapper.
await canvas().click( '.wp-block-post-content' );

// Select the first paragraph in the post content block.
const firstParagraph = await canvas().waitForXPath(
'//p[contains(text(), "Lorem ipsum dolor sit amet")]'
);
await firstParagraph.click();

await insertBlock( 'Paragraph' );

// Start tracing.
Expand Down

0 comments on commit 90ab114

Please sign in to comment.