Skip to content

Repair wp/5.4 branch Actions: Improve reliability of TinyMCE-related tests - #85619

Merged
desrosj merged 1 commit into
fix-actions-5.4/wait-for-publish-button-in-e2efrom
fix-actions-5.4/fix-flaky-metabox-tinymce-init-race
Oct 29, 2026
Merged

desrosj merged 1 commit into
fix-actions-5.4/wait-for-publish-button-in-e2efrom
fix-actions-5.4/fix-flaky-metabox-tinymce-init-race

Conversation

@desrosj

@desrosj desrosj commented Oct 26, 2026

Copy link
Copy Markdown
Member

Part of #83419.

What?

Makes WP Editor Meta Boxes › Should save the changes wait 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 on wp/5.7 (job), and the wp/6.0–wp/5.5 stacks now carry this fix (#85583 on wp/5.5).

How?

Ports 631bcb2 (#78631) from trunk, in the same Puppeteer form as #85583: a small waitForTinyMCE() helper that waits on window.tinyMCE.get( 'test_tinymce_id' ).initialized, which TinyMCE only sets once startup finishes. This branch's copy of the test is identical to wp/5.5's, so the commit cherry-picks cleanly.

wp/5.3 and wp/5.2 skip this test (describe.skip), and wp/5.1 doesn'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

@desrosj desrosj added [Type] Build Tooling Issues or PRs related to build tooling [Package] E2E Tests /packages/e2e-tests labels Oct 26, 2026
@desrosj desrosj self-assigned this Oct 26, 2026
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4f18b391-3b15-47b8-9af3-063046af154a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

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.

Co-authored-by: desrosj <desrosj@git.wordpress.org>
Co-authored-by: lucatume <lucatume@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@desrosj
desrosj force-pushed the fix-actions-5.4/fix-flaky-metabox-tinymce-init-race branch from ff74672 to 44fe399 Compare October 29, 2026 12:48
@desrosj
desrosj merged commit e49542d into wp/5.4 Oct 29, 2026
25 of 37 checks passed
@desrosj
desrosj deleted the fix-actions-5.4/fix-flaky-metabox-tinymce-init-race branch October 29, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] E2E Tests /packages/e2e-tests [Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants