# Node Types for Functional Tests

'Neos.ContentRepository.Testing:NodeType':
  properties:
    test1:
      defaultValue: 'default value 1'
    test2:
      defaultValue: 'default value 2'
  constraints:
    nodeTypes:
      'Neos.ContentRepository.Testing:NodeType': true
      'Neos.ContentRepository.Testing:NodeTypeWithSubnodes': true

'Neos.ContentRepository.Testing:NodeTypeWithSubnodes':
  childNodes:
    subnode1:
      type: 'Neos.ContentRepository.Testing:NodeType'
  constraints:
    nodeTypes:
      'Neos.ContentRepository.Testing:NodeType': true
      'Neos.ContentRepository.Testing:Document': true

'Neos.ContentRepository.Testing:NodeTypeWithProcessor':
  properties:
    test1:
      defaultValue: 'default value 1'
  postprocessors:
    'processor1':
      postprocessor: 'Neos\ContentRepository\Tests\Functional\Domain\Fixtures\TestNodePostprocessor'
      postprocessorOptions:
        someOption: 'someOverriddenValue'
        someOtherOption: 'someOtherValue'
    'processor2':
      position: start
      postprocessor: 'Neos\ContentRepository\Tests\Functional\Domain\Fixtures\TestNodePostprocessor'
      postprocessorOptions:
        someOption: 'someValue'


'Neos.ContentRepository.Testing:NodeTypeWithReferences':
  properties:
    property1:
      type: string
    property2:
      type: reference
    property3:
      type: references

'Neos.ContentRepository.Testing:Headline':
  superTypes:
    'Neos.ContentRepository.Testing:Content': true
  properties:
    title:
      type: string

'Neos.ContentRepository.Testing:NodeTypeWithEntities':
  properties:
    image:
      type: 'Neos\Flow\Tests\Functional\Persistence\Fixtures\Image'
    wrappedImage:
      type: 'Neos\ContentRepository\Tests\Functional\Domain\Fixtures\TestObjectForSerialization'
    images:
      type: 'array<Neos\Flow\Tests\Functional\Persistence\Fixtures\Image>'

'Neos.ContentRepository.Testing:HappyTestingNode':
  class: 'Neos\ContentRepository\Tests\Functional\Domain\Fixtures\HappyNode'

# Constraint behat test nodetypes
'Neos.ContentRepository.Testing:Node':
  abstract: true

'Neos.ContentRepository.Testing:ContentCollection':
  superTypes:
    'Neos.ContentRepository.Testing:Node': true
  constraints:
    nodeTypes:
      'Neos.ContentRepository.Testing:Headline': true
      'Neos.ContentRepository.Testing:TwoColumn': true
      'Neos.ContentRepository.Testing:ThreeColumn': true
      'Neos.ContentRepository.Testing:Text': true
      'Neos.ContentRepository.Testing:Html': true
      'Neos.ContentRepository.Testing:List': true

'Neos.ContentRepository.Testing:Document':
  aggregate: true

'Neos.ContentRepository.Testing:Page':
  superTypes:
    'Neos.ContentRepository.Testing:Document': true
  properties:
    title:
      type: string
  childNodes:
    'main':
      type: 'Neos.ContentRepository.Testing:ContentCollection'
  constraints:
    nodeTypes:
      '*': true

'Neos.ContentRepository.Testing:Chapter':
  superTypes:
    'Neos.ContentRepository.Testing:Page': true

'Neos.ContentRepository.Testing:PageWithConfiguredLabel':
  superTypes:
    'Neos.ContentRepository.Testing:Page': true
  label: "${q(node).property('title') || q(node).property('text') || ((node.nodeType.label || node.nodeType.name) + ' (' + node.name + ')')}"
  ui:
    label: 'Labeled Page'

'Neos.ContentRepository.Testing:Column':
  superTypes:
    'Neos.ContentRepository.Testing:Content': true
    'Neos.ContentRepository.Testing:ContentMixin': false
  abstract: true

'Neos.ContentRepository.Testing:TwoColumn':
  superTypes:
    'Neos.ContentRepository.Testing:Column': true
  childNodes:
    column0:
      type: 'Neos.ContentRepository.Testing:ContentCollection'
    column1:
      type: 'Neos.ContentRepository.Testing:ContentCollection'

'Neos.ContentRepository.Testing:ThreeColumn':
  superTypes:
    'Neos.ContentRepository.Testing:Column': true
  childNodes:
    column0:
      type: 'Neos.ContentRepository.Testing:ContentCollection'
    column1:
      type: 'Neos.ContentRepository.Testing:ContentCollection'
    column2:
      type: 'Neos.ContentRepository.Testing:ContentCollection'

'Neos.ContentRepository.Testing:Content':
  superTypes:
    'Neos.ContentRepository.Testing:ContentMixin': true
  constraints:
    nodeTypes:
      '*': false

'Neos.ContentRepository.Testing:ContentMixin': []

'Neos.ContentRepository.Testing:Text':
  superTypes:
    'Neos.ContentRepository.Testing:Content': true
  properties:
    text:
      type: string

'Neos.ContentRepository.Testing:NodeTypeWithSubnodesAndConstraints':
  childNodes:
    subnode1:
      type: 'Neos.ContentRepository.Testing:NodeType'
      constraints:
        nodeTypes:
          'Neos.ContentRepository.Testing:Headline': true # allowed

'Neos.ContentRepository.Testing:Image':
  superTypes:
    'Neos.ContentRepository.Testing:Content': true

'Neos.ContentRepository.Testing:TextWithImage':
  superTypes:
    'Neos.ContentRepository.Testing:Text': true
    'Neos.ContentRepository.Testing:Image': true

'Neos.ContentRepository.Testing:Html':
  superTypes:
    'Neos.ContentRepository.Testing:Content': true
  properties:
    source:
      type: string
      defaultValue: '<p>Enter HTML here</p>'

'Neos.ContentRepository.Testing:List':
  superTypes:
    'Neos.ContentRepository.Testing:Content': true
  childNodes:
    items:
      type: 'Neos.ContentRepository.Testing:ContentCollection'
      constraints:
        nodeTypes:
          'Neos.ContentRepository.Testing:ListItem': true
          '*': false

'Neos.ContentRepository.Testing:ListItem':
  superTypes:
    'Neos.ContentRepository.Testing:Content': true
  properties:
    text:
      type: 'string'

'Neos.ContentRepository.Testing:ImportExport':
  properties:
    description:
      type: string
    someDate:
      type: DateTime

'Neos.ContentRepository.Testing:NodeTypeWithPlainLabel':
  label: 'Test nodetype'

'Neos.ContentRepository.Testing:NodeTypeWithEelExpressionLabel':
  label: '${"Test" + " " + "nodetype"}'
