Repository navigation
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 |
|
Size Change: 0 B Total Size: 2.12 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. 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:
|
60bc6ba to
cd3b55c
Compare
cd3b55c to
e313441
Compare
e313441 to
ef252b2
Compare
ef252b2 to
cebb2c5
Compare
cebb2c5 to
ec0374f
Compare
ec0374f to
5ff115c
Compare
5ff115c to
863658f
Compare
863658f to
9b64d8f
Compare
Part of #82785.
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