Repository navigation
Repair wp/5.4 branch Actions: Improve reliability of TinyMCE-related tests - #85619
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. 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. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
ff74672 to
44fe399
Compare
Part of #83419.
What?
Makes
WP Editor Meta Boxes › Should save the changeswait for the meta box's TinyMCE instance to finish initializing before switching it to Text mode, and again after switching it back to Visual mode. No change to what the test asserts.Why?
This is a preventive fix: the test has not failed on
wp/5.4(it passed in all 21 failed e2e runs on this stack that included it). It clicks the editor's Text tab, types into the textarea, clicks Visual and publishes without waiting for TinyMCE at any point. When those steps land before TinyMCE finishes initializing, TinyMCE switches the editor back to Visual mode and the typed text is lost. The same steps failed this way onwp/5.7(job), and thewp/6.0–wp/5.5stacks now carry this fix (#85583 onwp/5.5).How?
Ports 631bcb2 (#78631) from
trunk, in the same Puppeteer form as #85583: a smallwaitForTinyMCE()helper that waits onwindow.tinyMCE.get( 'test_tinymce_id' ).initialized, which TinyMCE only sets once startup finishes. This branch's copy of the test is identical towp/5.5's, so the commit cherry-picks cleanly.wp/5.3andwp/5.2skip this test (describe.skip), andwp/5.1doesn't have it.Testing Instructions
The end-to-end tests should pass on this PR. The test hasn't failed on this branch yet, so a run mainly shows the change is safe.
Use of AI Tools
This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.
🤖 Generated with Claude Code