Skip to content

Commit

Permalink
Try to fix performance test failure on trunk (#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 Jun 14, 2023
1 parent 814da28 commit fd7c943
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

1 comment on commit fd7c943

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in fd7c943.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5265457285
📝 Reported issues:

Please sign in to comment.