Repository navigation
Repair wp/6.6 branch Actions: Improve reliability of TinyMCE-related tests - #83465
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 ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 PR meta 🤖🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. |
|
Size Change: 0 B Total Size: 1.73 MB ℹ️ View Unchanged
|
9b6ad45 to
7cee0aa
Compare
7cee0aa to
d0c07ef
Compare
|
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. |
d0c07ef to
3db9543
Compare
3db9543 to
debc1ce
Compare
debc1ce to
4ab2373
Compare
4ab2373 to
801a63a
Compare
801a63a to
4c5d414
Compare
4c5d414 to
b1a07ca
Compare
What?
Replaces the meta box E2E test's iframe-presence wait with a wait on TinyMCE's own
initializedflag, and adds the same wait after switching back to Visual mode. No change to what the test asserts.Why?
test/e2e/specs/editor/plugins/wp-editor-meta-box.spec.jsswitches the meta box's TinyMCE instance out of Visual mode and types into the textarea. It guarded that switch with:That waits for the editor iframe element to be attached, which happens early in TinyMCE's startup — not at the end of it. The comment above it already claimed the intent was to wait "for it to initialize"; this makes the code actually do that.
When the mode switch lands inside that window, two things can go wrong: TinyMCE flips the editor back to Visual once initialization completes, discarding the typed text, and
getSelection()can return null while TinyMCE restores the cursor position. Both surface as intermittent failures inend2end-test.yml.Waiting on
window.tinyMCE.get( 'test_tinymce_id' ).initializedcloses the window, because that flag is set only after startup finishes. The bundled TinyMCE is 4.9.11 on every WordPress version these branches pin, and it defineswindow.tinyMCE, returns the instance fromEditorManager.get( id ), and sets.initializedon it.This is a straight port of
631bcb2(#78631) fromtrunk. The mode-switch button name is branch-specific — WordPress renamed that tab fromTexttoCodein WordPress 6.8, and this branch pins its test WordPress accordingly — so the selector is deliberately left alone.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