Skip to content

[TASK] Add a functional test for the overlay image marker - #14

Merged
bmack merged 1 commit into
mainfrom
task/overlay-functional-test
Aug 13, 2026
Merged

[TASK] Add a functional test for the overlay image marker#14
bmack merged 1 commit into
mainfrom
task/overlay-functional-test

Conversation

@bmack

@bmack bmack commented Aug 13, 2026

Copy link
Copy Markdown
Member

The overlay mode shipped unverified — I flagged this on #9 as something I could not test end to end. This closes that.

It renders through this extension's override of fluid_styled_content's Media/Rendering/Image partial. Reaching that through a real site would need fluid_styled_content to be the thing actually rendering the images, and most sitepackages replace it (which is exactly why I could not verify it against the test project). Rendering the partial directly covers it properly.

Four cases:

  • flagged image in overlay mode → wrapper and marker are there
  • unflagged image in overlay mode → nothing added
  • flagged image with the marker off (the default) → nothing added
  • flagged image in baked mode → nothing added, since the marker is already in the pixels and wrapping it as well would show it twice

Core's own image-embed-item markup is asserted to survive in every case — the partial is a copy of Core's, so the regression to guard against is us quietly breaking normal image rendering.

One wrinkle worth knowing for future fixtures: the reference needs an explicit crop property. f:media reads it off the reference, and getProperty() throws for keys present on neither the reference nor the file.

Suite goes from 38 to 42. Green locally; no production code touched.

The "overlay" mode shipped unverified: it renders through this extension's
override of fluid_styled_content's Media/Rendering/Image partial, and reaching
that through a real site would need fluid_styled_content to be the thing actually
rendering the images, which most sitepackages replace. Rendering the partial
directly covers it.

Asserts the wrapper and marker appear for a flagged image in overlay mode, and
that nothing is added in the three cases where the extension has to render
exactly what Core would have: an unflagged image, the default "off" mode, and
"baked" mode - where the marker is already in the pixels, so wrapping it as well
would show it twice. Core's own markup is asserted to survive in every case.

The fixture reference needs an explicit "crop" property: f:media reads it off
the reference, and getProperty() throws for keys present on neither the
reference nor the file.
@bmack
bmack merged commit 1a6b7c0 into main Aug 13, 2026
8 checks passed
@bmack
bmack deleted the task/overlay-functional-test branch August 21, 2026 19:40
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.

2 participants