Create test for checking markup serialization

Created on 12 September 2024, 3 months ago

See parent task.

TODO ON ME: check if tests for JSON serialization can be easily added to this module or if e.g. lupus_ce_renderer is a better place.

📌 Task
Status

Active

Version

3.0

Component

Code

Created by

🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @roderik
  • 🇦🇹Austria fago Vienna

    I second that, the parent issue also triggered that thinking for me.

    We should make one test that covers all cases that are relevant for serialiation, what I can think of is:

    CE with attributes, no children
    CE with attributes, single slot, single CE child
    CE with attributes, single slot, multiple CE children
    CE with attributes, single slot, markup cotnent
    CE with attributes, single slot with multiple entries, one single child, one multiple CE children. adding markup in this case is unusual, so not something we have to cover imo.

    then, we should serialize this in those formats:
    markup with vue2/standard CE syntax
    markup with vue3 syntax
    json

    This is not a release blocker, but I'd love to get it done soon to ensure we are good and stay good here. We should make this one or multiple dedicated kernel tests, so we can easily add them to 2.x and 3.x and compare results.

  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

    For reference to whomever:

    Markup:
    See renderCustomElement() in existing tests.

    JSON:
    $this->getCustomElementNormalizer()->normalize($custom_element). (There is no place in custom_elements module that does JSON serialization, but the building blocks - i.e. getCustomElementNormalizer() are here so the test should be here. One module that has the above line of code, is lupus_ce_renderer.)

Production build 0.71.5 2024