Skip to content

Add e2e coverage for pattern wrapper block identity#79462

Merged
ramonjd merged 2 commits into
trunkfrom
add/e2e-tests-pattern-editing-root-block-icon
Jun 24, 2026
Merged

Add e2e coverage for pattern wrapper block identity#79462
ramonjd merged 2 commits into
trunkfrom
add/e2e-tests-pattern-editing-root-block-icon

Conversation

@ramonjd

@ramonjd ramonjd commented Jun 23, 2026

Copy link
Copy Markdown
Member

What? Why?

Adds focused e2e coverage for pattern wrapper block identity after #79417.

How?

  • Verifies an unsynced pattern wrapper changes its block info card badge from Pattern to Group after clicking Edit pattern.
  • Verifies a pattern wrapper inside an isolated template part editor shows Header with a Group badge instead of Pattern.

Manual Testing

  1. Open the post editor with a Group block that has metadata.patternName and metadata.name: "Header".
  2. Select the wrapper and confirm the block info card shows Header with a Pattern badge.
  3. Click Edit pattern.
  4. Confirm the same block info card shows Header with a Group badge.
  5. Open a template part in focus mode containing the same wrapper.
  6. Select the Group block and confirm the block info card shows Header with a Group badge.

@ramonjd ramonjd self-assigned this Jun 23, 2026
@ramonjd ramonjd added [Type] Code Quality Issues or PRs that relate to code quality [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Jun 23, 2026
@ramonjd ramonjd force-pushed the add/e2e-tests-pattern-editing-root-block-icon branch from df9c990 to 2ed7e97 Compare June 23, 2026 23:21
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ramonjd <[email protected]>
Co-authored-by: talldan <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 7.51 MB

compressed-size-action

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

Adds targeted end-to-end regression coverage to ensure pattern wrapper blocks display the underlying source block identity (name + badge) when entering pattern editing and when editing in isolated (focus mode) template part editors, aligning with the behavior introduced in #79417.

Changes:

  • Adds an editor E2E test asserting the inspector block card badge changes from Pattern to Group after clicking “Edit pattern” on an unsynced pattern wrapper.
  • Adds a site editor E2E test asserting an isolated template part editor shows the wrapper’s display name (Header) with a Group badge (not Pattern) for pattern wrappers.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
test/e2e/specs/site-editor/template-part.spec.js Adds coverage for pattern wrapper identity in isolated template part (focus mode) editing.
test/e2e/specs/editor/various/patterns.spec.js Adds coverage for inspector identity/badge behavior before vs. after “Edit pattern”.

Comment thread test/e2e/specs/editor/various/patterns.spec.js Outdated
Comment thread test/e2e/specs/site-editor/template-part.spec.js Outdated
@ramonjd ramonjd force-pushed the add/e2e-tests-pattern-editing-root-block-icon branch from 2ed7e97 to cb592c7 Compare June 24, 2026 04:02

@talldan talldan 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.

Thanks!

@ramonjd ramonjd enabled auto-merge (squash) June 24, 2026 04:26
@ramonjd ramonjd merged commit 89436dc into trunk Jun 24, 2026
43 of 44 checks passed
@ramonjd ramonjd deleted the add/e2e-tests-pattern-editing-root-block-icon branch June 24, 2026 04:34
@github-actions github-actions Bot added this to the Gutenberg 23.5 milestone Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants