Post Editor perf test: remove unwanted actions from timed area#78323
Conversation
|
Size Change: 0 B Total Size: 7.96 MB ℹ️ View Unchanged
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| // Set preferences so that welcomeGuide is disabled and fullscreenMode is enabled. | ||
| await editor.setPreferences( 'core/edit-post', { | ||
| welcomeGuide: false, | ||
| fullscreenMode: false, |
There was a problem hiding this comment.
This would disable the full-screen mode, no?
There was a problem hiding this comment.
Yes, that's what all post editor tests do, both e2e and perf. The admin.editPost and admin.createNewPost helpers set the preferences to disable full-screen mode. The tested UI is the one with standard WP sidebar and admin bar. I don't know why we do this.
My patch merely moves this setup out of the code path that is measured for performance. Until now, we have been measuring a load sequence where the editor does an initial render, then we do a sync data store dispatch to close the welcome modal and disable full-screen, and then the editor does a complete UI rerender in reaction to that.
There was a problem hiding this comment.
Mostly noted because inline comment states opposite. It makes sense to disable full screen mode and match e2e tests.
There was a problem hiding this comment.
I just pushed a reworked version that covers both Site and Post Editor, and does the preference setting over REST: that can be done without actually loading a page during the test setup. And the comments are also reworked.
5de643e to
8b08f58
Compare
|
Flaky tests detected in 8b08f58. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/25912739387
|
Updates the Post Editor perf test, the one that measures the
firstBlockmetric and others, so that no unwanted actions (like switching preferences, checking errors) happens inside the measured time interval.