Skip to content

Fix WP 7.0/7.1 e2e gaps and restore the full blocking matrix - #39

Open
roborourke wants to merge 4 commits into
mainfrom
claude/wp-7x-fixes
Open

Fix WP 7.0/7.1 e2e gaps and restore the full blocking matrix#39
roborourke wants to merge 4 commits into
mainfrom
claude/wp-7x-fixes

Conversation

@roborourke

Copy link
Copy Markdown
Collaborator

Closes #38. Builds on #37's WP 6.9–7.1 + nightly matrix.

What was wrong

None of it was a plugin bug. Three separate causes, all confirmed by hand in real WP 7.0/7.1 environments:

  1. 8 tests — WordPress 7.x's site editor shows a cut-down "Pattern" overview panel instead of the full block inspector for blocks that came from a template's default content (e.g. twentytwentyfive's index template inserts its Query Loop as the "List of posts" pattern). None of this plugin's panels appear until you click "Edit pattern" to enter the pattern's own editing context. WP 7.x's "Edit your site" tour can also reappear mid-session and block clicks underneath it. Both are test-only issues, fixed in fixtures.js.
  2. 2 tests — WordPress 7.x no longer exposes the post-template block's grid "Columns" control as a spinbutton (confirmed against the bundled Gutenberg JS). That interaction was incidental test scaffolding, not something the tests assert on, so it's removed.
  3. 1 test — A genuine WordPress 7.1 core bug: its own Query block inspector crashes when a block mounts already non-inherited, before the post type entity record is hydrated. Confirmed by deactivating this plugin entirely and reproducing the identical crash. Fixed by inserting the block inherited (the default) and switching to custom afterwards, matching the pattern already used elsewhere in the suite.

CI

Moves WP 7.0 and 7.1 back into the blocking matrix now that the gaps are closed.

Verification

Ran the full 22-test suite three times against real wp-env instances — WordPress 6.9.7, 7.0.4, and 7.1 — 22/22 green every time.

🤖 Generated with Claude Code

roborourke and others added 4 commits September 9, 2026 19:09
WordPress 7.x's site editor shows an abbreviated "Pattern" overview
panel instead of the full block inspector when a block came from the
template's default content pattern (e.g. twentytwentyfive's index
template inserts its Query Loop as the "List of posts" pattern). That
overview has no InspectorControls slot, so every panel this plugin
adds was invisible until entering the pattern's own editing context
via "Edit pattern".

Separately, WP 7.x's "Edit your site" onboarding tour can reappear
later in the session (not just on first page load) and sits on top of
everything, so a click underneath it hangs instead of failing fast.
Extracted the existing single dismissal into a shared helper and call
it at each point the tour has been observed to reappear.

Together these accounted for 8 of the 11 e2e failures on WP 7.0/7.1
tracked in #38.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
WordPress 7.x no longer exposes the post-template block's grid
"Columns" control as a spinbutton — confirmed against the bundled
Gutenberg JS, where it's now a RangeControl with the paired number
input conditionally hidden. That control was only ever incidental
scaffolding in these tests: nothing asserts on column count, only on
post counts per template. Dropping the interaction removes a
dependency on WordPress core UI this plugin doesn't control, without
weakening what the tests actually check.

Part of the WP 7.0/7.1 failures tracked in #38.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The frontend preset test inserted core/query already non-inherited
(inherit: false) in its initial attributes. On WordPress 7.1 this
reliably crashes core's own Query block inspector — confirmed by
deactivating hm-query-loop entirely and reproducing the identical
error — with "Cannot read properties of undefined (reading
'singular_name')" from block-library's QueryInspectorControls, which
calls getPostType(postType)?.labels.singular_name without guarding
`.labels`. The post type entity record isn't always hydrated by the
time a non-inherited query first mounts.

Inserting inherited (the block's default) and switching to a custom
query afterwards, once the block has settled, avoids the race — this
already matches the pattern used elsewhere in the suite (see
queryBlock.setAsCustom()) and sidesteps a WordPress core bug rather
than working around it.

Fixes the last of the 11 WP 7.0/7.1 failures tracked in #38.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Closes #38. The suite now passes 22/22 on WordPress 6.9.7, 7.0.4, and
7.1 — verified locally against real wp-env instances for each version,
run three times per lane. The compatibility gaps tracked in #38 were
all in the test suite itself (WP 7.x site editor UI changes) or a
WordPress core bug unrelated to this plugin, not in plugin behavior.

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

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Playwright test results — WP 6.9

passed  22 passed

Details

stats  22 tests across 7 suites
duration  1 minute, 10 seconds
commit  f796f7a

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Playwright test results — WP 7.0

passed  22 passed

Details

stats  22 tests across 7 suites
duration  1 minute, 30 seconds
commit  f796f7a

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Playwright test results — WP 7.1

passed  22 passed

Details

stats  22 tests across 7 suites
duration  1 minute, 27 seconds
commit  f796f7a

@roborourke
roborourke requested a review from mattheu September 10, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E2E suite fails on WordPress 7.0 and 7.1

1 participant