Repository navigation
Repair wp/5.3 branch Actions: Run the end-to-end tests with plain permalinks - #85636
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:
|
4579c4d to
03b1c9c
Compare
03b1c9c to
020f9a7
Compare
Part of #83420.
What?
Adds a
Use plain permalinksstep toend2end-test.yml, afterInstall WordPress, that runsnpm run env cli option delete permalink_structure.Why?
Three end-to-end jobs fail, and most of their failures share one cause: the tests' REST API mocks never fire. The same fix is confirmed on
wp/5.4(#85612), where it madeAdmin - 1andAdmin - 2pass.Embedding content(3 tests): the page logsFailed to load resource: the server responded with a status of 429 (), and the embeds never render.new editor state › should be immediately saveable: the demo post's Vimeo embed loads for real (the test mocks it), and its iframe logsUnrecognized feature: 'clipboard-write'.andUnrecognized feature: 'web-share'., which the console checks fail on.Change detection › Should prompt if changes made while save is in-flight: it holds the save by intercepting URLs containing/wp/v2/posts. With plain permalinks the URL is?rest_route=%2Fwp%2Fv2%2Fposts..., so the save isn't held, which is what the test was written against; with pretty permalinks it is held, and the test times out. It passes onwp/5.4with this change.The site has pretty permalinks: WordPress turns them on during the install when the server supports them, and the
wordpress-developlocal environment does. REST API requests then go to/wp-json/..., but the mocks match the?rest_route=URLs plain permalinks produce:createEmbeddingMatcher()looks foroembed%2F1.0%2Fproxy, and so does the demo test's Vimeo mock. So those tests reach the real oEmbed providers.How?
Deleting the
permalink_structureoption leaves WordPress on plain permalinks, which is what these tests were written against.npm run env cli(the same commandsetup-wordpressuses to activate Gutenberg) runs WP-CLI in this environment; deleting the option avoids passing an emptyrewrite structure ''argument through its two layers ofnpm run. The PHP tests are unaffected, so only the end-to-end workflow changes.Font Size Picker › should reset a named font size using input fieldfails for another reason and is investigated separately.Testing Instructions
The end-to-end jobs run on this pull request.
actionlintreports nothing for the workflow.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