You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wilhelm and me spend some time at the sprint discussing how the fusion view should work in the future and how it would be testable like this:
Scenario: Page renderingGiven the current Site package is My.Site
And Packages Neos.Fusion and Neos.Neos are autoladed:
When I have the fusion code for the package "My.Site":
"""fusion include: resource://Neos.Fusion/Private/Fusion/Root.fusion include: resource://Neos.Neos/Private/Fusion/Root.fusion prototype(Neos.Neos:Test.DocumentType1) < prototype(Neos.Fusion:Value) { value = 'implementation for DocumentType1' } """And i render the current request i expect
""" implementation for DocumentType2 """
Steps
rename Neos's FusionView to SiteFusionView
extract logic to acquire document node etc to outside
by convention nodedocumentNode and site must be passed, but they will be passed straight into the fusion runtime
other variables would work as well
maybe: throw an error if value is assigned as there is no legacy behaviour for this anymore?
the fusion view requires a dynamic variable / or option? siteResourcePackageKey which will be used to include the site package and as cache identifier in production
the view will get an additional option 'autoIncludes' => [] which can be configured for testing for example like ['Neos.Neos', 'Neos.Fusion'], if empty the global Neos.Neos.fusion.autoInclude configuration will be used.
Related: to be overhauled draft pr: #4495
Wilhelm and me spend some time at the sprint discussing how the fusion view should work in the future and how it would be testable like this:
Steps
FusionView
toSiteFusionView
node
documentNode
andsite
must be passed, but they will be passed straight into the fusion runtimesiteResourcePackageKey
which will be used to include the site package and as cache identifier in production'autoIncludes' => []
which can be configured for testing for example like['Neos.Neos', 'Neos.Fusion']
, if empty the globalNeos.Neos.fusion.autoInclude
configuration will be used.FusionAutoIncludeHandler
in Neos.Neos that can be stubbed for testing, but by default checks if the package exits and loads the file fromresource://
(resolved via TASK: Introduce full behat test for FrontendNodeController #5305)which will be used like this in the fusion view
in the
FusionService
- which is discussable if we still need this empty service ... (see@todo reintroduce with edit preview mode support
)For testing the
FusionAutoIncludeHandler
will just return either the actual sources forNeos.Neos
or fake stuff declared forMyTemp.Package
The text was updated successfully, but these errors were encountered: