Skip to content

Commit

Permalink
Fix Site Editor perf tests (#48240)
Browse files Browse the repository at this point in the history
* Focus on the paragraph instead clicking it
See #48208 (comment)

* Add missing fixes
As per #48240 (review) and #48240 (comment)

* Try without the extra path param
As per #48240 (review)

* Remove obsolete await
As per #48240 (comment)

* Revert "Try without the extra path param"

This reverts commit 5fad8cd10c0765b8054ffdae7f6bd1840c7bba6c.

* Revert "Revert "Try without the extra path param""

This reverts commit 87b1109c0517b27ffe8f5bd5fb417a37e7a822d4.

* Revert "Revert "Revert "Try without the extra path param"""

This reverts commit 2b931a8bccfbafa9665e638045c6d1847955d98e.

* Remove unneeded changes

* Describe discrepancy of inexplicably-required line in code via explanatory comment.

* Use `canvas.focus()` instead of `canvas.click()`

---------

Co-authored-by: Kai Hao <kai@kaihao.dev>
Co-authored-by: Ella van Durpe <ella@vandurpe.com>
Co-authored-by: Dennis Snell <dennis.snell@automattic.com>
Co-authored-by: Tetsuaki Hamano <tetsuaki.hamano@gmail.com>
  • Loading branch information
5 people authored Feb 21, 2023
1 parent b2c16f3 commit 8b8e2ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/e2e-tests/specs/performance/site-editor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ describe( 'Site Editor Performance', () => {
await visitSiteEditor( {
postId: id,
postType: 'page',
// This shouldn't be necessary, but without it the tests fail.
// Could be related to having the necessary cookies in the browser.
// See https://github.com/WordPress/gutenberg/pull/48240/files#r1111760556
path: '/navigation/single',
} );
} );

Expand Down Expand Up @@ -147,7 +151,7 @@ describe( 'Site Editor Performance', () => {
'[data-type="core/post-content"] [data-type="core/paragraph"]'
);
await enterEditMode();
await canvas().click(
await canvas().focus(
'[data-type="core/post-content"] [data-type="core/paragraph"]'
);
await insertBlock( 'Paragraph' );
Expand Down

1 comment on commit 8b8e2ec

@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 8b8e2ec.
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/4229187920
📝 Reported issues:

Please sign in to comment.