Automattic / Automattic/blocks-engine

Exercise generated companion blocks in a Gutenberg browser editor harness

Open
#1,569 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
14
Forks
2
Avg merge
2h 10m
Merged PRs (30d)
561

Description

## Problem

The PHP transformer validates generated companion-block metadata, static save shapes, and WordPress parse/save behavior, but it has no browser harness that boots Gutenberg, registers generated blocks, selects them, changes controls, saves, reloads, and verifies frontend rendering.

This leaves structured editor controls, including `custom/visual-iframe`, without end-to-end browser evidence.

## Scope

Add a portable test harness that materializes a generated companion plugin in an isolated WordPress runtime and drives Gutenberg through Playwright. The first coverage should select a bounded visual iframe, change its structured attributes, save, reload, and assert persisted frontend iframe markup.

## Acceptance

- Runs in an isolated runtime, never against a developer site.
- Loads a generated companion block in Gutenberg and verifies select/change/save/reload behavior.
- Asserts frontend parity for persisted structured attributes.
- Is usable by future generated companion blocks, not iframe-specific infrastructure.

Related: #1568.

## AI assistance

OpenAI GPT-5.6-terra via OpenCode identified the missing executable acceptance layer while implementing #1568 and drafted this issue. Chris Huber directed and reviewed the scope.

Contributor guide

Open the contributing guide

Research direction

No files or existing tests are named; start by tracing the PHP transformer and the implementation from related issue #1568, then identify the current WordPress runtime and test tooling. Build the isolated Gutenberg browser path around the generated companion plugin, beginning with the bounded visual iframe controls. Done means future generated blocks can use the harness to select, change, save, reload, and verify persisted frontend markup without touching a developer site.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, playwright, wordpress
Domain
backend, frontend, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.