Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-4696

Ensure dynamic beans generation works properly for content blocks fields when exposed via PageModel API

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 14.1.0
    • None
    • None

    Description

      Please build automated tests to verify that expected values for content blocks fields come out of the PageModel API.

      Real world scenarios that should be tested can be found in the namespaces created for testing HSTTWO-4690, specifically in files

      • hippo-site-toolkit/content-beans/src/test/resources/hcm-config/namespaces/contentbeanstest/dynamicbeanpage.yaml (the namespace definition) [1]
      • hippo-site-toolkit/content-beans/src/test/resources/hcm-content/content/documents/contentbeanstest/dynamicbeanpagecontent.yaml (a sample document using those fields) [2]

      Scenario 1: Old way of configuring content blocks

      Cases:

      1. Missing the content-validators property in the namespace definition, see field "/contentblocks" in [1] and property "/contentbeanstest:contentblocks" in [2]
      2. Including the content-validators property, see field "/contentblocksWithValidator" in [1] and property "/contentbeanstest:contentblocksWithValidator" in [2]

      Scenario 2: New way of configuring content blocks (via Essentials)

      See field "/essentialsGeneratedContentblocks" in [1]

      Cases:

      1. Content blocks using an already 'known' compound type, see property "/contentbeanstest:essentialsGeneratedContentblocks" in [2]
      2. Using an 'unknown' compound type, see property "/contentbeanstest:essentialsGeneratedContentblocks[2]" in [2]

      The dynamic beans are generated in a lazy way, i.e. when requested via the object converter. In the context of this issue, a compound type is 'known' when it has been used in a field other than the content blocks field (e.g. in a top level field), and that field was requested before the content blocks field. Then the dynamic bean for the compound is already generated by the time the content blocks field is requested

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mchatzidakis Minos Chatzidakis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: