Skip to content

Fix CI e2e failures after WP 7.1 / Gutenberg 23.8 - #4274

Merged
akirk merged 2 commits into
trunkfrom
fix/ci-e2e-wp-7.1-gutenberg-23.8
Aug 22, 2026
Merged

akirk merged 2 commits into
trunkfrom
fix/ci-e2e-wp-7.1-gutenberg-23.8

Conversation

@akirk

@akirk akirk commented Aug 22, 2026

Copy link
Copy Markdown
Member

Motivation for the change, related issues

CI on trunk has been red since the WordPress 7.1 recompile (a9835e1). Two jobs fail, neither caused by the WP build itself:

  1. test-e2e — query-api.cy.ts › Patching Gutenberg editor frame (both tests). Gutenberg 23.8.0 shipped on 2026-08-19, the same day the job started failing. Block editor: render a real default block in place of the default appender gutenberg#81231 renders a real ghost paragraph instead of the default block appender, so a new post's canvas no longer contains .block-editor-inserter__toggle, and the test times out after 10 minutes waiting for it.
  2. test-docs-api-reference — api-reference.spec.ts › loads without runtime errors fails intermittently on Failed to load resource: 404 from https://proxy.kapa.ai/, the third-party assistant widget.

Implementation details

  • The Cypress test now asserts that the editor canvas loaded its stylesheets by checking overflow-wrap: break-word on the first .block-editor-block-list__block. That rule comes from block-editor's content.css in every supported WordPress version (verified against 6.8, 7.0, 7.1 and Gutenberg 23.8), the browser default is normal, and the block list always contains at least the post title block — so the assertion survives the appender change while still proving the canvas frame was patched correctly.
  • The docs test registers a page.route('**/*') that answers every cross-origin request with an empty 200, so the kapa.ai widget is never fetched and only assets served by the docs build itself are under test.

Testing Instructions (or ideally a Blueprint)

  • CI: test-e2e and test-docs-api-reference should pass on this PR.
  • Locally: npx nx e2e playground-website --spec packages/playground/website/cypress/e2e/query-api.cy.ts and npx nx e2e docs-site.

Gutenberg 23.8.0 (WordPress/gutenberg#81231) renders a real ghost
paragraph instead of the default block appender, so a new post's canvas
no longer contains `.block-editor-inserter__toggle`. The editor-frame
Cypress test now asserts that the canvas stylesheets loaded by checking
`overflow-wrap: break-word` on the first block, a rule from
block-editor's content.css present in every supported version.

The docs API reference test failed on a 404 from proxy.kapa.ai, the
third-party assistant widget. The test now answers every cross-origin
request with an empty response, so the widget never loads and only the
docs build itself is under test.
Copilot AI lite review requested due to automatic review settings August 22, 2026 06:35

Copilot AI 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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Fixes CI e2e/doc test failures caused by upstream WordPress/Gutenberg UI changes and intermittent third‑party widget network errors, by making the tests assert more stable signals and isolating them from external dependencies.

Changes:

  • Update Cypress e2e assertion to verify Gutenberg iframe styling via a stable, version-spanning CSS rule instead of the inserter button UI.
  • Update Playwright docs API reference test to stub all cross-origin requests so third-party widgets can’t introduce runtime/network failures.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/playground/website/cypress/e2e/query-api.cy.ts Replaces a brittle UI selector/assertion with a stable CSS-based check to validate the editor canvas is correctly patched.
packages/docs/site/tests/api-reference.spec.ts Stubs cross-origin requests during the test run to prevent third-party widget fetch failures from breaking the docs build validation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/docs/site/tests/api-reference.spec.ts Outdated
…onses

A bare empty 200 for a script or stylesheet can still make the browser
log MIME-type complaints, which the test would then count as errors.
Answer scripts and stylesheets with an empty body of the right content
type and everything else with 204 No Content.
@akirk
akirk merged commit f421f04 into trunk Aug 22, 2026
57 checks passed
@akirk
akirk deleted the fix/ci-e2e-wp-7.1-gutenberg-23.8 branch August 22, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants