Skip to content

Repair wp/5.4 branch Actions: Wait for the publish button in the post visibility e2e test - #85618

Merged
desrosj merged 1 commit into
fix-actions-5.4/wait-for-alignment-menu-items-in-e2efrom
fix-actions-5.4/wait-for-publish-button-in-e2e
Oct 29, 2026
Merged

desrosj merged 1 commit into
fix-actions-5.4/wait-for-alignment-menu-items-in-e2efrom
fix-actions-5.4/wait-for-publish-button-in-e2e

Conversation

@desrosj

@desrosj desrosj commented Oct 26, 2026

Copy link
Copy Markdown
Member

Part of #83419.

What?

Makes Post visibility › visibility remains private even if the publish date is in the future wait for the publish button to exist and be enabled before clicking it.

Why?

The test fails intermittently on wp/5.4 with No node found for selector: .editor-post-publish-button, in the use-plain-permalinks-in-e2e run on 2026-10-20 and in run 39603857441 (Admin - 4). Choosing Private in the visibility popover publishes the post privately straight away (setPrivate() calls onSave()), and the test clicks the publish button right after typing in the title. Until that save finishes, the post is still an unpublished draft, so PostPublishButtonOrToggle renders the publish panel toggle (.editor-post-publish-panel__toggle) instead of the publish button, and the click fails when it gets there first.

How?

Backports the wait that 4830c2c (#21522) added to this test upstream for the same failure: waitForSelector( '.editor-post-publish-button[aria-disabled="false"]' ) before the click. The code is unchanged; only the two-line comment is written as a block comment.

wp/5.5 and later already have this wait. wp/5.3, wp/5.2 and wp/5.1 don't have this test: their post-visibility.test.js only has the viewport tests.

Testing Instructions

The end-to-end tests should pass on this PR. The failure is rare (2 hits so far), so a single 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: ba91bd13-aaed-46c0-89fe-f3410f1e04da

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: andrewserong <andrewserong@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.

@andrewserong andrewserong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@desrosj
desrosj force-pushed the fix-actions-5.4/wait-for-publish-button-in-e2e branch from fe36559 to 34b8f03 Compare October 29, 2026 12:48
@desrosj
desrosj merged commit cc655c3 into wp/5.4 Oct 29, 2026
18 of 19 checks passed
@desrosj
desrosj deleted the fix-actions-5.4/wait-for-publish-button-in-e2e 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