[TASK] Add a functional test for the overlay image marker - #14
Merged
Conversation
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.
achimfritz
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
overlaymode 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/Imagepartial. 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:
overlaymode → wrapper and marker are thereoverlaymode → nothing addedoff(the default) → nothing addedbakedmode → nothing added, since the marker is already in the pixels and wrapping it as well would show it twiceCore's own
image-embed-itemmarkup 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
cropproperty.f:mediareads it off the reference, andgetProperty()throws for keys present on neither the reference nor the file.Suite goes from 38 to 42. Green locally; no production code touched.