Skip to content

Add a Gutenberg image-block insertion regression fixture #41

Description

@yoldaolmak

Problem

The painful editor workflow is not only finding an image; it is placing the image in the correct Gutenberg section without duplicating blocks or disturbing existing content.

Pictovap has WordPress/Gutenberg placement logic. A focused fixture would make this behavior easier for a new contributor to understand and safer to change.

Scope

Add one regression fixture and one test for inserting a Gutenberg image block into existing post content.

A good PR should:

  • use synthetic Gutenberg HTML only;
  • include at least two headings and one existing paragraph;
  • insert one image after the intended heading;
  • assert that the generated block contains the expected WordPress media ID, image URL, alt text, and caption;
  • assert that running the insertion a second time does not create a duplicate block;
  • avoid real WordPress API calls and credentials.

Acceptance criteria

  • make contributor-smoke and make contribution-check pass.
  • The test proves idempotent image placement for one heading target.
  • The fixture is readable enough for future CMS adapter contributors to copy.

Contributor path

This is contribution: no-claim: fork the repo and open a PR directly. No reservation comment is needed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: media-libraryWordPress media upload and image-placement workflowarea: wordpress-gutenbergWordPress REST API, Gutenberg input, and block placementcontribution: no-claimIndependent first contribution; open a PR without claiminggood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions