Issues

Select view

Select search mode

 

The MockAemAdapterFactory doesn't correctly adapt a Resource to a ContentFragment

Description

The following lines of code are wrong when trying to adapt a Resource to a ContentFragment:

A ContentFragment is an Asset that has the contentFragment boolean property set to true on the jcr:content sub-node of type dam:AssetContent. Moreover, a valid ContentFragment has a model, which the MockContentFragment also doesn’t seem to support.

Details

Assignee

Reporter

Components

Affects versions

Priority

Created October 6, 2022 at 11:28 AM
Updated October 18, 2022 at 8:09 AM

Activity

Show:

Stefan SeifertOctober 18, 2022 at 8:09 AM

i tried to reproduce what AEM is doing internally when adapting to a ContentFragment - it seems the contentFragment=true property is not actually evaluated - but a lot of other stuff that is currently respect in AEM mocks, e.g. existence of the jcr:content/data node, existence of a model path on cq:model property etc.

indeed AEM mocks currently does not have support for CFM models (the interface is named FragmentTemplate in the API).

adding full CFM model support would be a bigger effort. if anyone can come up with a PR i would be glad to help to bring it into AEM mocks.

Stefan SeifertOctober 6, 2022 at 12:03 PM

thanks for reporting, i'll have a look

Loading...