Repository navigation
Repair wp/5.4 branch Actions: Wait for the publish button in the post visibility e2e test - #85618
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:
|
fe36559 to
34b8f03
Compare
Part of #83419.
What?
Makes
Post visibility › visibility remains private even if the publish date is in the futurewait for the publish button to exist and be enabled before clicking it.Why?
The test fails intermittently on
wp/5.4withNo node found for selector: .editor-post-publish-button, in theuse-plain-permalinks-in-e2erun on 2026-10-20 and in run 39603857441 (Admin - 4). Choosing Private in the visibility popover publishes the post privately straight away (setPrivate()callsonSave()), and the test clicks the publish button right after typing in the title. Until that save finishes, the post is still an unpublished draft, soPostPublishButtonOrTogglerenders 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.5and later already have this wait.wp/5.3,wp/5.2andwp/5.1don't have this test: theirpost-visibility.test.jsonly 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