Skip to content

Add end-to-end coverage for TinyMCE and side location meta boxes - #82199

Draft
ellatrix wants to merge 13 commits into
try/render-meta-boxes-in-iframesfrom
add/meta-box-iframe-e2e
Draft

Add end-to-end coverage for TinyMCE and side location meta boxes#82199
ellatrix wants to merge 13 commits into
try/render-meta-boxes-in-iframesfrom
add/meta-box-iframe-e2e

Conversation

@ellatrix

@ellatrix ellatrix commented Aug 28, 2026

Copy link
Copy Markdown
Member

What?

Adds end-to-end coverage for the two meta box paths that #82198 relies on and no test exercised: TinyMCE content reaching the saved meta, and the side location boxes rendering and saving from the settings sidebar iframe.

Stacked on #82198.

Why?

  1. The TinyMCE flush. Saving relies on the submit event dispatched in each iframe to make TinyMCE write its content into the underlying textarea. That path had no automated coverage.
  2. The side iframe. The suite only touched the bottom pane iframe; nothing rendered or saved a side location box.

How?

A new Meta box locations describe block in the existing spec, using a new side-meta-box-demo test plugin with a variety of boxes in both locations. Each test waits for the meta box POST before reloading, so saving is asserted deterministically.

Testing Instructions

npm run test:e2e -- --project=chromium test/e2e/specs/editor/plugins/meta-boxes.spec.js

Use of AI Tools

Written with the assistance of Claude Code, reviewed and tested by hand.

Covers the two paths the iframe rendering relies on that no test
exercised: TinyMCE content reaching the saved meta through the
dispatched submit event, and the side location boxes rendering and
saving from the settings sidebar iframe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 7.91 MB

compressed-size-action

@github-actions

Copy link
Copy Markdown

Flaky tests detected in 0fdd77c.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/33216380949
📝 Reported tests:

chevron opens and closes submenu on touch devices in /test/e2e/specs/editor/blocks/navigation-frontend-interactivity.spec.js, passed after 1 failed attempt.
TimeoutError: locator.click: Timeout 10000ms exceeded.
Call log:
  - waiting for getByRole('button', { name: 'Submenu submenu' })
    - locator resolved to <button aria-expanded="false" aria-label="Submenu submenu" data-wp-on--click="actions.toggleMenuOnClick" data-wp-bind--aria-expanded="state.isSubmenuOpen" class="wp-block-navigation__submenu-icon wp-block-navigation-submenu__toggle">…</button>
  - attempting click action
    2 × waiting for element to be visible, enabled and stable
      - element is visible, enabled and stable
      - scrolling into view if needed
      - done scrolling
      - <a class="ab-item" role="menuitem" href="https://wordpress.org/">WordPress.org</a> from <div class="nojq" id="wpadminbar">…</div> subtree intercepts pointer events
    - retrying click action
    - waiting 20ms
    2 × waiting for element to be visible, enabled and stable
      - element is visible, enabled and stable
      - scrolling into view if needed
      - done scrolling
      - <a class="ab-item" role="menuitem" href="https://wordpress.org/">WordPress.org</a> from <div class="nojq" id="wpadminbar">…</div> subtree intercepts pointer events
    - retrying click action
      - waiting 100ms
    19 × waiting for element to be visible, enabled and stable
       - element is visible, enabled and stable
       - scrolling into view if needed
       - done scrolling
       - <a class="ab-item" role="menuitem" href="https://wordpress.org/">WordPress.org</a> from <div class="nojq" id="wpadminbar">…</div> subtree intercepts pointer events
     - retrying click action
       - waiting 500ms

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/navigation-frontend-interactivity.spec.js:722:23

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant