[
  {
    "id": "span-gap",
    "section": "6.3",
    "input": {
      "width": 800,
      "gridColumns": 16,
      "gap": 16,
      "span": 8
    },
    "expected": {
      "width": 392
    }
  },
  {
    "id": "visible-children",
    "section": "6.5",
    "input": {
      "visible": [
        true,
        false,
        true
      ]
    },
    "expected": {
      "participatingIndices": [
        0,
        2
      ],
      "gapCount": 1
    }
  },
  {
    "id": "expression-own-constructor",
    "section": "9.7",
    "input": {
      "data": {
        "constructor": "part",
        "name": "Jo"
      },
      "expression": "data.name"
    },
    "expected": {
      "value": "Jo"
    }
  },
  {
    "id": "url-script",
    "section": "12",
    "input": {
      "url": "java\nscript:alert(1)"
    },
    "expected": {
      "allowed": false
    }
  },
  {
    "id": "script-default-closed",
    "section": "14.2",
    "input": {
      "button": {
        "type": "Button",
        "script": "return 1;"
      },
      "config": {}
    },
    "expected": {
      "executed": false,
      "diagnostic": "script.evaluationDisabled"
    }
  },
  {
    "id": "markdown-substitution",
    "section": "9.4",
    "input": {
      "text": "Hello {name}",
      "params": {
        "name": "**Jo**"
      },
      "markup": "markdown"
    },
    "expected": {
      "text": "Hello **Jo**",
      "substitutionCreatesMarkup": false
    }
  },
  {
    "id": "outside-enum",
    "section": "19",
    "input": {
      "schema": {
        "enum": [
          "A",
          "B"
        ]
      },
      "data": "C",
      "interaction": "mount"
    },
    "expected": {
      "data": "C",
      "changes": 0
    }
  },
  {
    "id": "tuple-fill-prefix",
    "section": "18.11",
    "input": {
      "schema": {
        "type": "array",
        "items": [
          {
            "type": "string"
          },
          {
            "type": "integer"
          }
        ]
      },
      "data": [],
      "edit": {
        "index": 1,
        "value": 30
      }
    },
    "expected": {
      "data": [
        "",
        30
      ],
      "changes": 1
    }
  },
  {
    "id": "confirmation-complex-old",
    "section": "14.3",
    "input": {
      "policy": "complex",
      "old": {
        "name": "Jo"
      },
      "new": ""
    },
    "expected": {
      "confirm": true
    }
  },
  {
    "id": "array-error-boundary",
    "section": "8.3",
    "input": {
      "container": "employees.1",
      "errorPath": "employees.10.name"
    },
    "expected": {
      "contributes": false
    }
  },
  {
    "id": "duration-unchanged",
    "section": "18.18.2",
    "input": {
      "data": "P0W",
      "actions": [
        "open",
        "apply"
      ]
    },
    "expected": {
      "data": "P0W",
      "changes": 0
    }
  },
  {
    "id": "pending-delete",
    "section": "18.4",
    "input": {
      "data": [
        "Jo",
        "Sam"
      ],
      "actions": [
        {
          "queueEdit": {
            "index": 0,
            "value": "Jane"
          }
        },
        {
          "deleteIndex": 0
        },
        "flush"
      ]
    },
    "expected": {
      "data": [
        "Sam"
      ]
    }
  },
  {
    "id": "dialog-cancel",
    "section": "18.13",
    "input": {
      "data": {
        "city": "Sofia"
      },
      "actions": [
        "open",
        {
          "edit": {
            "city": "Paris"
          }
        },
        "cancel"
      ]
    },
    "expected": {
      "data": {
        "city": "Sofia"
      },
      "changes": 0
    }
  },
  {
    "id": "accordion-close",
    "section": "8.8",
    "input": {
      "openCategory": "details",
      "action": "activate-details"
    },
    "expected": {
      "openCategory": null,
      "dataChanges": 0
    }
  },
  {
    "id": "port-choice-reload",
    "section": "docs/implementation-pitfalls.md#p01--values-are-compared-by-json-content",
    "input": {
      "schema": {
        "enum": [
          {
            "a": 1,
            "b": 2
          },
          [
            1,
            2
          ]
        ]
      },
      "data": {
        "b": 2,
        "a": 1
      },
      "actions": [
        "Reload data by parsing independent JSON."
      ]
    },
    "expected": {
      "selectedChoiceIndex": 0,
      "storedValueType": "object"
    }
  },
  {
    "id": "port-literal-key",
    "section": "docs/implementation-pitfalls.md#p02--property-keys-are-literal-data",
    "input": {
      "data": {
        "legacy.key": "A",
        "legacy": {
          "key": "B"
        },
        "": "C"
      },
      "actions": [
        "Edit the literal legacy.key property to D."
      ]
    },
    "expected": {
      "data": {
        "legacy.key": "D",
        "legacy": {
          "key": "B"
        },
        "": "C"
      }
    }
  },
  {
    "id": "port-pattern-intersection",
    "section": "docs/implementation-pitfalls.md#p03--pattern-constraints-intersect",
    "input": {
      "schema": {
        "type": "object",
        "patternProperties": {
          "^x": {
            "type": "object",
            "properties": {
              "left": {
                "type": "string"
              }
            }
          },
          "x$": {
            "type": "object",
            "properties": {
              "right": {
                "type": "integer"
              }
            }
          }
        }
      },
      "data": {
        "x": {
          "left": "a",
          "right": 2
        }
      }
    },
    "expected": {
      "editableFieldsAtX": [
        "left",
        "right"
      ]
    }
  },
  {
    "id": "port-numeric-intent",
    "section": "docs/implementation-pitfalls.md#p05--numeric-editor-intent-is-not-encoded-in-json",
    "input": {
      "schema": {
        "type": [
          "integer",
          "number"
        ]
      },
      "data": 2,
      "actions": [
        "Select Number without editing the value.",
        "Enter 2.5.",
        "Select Integer without editing the value."
      ]
    },
    "expected": {
      "data": 2.5,
      "selectedEditor": "integer",
      "localWholeNumberError": true,
      "documentValid": true
    }
  },
  {
    "id": "port-branch-feedback",
    "section": "docs/implementation-pitfalls.md#p06--document-validity-and-displayed-branch-feedback-differ",
    "input": {
      "schema": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 5
          },
          {
            "type": "string",
            "minLength": 3
          }
        ]
      },
      "data": "Longer text",
      "actions": [
        "Display the short-text branch.",
        "Observe feedback with validateActiveBranch true.",
        "Set the control option validateActiveBranch to false."
      ]
    },
    "expected": {
      "documentValidThroughout": true,
      "localErrorWhenEnabled": true,
      "localErrorWhenDisabled": false,
      "extraBranchValidationWhenDisabled": false
    }
  },
  {
    "id": "port-summary-search",
    "section": "docs/implementation-pitfalls.md#p11--summaries-are-part-of-table-behavior",
    "input": {
      "data": [
        {
          "contact": {
            "city": "Boston"
          }
        },
        {
          "contact": {
            "city": "Seattle"
          }
        }
      ],
      "summaryDescription": "A Label summary renders the contact city as bold Markdown, using permitted interpolation.",
      "actions": [
        "Filter the Contact column for Boston."
      ]
    },
    "expected": {
      "matchingRowIndices": [
        0
      ],
      "filterTextForFirstRow": "Boston",
      "dataUnchanged": true
    }
  },
  {
    "id": "port-cell-error-placement",
    "section": "docs/implementation-pitfalls.md#p08--errors-belong-to-their-data-location",
    "input": {
      "schema": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "active": {
              "type": "boolean"
            }
          }
        }
      },
      "data": [
        {
          "active": true
        },
        {
          "active": "false"
        }
      ]
    },
    "expected": {
      "invalidCell": {
        "row": 1,
        "property": "active"
      },
      "localAccessibleFeedback": true,
      "containerDescendantNotice": true,
      "ordinaryInlineCellHelp": false
    }
  },
  {
    "id": "template-data-subscription-replacement",
    "section": "13",
    "input": {
      "data": {
        "a.b": "literal",
        "a": {
          "b": "nested"
        }
      },
      "reads": [
        [
          "a.b"
        ],
        [
          "a",
          "b"
        ]
      ],
      "replacement": {
        "a.b": "replaced",
        "a": {
          "b": "new"
        }
      }
    },
    "expected": {
      "initialValues": [
        "literal",
        "nested"
      ],
      "valuesAfterReplacement": [
        "replaced",
        "new"
      ],
      "literalAndNestedKeysDistinct": true
    }
  },
  {
    "id": "template-policy-update-preserves-draft",
    "section": "12, 13",
    "input": {
      "href": "/details",
      "initialUrlPolicy": {
        "allowRelative": true
      },
      "replacementUrlPolicy": {
        "allowRelative": false
      },
      "unsavedInput": "draft",
      "templateSourceUnchanged": true
    },
    "expected": {
      "hrefAfterReplacement": null,
      "controlRemounted": false,
      "unsavedInput": "draft",
      "templateStatePreserved": true
    }
  },
  {
    "id": "adornment-display-only",
    "section": "18.3a",
    "input": {
      "data": {
        "weight": 2.4
      },
      "options": {
        "endAdornment": [
          {
            "kind": "text",
            "text": "kg"
          },
          {
            "kind": "icon",
            "icon": "information",
            "label": "Help",
            "tooltip": "Unpackaged weight"
          }
        ]
      },
      "edit": {
        "weight": 3.1
      }
    },
    "expected": {
      "data": {
        "weight": 3.1
      },
      "adornmentIncludedInValue": false,
      "existingInputActionsPreserved": true
    }
  },
  {
    "id": "adornment-translation-and-icon-fallback",
    "section": "18.3a",
    "input": {
      "locale": "bg",
      "options": {
        "endAdornment": {
          "kind": "icon",
          "icon": "information",
          "label": "Help",
          "tooltip": "About this value",
          "i18n": "weight.help"
        }
      },
      "catalog": {
        "weight.help.label": "Помощ",
        "weight.help.tooltip": "За тази стойност"
      },
      "iconAvailable": false
    },
    "expected": {
      "visibleFallback": "Помощ",
      "accessibleName": "Помощ",
      "tooltip": "За тази стойност",
      "dataChanged": false
    }
  },
  {
    "id": "adornment-ordered-composition",
    "section": "18.3a",
    "input": {
      "options": {
        "startAdornment": "€",
        "endAdornment": [
          {
            "kind": "text",
            "text": "kg"
          },
          {
            "kind": "icon",
            "icon": "information",
            "label": "Help"
          }
        ]
      }
    },
    "expected": {
      "start": [
        "€"
      ],
      "end": [
        "kg",
        "information"
      ],
      "storedValueUnchanged": true
    }
  },
  {
    "id": "adornment-outer-edge-native-controls",
    "section": "18.3a",
    "input": {
      "control": "date-time picker",
      "nativeStart": [
        "pickerIcon"
      ],
      "nativeEnd": [
        "clearButton",
        "pickerTrigger"
      ],
      "options": {
        "startAdornment": "Due",
        "endAdornment": {
          "kind": "icon",
          "icon": "information",
          "label": "Help"
        }
      }
    },
    "expected": {
      "logicalOrder": [
        "Due",
        "pickerIcon",
        "input",
        "clearButton",
        "pickerTrigger",
        "information"
      ],
      "pickerOperable": true,
      "clearOperable": true,
      "dataChangedByAdornment": false
    }
  },
  {
    "id": "adornment-library-slot-convention",
    "section": "18.3a",
    "input": {
      "control": "select",
      "nativeEnd": [
        "clearButton",
        "dropdownArrow"
      ],
      "options": {
        "endAdornment": {
          "kind": "text",
          "text": "per item"
        }
      },
      "libraryConvention": [
        "input",
        "clearButton",
        "per item",
        "dropdownArrow"
      ]
    },
    "expected": {
      "logicalOrder": [
        "input",
        "clearButton",
        "per item",
        "dropdownArrow"
      ],
      "nativeConventionPreserved": true,
      "clearOperable": true,
      "dropdownOperable": true
    }
  },
  {
    "id": "group-header-accessible-name",
    "section": "8.1",
    "input": {
      "catalog": {
        "contact.heading.text": "Потвърдено"
      },
      "locale": "bg",
      "uischema": {
        "type": "Group",
        "label": "Contact",
        "elements": [
          {
            "type": "VerticalLayout",
            "slot": "header",
            "elements": [
              {
                "type": "Button",
                "label": "Help"
              },
              {
                "type": "Label",
                "text": "Verified",
                "i18n": "contact.heading"
              },
              {
                "type": "Label",
                "text": "Supporting text"
              }
            ]
          }
        ]
      }
    },
    "expected": {
      "groupAccessibleName": "Потвърдено",
      "groupLabelRepeatedVisually": false
    }
  },
  {
    "id": "adornment-text-like-variant-coverage",
    "section": "18.3a",
    "input": {
      "variants": [
        "time",
        "duration",
        "cron",
        "password"
      ],
      "nativeActions": {
        "time": [
          "pickerTrigger",
          "clearButton"
        ],
        "duration": [
          "pickerTrigger",
          "clearButton"
        ],
        "cron": [
          "pickerTrigger",
          "clearButton"
        ],
        "password": [
          "revealButton",
          "clearButton"
        ]
      },
      "options": {
        "startAdornment": {
          "kind": "text",
          "text": "Prefix"
        },
        "endAdornment": {
          "kind": "icon",
          "icon": "information",
          "label": "Help"
        }
      }
    },
    "expected": {
      "eachSupportedVariantKeepsNativeActions": true,
      "startBeforeNativeLeadingParts": true,
      "endAfterNativeTrailingPartsUnlessLibraryConvention": true,
      "typedValueExcludesAdornments": true,
      "passwordRevealDoesNotChangeData": true
    }
  },
  {
    "id": "adapter-operation-policy",
    "section": "14",
    "input": {
      "button": {
        "action": "save",
        "paramsOmitted": true,
        "handlerPending": true
      },
      "script": {
        "body": "return this.params",
        "allowScriptEvaluation": false
      },
      "delete": {
        "catalogId": "agGrid",
        "confirmation": "always",
        "selectedRows": [
          {
            "name": "one"
          },
          {
            "name": "two"
          }
        ]
      }
    },
    "expected": {
      "buttonParams": {},
      "buttonBusyUntilHandlerSettles": true,
      "duplicateActivationDoesNotRepeatAction": true,
      "stringScriptNotExecuted": true,
      "scriptDisabledDiagnostic": true,
      "batchDeletePromptsOnce": true,
      "cancelPreservesRows": true,
      "acceptDeletesOnlySelectedRows": true
    }
  },
  {
    "id": "primitive-presence-presentation",
    "section": "18.20, 19",
    "input": {
      "switchValues": [
        {
          "present": false
        },
        {
          "present": true,
          "value": null
        },
        {
          "present": true,
          "value": false
        },
        {
          "present": true,
          "value": "false"
        }
      ],
      "nullValues": [
        {
          "present": false
        },
        {
          "present": true,
          "value": null
        },
        {
          "present": true,
          "value": "legacy"
        }
      ]
    },
    "expected": {
      "switchStates": [
        "off-with-localized-unset-description",
        "off-with-localized-unset-description",
        "off-without-unset-description",
        "off-with-localized-invalid-description"
      ],
      "nullStates": [
        "not-set",
        "set",
        "invalid"
      ],
      "mountDoesNotWriteData": true,
      "externalReplacementRefreshesStatus": true,
      "sameSemanticsInCells": true
    }
  },
  {
    "id": "styling-named-values",
    "section": "9.4a",
    "input": {
      "uischema": {
        "type": "Label",
        "text": "{member} selected {plan}; {member} confirmed.",
        "options": {
          "interpolate": true,
          "textParams": {
            "member": "Morgan",
            "plan": "Studio"
          }
        }
      },
      "config": {
        "jsonformsExtended": {
          "markup": {
            "textParamSpans": true
          }
        }
      },
      "platform": "HTML"
    },
    "expected": {
      "text": "Morgan selected Studio; Morgan confirmed.",
      "parameterSpans": [
        "member",
        "plan",
        "member"
      ],
      "sameTextAndAccessibilityAsDisabled": true
    }
  },
  {
    "id": "styling-switch-off",
    "section": "9.4a",
    "input": {
      "uischema": {
        "type": "Label",
        "text": "{member} selected {plan}; {member} confirmed.",
        "options": {
          "interpolate": true,
          "textParams": {
            "member": "Morgan",
            "plan": "Studio"
          }
        }
      },
      "settings": [
        {},
        {
          "jsonformsExtended": {
            "markup": {
              "textParamSpans": false
            }
          }
        }
      ],
      "platform": "HTML"
    },
    "expected": {
      "parameterSpans": [],
      "markerTracking": false,
      "additionalMarkdownParse": false
    }
  },
  {
    "id": "styling-eligibility",
    "section": "9.4a",
    "input": {
      "text": "{count} {active} {empty} {optional} {count + 1} {locale} {{count}}",
      "params": {
        "count": 0,
        "active": false,
        "empty": "",
        "optional": null
      },
      "textParamSpans": true,
      "interpolate": true,
      "locale": "en"
    },
    "expected": {
      "parameterSpans": [
        "count",
        "active"
      ],
      "spanTexts": [
        "0",
        "false"
      ],
      "absentDataDiagnostic": false,
      "sameOutputAfterUnwrappingAsDisabled": true,
      "unknownVariableDiagnostics": [
        "locale"
      ]
    }
  },
  {
    "id": "styling-interpolation-off",
    "section": "9.4a",
    "input": {
      "uischema": {
        "type": "Label",
        "text": "{member} selected {plan}; {member} confirmed.",
        "options": {
          "interpolate": false,
          "textParams": {
            "member": "Morgan",
            "plan": "Studio"
          }
        }
      },
      "textParamSpans": true
    },
    "expected": {
      "parameterSpans": [],
      "text": "{member} selected {plan}; {member} confirmed."
    }
  },
  {
    "id": "styling-translation-order",
    "section": "9.4a",
    "input": {
      "params": {
        "member": "Morgan",
        "plan": "Studio"
      },
      "messages": [
        "{member}: {plan}",
        "{plan}: {member}"
      ],
      "interpolate": true,
      "textParamSpans": true
    },
    "expected": {
      "parameterSpanOrders": [
        [
          "member",
          "plan"
        ],
        [
          "plan",
          "member"
        ]
      ],
      "namesDerivedFromDataPaths": false
    }
  },
  {
    "id": "styling-markdown-equivalence",
    "section": "9.4a",
    "input": {
      "profiles": [
        "basic",
        "extended"
      ],
      "interpolate": true,
      "textParamSpans": [
        false,
        true
      ],
      "params": {
        "member": "(Morgan)",
        "literal": "*[guide](javascript:alert(1))*",
        "plan": "Studio",
        "lines": "First\nSecond",
        "private": "Member"
      },
      "templates": [
        "**{member}**",
        "word**{member}**word",
        "{member}{plan}",
        "`{member}`",
        "{lines}",
        "{private}",
        "{literal}",
        "# {member}",
        "- {member}\n- {plan}",
        "> {member}",
        "| Member |\n| --- |\n| {member} |",
        "```\n{member}\n```"
      ]
    },
    "expected": {
      "afterUnwrappingGeneratedSpans": "Same rendered tree, text and attributes as the disabled result for every template/profile.",
      "strongSpanWhenSafe": "**{member}** contains the member span inside strong.",
      "literalCreatesLink": false,
      "originalPrivateUseCharactersPreserved": true,
      "fallback": "Use unmarked Label output when equivalence cannot be guaranteed.",
      "internalMarkersVisible": false
    }
  },
  {
    "id": "styling-markdown-urls",
    "section": "9.4a",
    "input": {
      "text": "[{member}]({url})",
      "params": {
        "member": "Morgan"
      },
      "urlValues": [
        "https://example.com/membership_a?q=1",
        "javascript:alert(1)"
      ],
      "interpolate": true,
      "markup": "markdown",
      "textParamSpans": true,
      "urlPolicy": "Default §12 policy"
    },
    "expected": {
      "safeHref": "https://example.com/membership_a?q=1",
      "unsafeHrefRefused": true,
      "spansInAttributes": false,
      "urlPolicyReceivesSameUrlAsDisabled": true,
      "sameOutputAfterUnwrappingAsDisabled": true
    }
  },
  {
    "id": "styling-part-normalization",
    "section": "5.7",
    "input": {
      "uncheckedParts": [
        "  summary \"]x summary\tprominent 7notes ",
        [
          "summary"
        ],
        "",
        " \t\n",
        "bad.name 7notes"
      ]
    },
    "expected": {
      "normalizedParts": [
        "summary prominent",
        null,
        null,
        null,
        null
      ],
      "emitAttributeForNull": false,
      "inferredFromI18nNameScopeOrType": false,
      "addsRoleAriaOrBehavior": false
    }
  },
  {
    "id": "styling-part-placement",
    "section": "5.7",
    "input": {
      "platform": "HTML",
      "elements": [
        "Label",
        "Control",
        "Button",
        "nested layout",
        "registered custom element"
      ],
      "part": "summary prominent",
      "contexts": [
        "layout slot",
        "root without slot",
        "Group region without slot",
        "Category dispatch without slot"
      ],
      "hiddenChildHasPart": true
    },
    "expected": {
      "attribute": "data-part=\"summary prominent\"",
      "placementByContext": [
        "existing parent layout slot",
        null,
        null,
        null
      ],
      "tokenSelectors": [
        "[data-part~=\"summary\"]",
        "[data-part~=\"prominent\"]"
      ],
      "nestedLayoutMarkerOnItsOwnParentSlot": true,
      "additionalLayoutSpaceForHiddenChild": false,
      "builtInStyles": false
    }
  },
  {
    "id": "styling-canvas-noop",
    "section": "5.7",
    "input": {
      "platform": "Non-HTML canvas",
      "capability": "Documented no-op for both hooks",
      "uischema": {
        "type": "Label",
        "text": "{member} selected {plan}; {member} confirmed.",
        "options": {
          "interpolate": true,
          "textParams": {
            "member": "Morgan",
            "plan": "Studio"
          }
        }
      },
      "part": "summary",
      "textParamSpans": true
    },
    "expected": {
      "sameContentAccessibilityInteractionAndDataAsWithoutHooks": true,
      "domRequired": false,
      "stylingCallbackRequired": false,
      "reportsImplementedHtmlMarkers": false
    }
  },
  {
    "id": "styling-label-override-precedence",
    "section": "9.4a",
    "input": {
      "platform": "HTML",
      "text": "Membership: {plan}",
      "params": {
        "plan": "Studio"
      },
      "cases": [
        {
          "config": {},
          "options": {
            "interpolate": true
          },
          "expectedEffectiveValue": false
        },
        {
          "config": {},
          "options": {
            "interpolate": true,
            "textParamSpans": false
          },
          "expectedEffectiveValue": false
        },
        {
          "config": {},
          "options": {
            "interpolate": true,
            "textParamSpans": true
          },
          "expectedEffectiveValue": true
        },
        {
          "config": {
            "jsonformsExtended": {
              "markup": {
                "textParamSpans": false
              }
            }
          },
          "options": {
            "interpolate": true
          },
          "expectedEffectiveValue": false
        },
        {
          "config": {
            "jsonformsExtended": {
              "markup": {
                "textParamSpans": false
              }
            }
          },
          "options": {
            "interpolate": true,
            "textParamSpans": false
          },
          "expectedEffectiveValue": false
        },
        {
          "config": {
            "jsonformsExtended": {
              "markup": {
                "textParamSpans": false
              }
            }
          },
          "options": {
            "interpolate": true,
            "textParamSpans": true
          },
          "expectedEffectiveValue": true
        },
        {
          "config": {
            "jsonformsExtended": {
              "markup": {
                "textParamSpans": true
              }
            }
          },
          "options": {
            "interpolate": true
          },
          "expectedEffectiveValue": true
        },
        {
          "config": {
            "jsonformsExtended": {
              "markup": {
                "textParamSpans": true
              }
            }
          },
          "options": {
            "interpolate": true,
            "textParamSpans": false
          },
          "expectedEffectiveValue": false
        },
        {
          "config": {
            "jsonformsExtended": {
              "markup": {
                "textParamSpans": true
              }
            }
          },
          "options": {
            "interpolate": true,
            "textParamSpans": true
          },
          "expectedEffectiveValue": true
        }
      ]
    },
    "expected": {
      "resolution": "Label option, then host default, then false.",
      "parameterSpanNamesWhenEffectiveTrue": [
        "plan"
      ],
      "parameterSpansWhenEffectiveFalse": [],
      "markerTrackingWhenEffectiveFalse": false,
      "additionalMarkdownParseWhenEffectiveFalse": false,
      "sameTextAndAccessibilityInEveryCase": true,
      "hostFalseIsPermissionGate": false
    }
  },
  {
    "id": "styling-label-override-updates",
    "section": "9.4a",
    "input": {
      "platform": "HTML",
      "text": "Membership: {plan}",
      "params": {
        "plan": "Studio"
      },
      "interpolate": true,
      "steps": [
        {
          "hostDefault": false
        },
        {
          "localOverride": true
        },
        {
          "hostDefault": true
        },
        {
          "localOverride": false
        },
        {
          "removeLocalOverride": true
        },
        {
          "hostDefault": false
        }
      ],
      "parentLayoutOptions": {
        "textParamSpans": true
      }
    },
    "expected": {
      "effectiveValues": [
        false,
        true,
        true,
        false,
        true,
        false
      ],
      "parentLayoutOptionCascades": false,
      "unchangedTextFormattingUrlPolicyAccessibilityAndData": true,
      "spanRemovalDoesNotRemoveSubstitutionText": true
    }
  },
  {
    "id": "conditional-layout-business",
    "section": "Conditional fields",
    "input": {
      "schema": {
        "type": "object",
        "properties": {
          "customerType": {
            "type": "string",
            "enum": [
              "personal",
              "business"
            ]
          },
          "name": {
            "type": "string"
          },
          "purchaseOrder": {
            "type": "string"
          }
        },
        "if": {
          "properties": {
            "customerType": {
              "const": "business"
            }
          },
          "required": [
            "customerType"
          ]
        },
        "then": {
          "properties": {
            "vatNumber": {
              "type": "string",
              "minLength": 3
            }
          },
          "required": [
            "vatNumber",
            "name"
          ]
        },
        "else": {
          "properties": {
            "nickname": {
              "type": "string"
            }
          }
        },
        "dependencies": {
          "purchaseOrder": {
            "properties": {
              "billingAddress": {
                "type": "string"
              }
            },
            "required": [
              "billingAddress"
            ]
          }
        }
      },
      "uischema": {
        "type": "VerticalLayout",
        "options": {
          "conditionalFields": true
        },
        "elements": [
          {
            "type": "Control",
            "scope": "#/properties/customerType"
          },
          {
            "type": "Control",
            "scope": "#/properties/name"
          },
          {
            "type": "Control",
            "scope": "#/properties/purchaseOrder"
          },
          {
            "type": "Control",
            "scope": "#/properties/vatNumber"
          },
          {
            "type": "Control",
            "scope": "#/properties/nickname"
          }
        ]
      },
      "data": {
        "customerType": "business",
        "name": "Ada",
        "vatNumber": "VAT123",
        "nickname": "A"
      }
    },
    "expected": {
      "visibleProperties": [
        "customerType",
        "name",
        "purchaseOrder",
        "vatNumber"
      ],
      "requiredProperties": [
        "vatNumber",
        "name"
      ],
      "dataUnchanged": true,
      "originalSchemaValidation": true
    }
  },
  {
    "id": "conditional-layout-personal",
    "section": "Conditional fields",
    "input": {
      "schema": {
        "type": "object",
        "properties": {
          "customerType": {
            "type": "string",
            "enum": [
              "personal",
              "business"
            ]
          },
          "name": {
            "type": "string"
          },
          "purchaseOrder": {
            "type": "string"
          }
        },
        "if": {
          "properties": {
            "customerType": {
              "const": "business"
            }
          },
          "required": [
            "customerType"
          ]
        },
        "then": {
          "properties": {
            "vatNumber": {
              "type": "string",
              "minLength": 3
            }
          },
          "required": [
            "vatNumber",
            "name"
          ]
        },
        "else": {
          "properties": {
            "nickname": {
              "type": "string"
            }
          }
        },
        "dependencies": {
          "purchaseOrder": {
            "properties": {
              "billingAddress": {
                "type": "string"
              }
            },
            "required": [
              "billingAddress"
            ]
          }
        }
      },
      "uischema": {
        "type": "VerticalLayout",
        "options": {
          "conditionalFields": true
        },
        "elements": [
          {
            "type": "Control",
            "scope": "#/properties/customerType"
          },
          {
            "type": "Control",
            "scope": "#/properties/name"
          },
          {
            "type": "Control",
            "scope": "#/properties/purchaseOrder"
          },
          {
            "type": "Control",
            "scope": "#/properties/vatNumber"
          },
          {
            "type": "Control",
            "scope": "#/properties/nickname"
          }
        ]
      },
      "data": {
        "customerType": "personal",
        "name": "Ada",
        "vatNumber": "VAT123",
        "nickname": "A"
      }
    },
    "expected": {
      "visibleProperties": [
        "customerType",
        "name",
        "purchaseOrder",
        "nickname"
      ],
      "requiredProperties": [],
      "dataUnchanged": true,
      "originalSchemaValidation": true
    }
  },
  {
    "id": "conditional-layout-local-opt-out",
    "section": "Conditional fields",
    "input": {
      "entryType": "Group",
      "local": false,
      "global": true,
      "nestedLayouts": [
        "VerticalLayout",
        "HorizontalLayout"
      ],
      "uischema": {
        "type": "Group",
        "options": {
          "conditionalFields": false
        },
        "elements": [
          {
            "type": "VerticalLayout",
            "options": {
              "conditionalFields": true
            },
            "elements": [
              {
                "type": "HorizontalLayout",
                "options": {
                  "conditionalFields": true
                },
                "elements": []
              }
            ]
          }
        ]
      }
    },
    "expected": {
      "projectionEnabled": false,
      "nestedLayoutsCannotReactivate": true
    }
  },
  {
    "id": "conditional-layout-object-boundaries",
    "section": "Conditional fields",
    "input": {
      "rootKind": "personal",
      "nestedKind": "business",
      "arrayItemKinds": [
        "business",
        "personal"
      ],
      "validationMode": "NoValidation",
      "independentForms": {
        "outer": {
          "dataPath": "",
          "local": false,
          "global": true
        },
        "embeddedInner": {
          "dataPath": "",
          "local": true,
          "global": false
        }
      }
    },
    "expected": {
      "evaluateEachObjectIndependently": true,
      "requiredMarkersFollowEachObject": true,
      "noDataMutation": true,
      "independentHostFormsAtSameRootPath": true,
      "outerProjectionEnabled": false,
      "embeddedInnerProjectionEnabled": true,
      "resetInheritanceAtHostFormBoundary": true
    }
  },
  {
    "id": "conditional-layout-placement",
    "section": "Conditional fields",
    "input": {
      "layouts": [
        "VerticalLayout",
        "HorizontalLayout",
        "Group",
        "Categorization"
      ],
      "categoryVariants": [
        "tabs",
        "stepper",
        "accordion"
      ],
      "baseFieldRequiredInThen": true,
      "retainedInactiveValues": true
    },
    "expected": {
      "preserveAuthoredOrderAndContainers": true,
      "baseFieldAlwaysVisible": true,
      "asteriskFollowsActiveRequiredUnion": true,
      "insertUnplacedBranchFields": false,
      "uiRulesStillApply": true,
      "preserveEmptyContainers": true,
      "preserveExistingSlotsForEmptiedPlainLayouts": true
    }
  },
  {
    "id": "interpolation-explicit-locale",
    "section": "9.1, 9.4a",
    "input": {
      "uischema": {
        "type": "Label",
        "text": "{language} / {locale}",
        "options": {
          "interpolate": true,
          "textParamSpans": true,
          "textParams": {
            "language": "{locale}",
            "locale": "{locale}"
          }
        }
      },
      "config": {
        "jsonformsExtended": {
          "dynamicValues": {
            "enabled": false
          }
        }
      },
      "hostLocaleSequence": [
        "en",
        "bg"
      ],
      "platform": "HTML"
    },
    "expected": {
      "textSequence": [
        "en / en",
        "bg / bg"
      ],
      "parameterSpans": [
        "language",
        "locale"
      ],
      "unknownVariableDiagnostics": [],
      "parameterSelfReference": false,
      "dataNamespacesEnabled": false
    }
  },
  {
    "id": "interpolation-undeclared-locale",
    "section": "9.1, 9.5",
    "input": {
      "uischema": {
        "type": "Label",
        "text": "Language: {locale}",
        "options": {
          "interpolate": true
        }
      },
      "hostLocale": "en",
      "textParamSpans": [
        false,
        true
      ]
    },
    "expected": {
      "text": "Language: ",
      "unknownVariableDiagnostics": [
        "locale"
      ],
      "parameterSpans": [],
      "sameDiagnosticsWithMarkersOnAndOff": true
    }
  },
  {
    "id": "styling-invalid-local-default",
    "section": "9.4a",
    "input": {
      "uncheckedLocalValues": [
        "yes",
        0,
        null,
        {},
        []
      ],
      "hostDefaults": [
        true,
        false
      ],
      "uischema": {
        "type": "Label",
        "text": "{member}",
        "options": {
          "interpolate": true,
          "textParams": {
            "member": "Morgan"
          }
        }
      },
      "platform": "HTML"
    },
    "expected": {
      "authoringValid": false,
      "effectiveValueForEachInvalidLocal": "host default",
      "parameterSpansWhenHostTrue": [
        "member"
      ],
      "parameterSpansWhenHostFalse": [],
      "truthinessCoercion": false
    }
  },
  {
    "id": "conditional-layout-nested-opt-out-ignored",
    "section": "Conditional fields",
    "input": {
      "global": false,
      "uischema": {
        "type": "Group",
        "options": {
          "conditionalFields": true
        },
        "elements": [
          {
            "type": "VerticalLayout",
            "options": {
              "conditionalFields": false
            },
            "elements": []
          }
        ]
      }
    },
    "expected": {
      "projectionEnabled": true,
      "descendantOptionIgnored": true,
      "projectOnceAtOwner": true
    }
  },
  {
    "id": "conditional-layout-whole-value-editor",
    "section": "Conditional fields",
    "input": {
      "schema": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "if": {
          "properties": {
            "kind": {
              "const": "business"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "vat": {
              "type": "string"
            }
          },
          "required": [
            "vat"
          ]
        },
        "else": {
          "properties": {
            "nickname": {
              "type": "string"
            }
          }
        }
      },
      "data": {
        "kind": "personal",
        "nickname": "M",
        "vat": "retained"
      },
      "uischema": {
        "type": "VerticalLayout",
        "options": {
          "conditionalFields": true
        },
        "elements": [
          {
            "type": "Control",
            "scope": "#/properties/nickname"
          },
          {
            "type": "Control",
            "scope": "#/properties/vat"
          },
          {
            "type": "Control",
            "scope": "#",
            "options": {
              "format": "code"
            }
          }
        ]
      },
      "additionalEditorRoles": [
        "custom whole-value editor",
        "same-object field editor",
        "same-object field editor with local false"
      ]
    },
    "expected": {
      "visibleFieldScopes": [
        "#/properties/nickname"
      ],
      "wholeValueControlRetained": true,
      "wholeValueEditorSchema": "original authored schema with if/then/else and original reference context",
      "customWholeValueEditorSchema": "original authored schema",
      "sameObjectFieldEditorMayReuseProjection": true,
      "sameObjectFieldEditorLocalFalseSchema": "original authored schema",
      "originalSchemaValidation": true,
      "dataUnchanged": true
    }
  },
  {
    "id": "conditional-layout-regions",
    "section": "Conditional fields",
    "input": {
      "schema": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "if": {
          "properties": {
            "kind": {
              "const": "business"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "vat": {
              "type": "string"
            }
          },
          "required": [
            "vat"
          ]
        },
        "else": {
          "properties": {
            "nickname": {
              "type": "string"
            }
          }
        }
      },
      "data": {
        "kind": "personal",
        "nickname": "M",
        "vat": "retained"
      },
      "uischema": {
        "type": "Group",
        "options": {
          "conditionalFields": true
        },
        "elements": [
          {
            "type": "Control",
            "scope": "#/properties/vat",
            "slot": "cover"
          },
          {
            "type": "VerticalLayout",
            "elements": [
              {
                "type": "Label",
                "text": "Customer"
              },
              {
                "type": "Control",
                "scope": "#/properties/vat"
              },
              {
                "type": "Control",
                "scope": "#/properties/nickname"
              }
            ],
            "slot": "header"
          },
          {
            "type": "Control",
            "scope": "#/properties/nickname"
          },
          {
            "type": "VerticalLayout",
            "options": {
              "conditionalFields": false
            },
            "elements": [
              {
                "type": "Control",
                "scope": "#/properties/vat"
              },
              {
                "type": "Control",
                "scope": "#/properties/nickname"
              }
            ],
            "slot": "footer"
          }
        ]
      }
    },
    "expected": {
      "headerElements": [
        {
          "type": "Label",
          "text": "Customer"
        },
        {
          "type": "Control",
          "scope": "#/properties/nickname"
        }
      ],
      "footerFieldScopes": [
        "#/properties/nickname"
      ],
      "coverOmitted": true,
      "regionLayoutLocalFalseIgnored": true,
      "groupRetained": true,
      "originalSchemaValidation": true,
      "dataUnchanged": true
    }
  },
  {
    "id": "conditional-layout-ignored-options",
    "section": "Conditional fields",
    "input": {
      "global": false,
      "uischema": {
        "type": "Categorization",
        "options": {
          "conditionalFields": false
        },
        "elements": [
          {
            "type": "Category",
            "label": "Customer",
            "options": {
              "conditionalFields": true
            },
            "elements": [
              {
                "type": "Label",
                "text": "Customer",
                "options": {
                  "conditionalFields": true
                }
              },
              {
                "type": "Button",
                "label": "Continue",
                "options": {
                  "conditionalFields": true
                }
              }
            ]
          }
        ]
      }
    },
    "expected": {
      "projectionEnabled": false,
      "categoryOptionIgnored": true,
      "labelOptionIgnored": true,
      "buttonOptionIgnored": true,
      "noNewProjectionOwner": true
    }
  },
  {
    "id": "conditional-layout-empty-container-slot",
    "section": "Conditional fields, 5.7",
    "input": {
      "schema": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "if": {
          "properties": {
            "kind": {
              "const": "business"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "vat": {
              "type": "string"
            }
          },
          "required": [
            "vat"
          ]
        },
        "else": {
          "properties": {
            "nickname": {
              "type": "string"
            }
          }
        }
      },
      "data": {
        "kind": "personal"
      },
      "uischema": {
        "type": "VerticalLayout",
        "options": {
          "conditionalFields": true
        },
        "elements": [
          {
            "type": "HorizontalLayout",
            "options": {
              "part": "branch-area"
            },
            "elements": [
              {
                "type": "Control",
                "scope": "#/properties/vat"
              }
            ]
          }
        ]
      },
      "platform": "HTML with styling hooks"
    },
    "expected": {
      "nestedLayoutRetained": true,
      "nestedLayoutChildCount": 0,
      "existingParentSlotRetained": true,
      "slotDataPart": "branch-area",
      "extraWrapperRequired": false,
      "minimumSizeRequired": false,
      "fixedGapRequired": false,
      "ordinaryHideRuleCanStillHideContainer": true
    }
  },
  {
    "id": "conditional-layout-editor-continuity",
    "section": "Conditional fields",
    "input": {
      "placements": [
        "VerticalLayout",
        "HorizontalLayout",
        "Group header",
        "Group footer",
        "splitter panes"
      ],
      "authoredBindings": [
        "branch-only field",
        "retained field",
        "second occurrence of retained field"
      ],
      "operations": [
        "focus retained field",
        "start an uncommitted edit",
        "deactivate earlier branch-only field",
        "wait for normal commit",
        "reactivate earlier field"
      ],
      "sameFormInstance": true
    },
    "expected": {
      "retainedFocusPreserved": true,
      "retainedDraftPreserved": true,
      "pendingWriteCommittedToOriginalField": true,
      "duplicateOccurrencesRemainIndependent": true,
      "splitterSizingDoesNotResetRetainedEditors": true,
      "inactiveDataRetained": true
    }
  },
  {
    "id": "conditional-layout-static-work",
    "section": "Conditional fields",
    "input": {
      "schemaLifecycle": "immutable identity until replacement",
      "operations": [
        "repeat nonconditional discovery",
        "edit ordinary value without changing active branches",
        "switch branches with identical property names but different constraints and requiredness",
        "disable projection",
        "replace schema identity"
      ],
      "additionalCases": [
        "cyclic allOf discovery",
        "independent forms",
        "different array items",
        "dynamic scope resolution before filtering"
      ]
    },
    "expected": {
      "repeatDiscoveryAvoidsAnotherImmutableTraversal": true,
      "unchangedPresentationAvoidsFullRebuild": true,
      "currentBranchRequirednessAndConstraintsApplied": true,
      "disabledPredicateEvaluations": 0,
      "disabledContentFiltering": false,
      "ownershipBookkeepingPermitted": true,
      "schemaReplacementInvalidatesDiscovery": true,
      "validatorMutationIsolationPreserved": true,
      "noLatencyBenchmarkClaim": true
    }
  },
  {
    "id": "conditional-layout-discovery-reference",
    "section": "Conditional fields",
    "input": {
      "schema": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "definitions": {
          "Branch": {
            "if": {
              "properties": {
                "kind": {
                  "const": "business"
                }
              },
              "required": [
                "kind"
              ]
            },
            "then": {
              "properties": {
                "vat": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "vat"
              ]
            },
            "else": {
              "properties": {
                "nickname": {
                  "type": "string"
                }
              }
            }
          }
        },
        "allOf": [
          {
            "$ref": "#/definitions/Branch"
          }
        ]
      },
      "uischema": {
        "type": "VerticalLayout",
        "options": {
          "conditionalFields": true
        },
        "elements": [
          {
            "type": "Control",
            "scope": "#/properties/name"
          },
          {
            "type": "Control",
            "scope": "#/properties/vat"
          },
          {
            "type": "Control",
            "scope": "#/properties/nickname"
          }
        ]
      },
      "data": {
        "kind": "business",
        "name": "Ada",
        "vat": "BG1",
        "nickname": "kept"
      },
      "operations": [
        "replace kind with personal",
        "opt out locally while kind is business"
      ]
    },
    "expected": {
      "businessVisibleFields": [
        "name",
        "vat"
      ],
      "businessRequiredFields": [
        "name",
        "vat"
      ],
      "personalVisibleFields": [
        "name",
        "nickname"
      ],
      "personalRequiredFields": [],
      "originalSchemaValidationPreserved": true,
      "inactiveDataRetained": true
    }
  },
  {
    "id": "conditional-layout-discovery-allOf",
    "section": "Conditional fields",
    "input": {
      "schema": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "allOf": [
          {
            "properties": {
              "vat": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "vat"
            ]
          }
        ]
      },
      "uischema": {
        "type": "VerticalLayout",
        "options": {
          "conditionalFields": true
        },
        "elements": [
          {
            "type": "Control",
            "scope": "#/properties/name"
          },
          {
            "type": "Control",
            "scope": "#/properties/vat"
          },
          {
            "type": "Control",
            "scope": "#/properties/nickname"
          }
        ]
      },
      "data": {
        "kind": "business",
        "name": "Ada",
        "vat": "BG1",
        "nickname": "kept"
      },
      "operations": [
        "replace kind with personal",
        "opt out locally while kind is business"
      ]
    },
    "expected": {
      "businessVisibleFields": [
        "name",
        "vat"
      ],
      "businessRequiredFields": [
        "name",
        "vat"
      ],
      "personalVisibleFields": [
        "name",
        "vat"
      ],
      "personalRequiredFields": [
        "name",
        "vat"
      ],
      "originalSchemaValidationPreserved": true,
      "inactiveDataRetained": true
    }
  },
  {
    "id": "conditional-layout-discovery-nullable",
    "section": "Conditional fields",
    "input": {
      "schema": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "if": {
          "properties": {
            "kind": {
              "const": "business"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "vat": {
              "type": "string"
            }
          },
          "required": [
            "name",
            "vat"
          ]
        },
        "else": {
          "properties": {
            "nickname": {
              "type": "string"
            }
          }
        }
      },
      "uischema": {
        "type": "VerticalLayout",
        "options": {
          "conditionalFields": true
        },
        "elements": [
          {
            "type": "Control",
            "scope": "#/properties/name"
          },
          {
            "type": "Control",
            "scope": "#/properties/vat"
          },
          {
            "type": "Control",
            "scope": "#/properties/nickname"
          }
        ]
      },
      "data": {
        "kind": "business",
        "name": "Ada",
        "vat": "BG1",
        "nickname": "kept"
      },
      "operations": [
        "replace kind with personal",
        "opt out locally while kind is business",
        "replace data with null, then restore object data"
      ]
    },
    "expected": {
      "businessVisibleFields": [
        "name",
        "vat"
      ],
      "businessRequiredFields": [
        "name",
        "vat"
      ],
      "personalVisibleFields": [
        "name",
        "nickname"
      ],
      "personalRequiredFields": [],
      "originalSchemaValidationPreserved": true,
      "inactiveDataRetained": true,
      "nullRemainsNull": true,
      "doesNotInitializeObject": true
    }
  },
  {
    "id": "conditional-discovery-reference-context",
    "section": "Conditional fields",
    "input": {
      "schema": {
        "$ref": "#/definitions/Branch"
      },
      "roots": [
        {
          "definitions": {
            "Branch": {
              "if": {
                "properties": {
                  "kind": {
                    "const": "business"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "vat": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "vat"
                ]
              },
              "else": {
                "properties": {
                  "nickname": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        {
          "definitions": {
            "Branch": {
              "type": "string"
            }
          }
        }
      ],
      "additionalCases": [
        "cyclic allOf without conditions",
        "missing reference",
        "allOf containing minProperties only"
      ]
    },
    "expected": {
      "discoveryByRoot": [
        true,
        false
      ],
      "completedSearchCachedPerSchemaAndRoot": true,
      "cycleTerminates": true,
      "missingReferenceReportedWithoutLosingBaseFields": true,
      "constraintOnlyAllOfDoesNotActivateFieldProjection": true
    }
  },
  {
    "id": "conditional-template-positional",
    "section": "13.5 / Conditional fields",
    "input": {
      "schema": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "personal",
              "business"
            ]
          },
          "notes": {
            "type": "string"
          }
        },
        "if": {
          "properties": {
            "kind": {
              "const": "business"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "vatNumber": {
              "type": "string",
              "minLength": 3
            }
          },
          "required": [
            "vatNumber",
            "notes"
          ]
        }
      },
      "uischema": {
        "type": "TemplateLayout",
        "lang": "ractive",
        "options": {
          "conditionalFields": true
        },
        "template": "<section><div data-kind>{{>0}}</div><div data-vat>{{>1}}</div><div data-notes>{{>2}}</div></section>",
        "elements": [
          {
            "type": "Control",
            "scope": "#/properties/kind"
          },
          {
            "type": "Control",
            "scope": "#/properties/vatNumber"
          },
          {
            "type": "Control",
            "scope": "#/properties/notes"
          }
        ]
      },
      "data": {
        "kind": "personal",
        "vatNumber": "BG123",
        "notes": "Retained notes"
      },
      "operations": [
        "personal to business to personal",
        "render at root and object Control detail",
        "render the ordered children view",
        "repeat a known slot reference"
      ]
    },
    "expected": {
      "knownSlotCount": 3,
      "personalSlotContent": [
        "kind",
        null,
        "notes"
      ],
      "businessSlotContent": [
        "kind",
        "vatNumber",
        "notes"
      ],
      "noNumericAliases": true,
      "knownInactiveMountsControl": false,
      "knownInactiveActivatesFallback": false,
      "knownInactiveEmitsUnknownSlot": false,
      "retainedEditorIdentityAndFocus": true,
      "retainedTextSelection": true,
      "originalValidationAndInactiveDataPreserved": true,
      "inactiveSlotContributesSectionBinding": false
    }
  },
  {
    "id": "conditional-template-named",
    "section": "13.5 / Conditional fields",
    "input": {
      "schema": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "personal",
              "business"
            ]
          },
          "notes": {
            "type": "string"
          }
        },
        "if": {
          "properties": {
            "kind": {
              "const": "business"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "vatNumber": {
              "type": "string",
              "minLength": 3
            }
          },
          "required": [
            "vatNumber",
            "notes"
          ]
        }
      },
      "uischema": {
        "type": "TemplateLayout",
        "lang": "ractive",
        "options": {
          "conditionalFields": true
        },
        "template": "<section><div data-kind>{{>kind}}</div><div data-vat>{{>vatNumber}}</div><div data-notes>{{>notes}}</div></section>",
        "elements": [
          {
            "type": "Control",
            "scope": "#/properties/kind",
            "name": "kind"
          },
          {
            "type": "Control",
            "scope": "#/properties/vatNumber",
            "name": "vatNumber"
          },
          {
            "type": "Control",
            "scope": "#/properties/notes",
            "name": "notes"
          }
        ]
      },
      "data": {
        "kind": "personal",
        "vatNumber": "BG123",
        "notes": "Retained notes"
      },
      "operations": [
        "personal to business to personal",
        "render at root and object Control detail",
        "render the ordered children view",
        "repeat a known slot reference"
      ]
    },
    "expected": {
      "knownSlotCount": 3,
      "personalSlotContent": [
        "kind",
        null,
        "notes"
      ],
      "businessSlotContent": [
        "kind",
        "vatNumber",
        "notes"
      ],
      "noNumericAliases": true,
      "knownInactiveMountsControl": false,
      "knownInactiveActivatesFallback": false,
      "knownInactiveEmitsUnknownSlot": false,
      "retainedEditorIdentityAndFocus": true,
      "retainedTextSelection": true,
      "originalValidationAndInactiveDataPreserved": true,
      "inactiveSlotContributesSectionBinding": false
    }
  },
  {
    "id": "conditional-template-explicit-numeric",
    "section": "13.5 / Conditional fields",
    "input": {
      "schema": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "personal",
              "business"
            ]
          },
          "notes": {
            "type": "string"
          }
        },
        "if": {
          "properties": {
            "kind": {
              "const": "business"
            }
          },
          "required": [
            "kind"
          ]
        },
        "then": {
          "properties": {
            "vatNumber": {
              "type": "string",
              "minLength": 3
            }
          },
          "required": [
            "vatNumber",
            "notes"
          ]
        }
      },
      "uischema": {
        "type": "TemplateLayout",
        "lang": "ractive",
        "options": {
          "conditionalFields": true
        },
        "template": "<section><div data-kind>{{>0}}</div><div data-vat>{{>1}}</div><div data-notes>{{>2}}</div></section>",
        "elements": [
          {
            "type": "Control",
            "scope": "#/properties/kind",
            "name": "0"
          },
          {
            "type": "Control",
            "scope": "#/properties/vatNumber",
            "name": "1"
          },
          {
            "type": "Control",
            "scope": "#/properties/notes",
            "name": "2"
          }
        ]
      },
      "data": {
        "kind": "personal",
        "vatNumber": "BG123",
        "notes": "Retained notes"
      },
      "operations": [
        "personal to business to personal",
        "render at root and object Control detail",
        "render the ordered children view",
        "repeat a known slot reference"
      ]
    },
    "expected": {
      "knownSlotCount": 3,
      "personalSlotContent": [
        "kind",
        null,
        "notes"
      ],
      "businessSlotContent": [
        "kind",
        "vatNumber",
        "notes"
      ],
      "noNumericAliases": true,
      "knownInactiveMountsControl": false,
      "knownInactiveActivatesFallback": false,
      "knownInactiveEmitsUnknownSlot": false,
      "retainedEditorIdentityAndFocus": true,
      "retainedTextSelection": true,
      "originalValidationAndInactiveDataPreserved": true,
      "inactiveSlotContributesSectionBinding": false
    }
  },
  {
    "id": "conditional-template-missing-name",
    "section": "13.5 / Conditional fields",
    "input": {
      "knownNames": [
        "vatNumber",
        "notes"
      ],
      "inactiveNames": [
        "vatNumber"
      ],
      "references": [
        "vatNumber",
        "notes",
        "typo"
      ],
      "syntaxVariants": [
        "partial",
        "native Slot",
        "supported JSX expression",
        "supported JSX component"
      ]
    },
    "expected": {
      "vatNumber": "empty without fallback or unknown-slot diagnostic",
      "notes": "delegated field renderer",
      "typo": "normal profile unknown-name diagnostic/fallback",
      "undefinedComponentGloballyIgnored": false,
      "unsupportedSyntaxStillDiagnosed": true
    }
  },
  {
    "id": "conditional-template-ownership",
    "section": "Conditional fields",
    "input": {
      "entryTypes": [
        "TemplateLayout",
        "Template",
        "Slot"
      ],
      "global": true,
      "cases": [
        "root local true",
        "root local false",
        "descendant true below disabled owner",
        "registered layout resolved after projection",
        "nested object reuses a schema at a distinct data path"
      ]
    },
    "expected": {
      "rootTemplateCanOwnProjection": true,
      "entryLocalFalseWins": true,
      "descendantCannotOverrideOwner": true,
      "registeredLayoutInheritsProjection": true,
      "registeredInactiveOverrideDoesNotUseSlotFallback": true,
      "noNewObjectDataBinding": true,
      "schemaIdentityDoesNotMergeObjectBoundaries": true
    }
  },
  {
    "id": "native-input-original-text",
    "section": "Scalar controls and temporal editing",
    "input": {
      "cases": [
        "integer 1.9",
        "integer 9007199254740993",
        "integer 1e3",
        "maxLength:1 supplementary character",
        "IME intermediate text",
        "masked February 31",
        "unpadded months 2–9"
      ],
      "boundaries": [
        "control",
        "cell",
        "native picker"
      ]
    },
    "expected": {
      "fractionNeverTruncated": true,
      "unsafeDigitsNeverRoundedIntoCommit": true,
      "exponentNeverParsedAsPrefix": true,
      "lengthCountsCodePoints": true,
      "compositionNotPrematurelyCommitted": true,
      "impossibleDateNotNormalized": true,
      "validMonthDigitsRetained": true
    }
  },
  {
    "id": "pending-validity-without-data-change",
    "section": "Pending edits and validation",
    "input": {
      "cases": [
        "invalid local duration draft",
        "pending file read",
        "owner error publication",
        "command without blur",
        "clear during read",
        "nested independent form"
      ]
    },
    "expected": {
      "hostNotifiedWithoutDataEdit": true,
      "unresolvedDraftBlocksConsumption": true,
      "commandReadsFlushedCurrentData": true,
      "clearInvalidatesRead": true,
      "hostErrorsPreserved": true,
      "independentFormDoesNotInheritPending": true
    }
  },
  {
    "id": "template-lookup-ownership",
    "section": "Template and Slot",
    "input": {
      "cases": [
        "duplicate registry name",
        "duplicate caller child name",
        "literal constructor slot",
        "unfilled structural slot",
        "same-form same-path recursive expansion",
        "independent nested form reuse"
      ]
    },
    "expected": {
      "firstRegistryWins": true,
      "laterCallerChildWins": true,
      "duplicatesDiagnosed": true,
      "namesUseOwnKeys": true,
      "unfilledSlotCanUseFallback": true,
      "sameBoundaryRecursionTerminates": true,
      "independentFormReuseAllowed": true
    }
  },
  {
    "id": "literal-tree-selected-editor",
    "section": "Mixed tree editing",
    "input": {
      "keys": [
        "a.b",
        "",
        " renamed.key ",
        "constructor"
      ],
      "neighbor": {
        "a": {
          "b": "distinct value"
        }
      },
      "actions": [
        "select literal member",
        "edit selected detail",
        "rename with punctuation and spaces"
      ]
    },
    "expected": {
      "selectedValueUsesLiteralSegments": true,
      "nestedNeighborUnchanged": true,
      "emptySegmentNotDropped": true,
      "acceptedRenameNotTrimmed": true,
      "isolatedEditorRetainsConfiguration": true,
      "localReferenceContextPreserved": true,
      "schemaLookupUsesOwnProperties": true,
      "labelDoesNotInventRenamePermission": true
    }
  },
  {
    "id": "queued-edit-permission-change",
    "section": "Readonly and pending edits",
    "input": {
      "separateReadonlyFromDisabled": true,
      "actions": [
        "type without blur",
        "make readonly before debounce delivery",
        "wait for delivery or consume data"
      ]
    },
    "expected": {
      "notYetCommittedEditCancelled": true,
      "alreadyCommittedEditNotRolledBack": true,
      "noWriteThroughOldPermissions": true,
      "pendingStateCleared": true,
      "readonlyPresentationCapabilityDeclared": true
    }
  },
  {
    "id": "conditional-group-empty-region-identity",
    "section": "Conditional fields",
    "input": {
      "regions": [
        "header",
        "footer",
        "cover"
      ],
      "collapsible": [
        false,
        true
      ],
      "actions": [
        "focus a body editor and select text",
        "deactivate the last region field",
        "reactivate that field"
      ]
    },
    "expected": {
      "inactiveRegionControlsOmitted": true,
      "sameBodyEditorInstance": true,
      "focusSelectionAndDraftPreserved": true,
      "authoredSchemaUnchanged": true
    }
  },
  {
    "id": "conditional-projection-diagnostic-ownership",
    "section": "Conditional fields",
    "input": {
      "entryPoints": [
        "object Control",
        "object-context layout"
      ],
      "nestedSameObjectControl": true,
      "conditionCannotCompile": true,
      "independentObjectPaths": [
        "left",
        "right"
      ]
    },
    "expected": {
      "oneReportPerOwningProjection": true,
      "reuseDoesNotRepeatVisibleMessagesOrCallbacks": true,
      "independentPathsRetainSeparateFailures": true
    }
  },
  {
    "id": "core-readonly-compatibility-alias",
    "section": "15.1",
    "input": {
      "integration": "JSON Forms core",
      "cases": [
        {
          "config": {
            "readOnly": true
          },
          "options": {},
          "readonly": true
        },
        {
          "config": {},
          "options": {
            "readOnly": true
          },
          "readonly": true
        },
        {
          "config": {},
          "options": {
            "readonly": false,
            "readOnly": true
          },
          "readonly": false
        },
        {
          "config": {
            "readonly": false,
            "readOnly": true
          },
          "options": {},
          "readonly": false
        },
        {
          "config": {
            "readonly": true
          },
          "options": {
            "readOnly": false
          },
          "readonly": false
        }
      ]
    },
    "expected": {
      "coreAliasNotStripped": true,
      "canonicalBooleanWinsWithinSource": true,
      "sourcePrecedenceUnchanged": true,
      "schemaKeywordRemainsReadOnly": true,
      "otherIntegrationsDeclareAliasCapability": true
    }
  },
  {
    "id": "group-child-slot-placement",
    "section": "8.1",
    "input": {
      "uischema": {
        "type": "Group",
        "elements": [
          {
            "type": "Label",
            "slot": "footer",
            "text": "Actions"
          },
          {
            "type": "Label",
            "name": "header",
            "text": "Body first"
          },
          {
            "type": "Template",
            "name": "partner-summary",
            "slot": "header",
            "elements": []
          },
          {
            "type": "Group",
            "elements": [
              {
                "type": "Label",
                "slot": "header",
                "text": "Nested title"
              },
              {
                "type": "Label",
                "text": "Nested body"
              }
            ]
          }
        ],
        "label": "Partner"
      },
      "registeredTemplateName": "partner-summary"
    },
    "expected": {
      "visualRegionOrder": [
        "header",
        "body",
        "footer"
      ],
      "headerTemplateLookup": "partner-summary",
      "bodyAuthoredIndices": [
        1,
        3
      ],
      "unslottedNameHeaderRemainsBody": true,
      "nestedSlotDoesNotFillOuterHeader": true,
      "childrenTraversableOnlyThroughElements": true,
      "noSlotsMappingRequired": true,
      "groupAccessibleName": "Partner",
      "registeredTemplateExpansionNotSearchedForTitle": true
    }
  },
  {
    "id": "group-child-slot-fallback",
    "section": "8.1",
    "input": {
      "cases": [
        {
          "type": "Group",
          "elements": [
            {
              "type": "Label",
              "slot": "header",
              "text": "First"
            },
            {
              "type": "Label",
              "slot": "header",
              "text": "Second"
            },
            {
              "type": "Label",
              "text": "Body"
            }
          ]
        },
        {
          "type": "Group",
          "elements": [
            {
              "type": "Label",
              "slot": "bottom",
              "text": "Unknown"
            },
            {
              "type": "Label",
              "text": "Body"
            }
          ]
        }
      ],
      "actions": [
        "render each case",
        "hide the first header child in the duplicate case",
        "collapse and reopen the Group"
      ]
    },
    "expected": {
      "cases": [
        {
          "headerAuthoredIndex": 0,
          "bodyAuthoredIndices": [
            1,
            2
          ]
        },
        {
          "bodyAuthoredIndices": [
            0,
            1
          ]
        }
      ],
      "everyChildDispatchedOnce": true,
      "duplicatesAndUnknownNamesAreValid": true,
      "bodyFallbackIncludesCollapseAndIndicators": true,
      "hiddenFirstMatchDoesNotPromoteLaterMatch": true,
      "bodyOrderPreserved": true
    }
  },
  {
    "id": "group-child-slot-all-region-indicators",
    "section": "8.1",
    "input": {
      "uischema": {
        "type": "Group",
        "options": {
          "showDataIndicator": true,
          "showValidationIndicator": true,
          "showValidationIndicatorCount": true
        },
        "elements": [
          {
            "type": "Control",
            "scope": "#/properties/regionOnly",
            "slot": "header"
          },
          {
            "type": "Control",
            "scope": "#/properties/body"
          },
          {
            "type": "Label",
            "text": "Presentation only",
            "scope": "#/properties/decoration"
          },
          {
            "type": "ImageView",
            "src": "/image.png",
            "scope": "#/properties/decoration"
          }
        ]
      },
      "data": {
        "regionOnly": "x"
      },
      "errors": [
        {
          "instancePath": "/regionOnly",
          "keyword": "minLength",
          "params": {
            "limit": 2
          },
          "message": "too short"
        }
      ],
      "placements": [
        "cover",
        "header",
        "footer",
        "body",
        "unknown",
        null
      ],
      "valueCases": [
        {
          "data": {},
          "hasData": false,
          "hasError": false
        },
        {
          "data": {
            "regionOnly": "x"
          },
          "hasData": true,
          "hasError": true
        },
        {
          "data": {
            "regionOnly": "valid"
          },
          "hasData": true,
          "hasError": false
        },
        {
          "data": {
            "regionOnly": ""
          },
          "hasData": false,
          "hasError": true
        }
      ],
      "schema": {
        "type": "object",
        "properties": {
          "regionOnly": {
            "type": "string",
            "minLength": 2
          },
          "body": {
            "type": "string"
          }
        }
      }
    },
    "expected": {
      "groupDataIndicator": true,
      "groupDescendantValidationIndicator": true,
      "regionControlRetainsLocalError": true,
      "originalDocumentErrorsUnchanged": true,
      "bodyValueOrErrorIncludedWhenAdded": true,
      "allRegionBindingsIncluded": true,
      "presentationOnlyChildrenContribute": false,
      "groupDescendantValidationCount": 1,
      "collapsedAndRuleHiddenBindingsIncluded": true
    }
  },
  {
    "id": "group-child-slot-visibility",
    "section": "8.1",
    "input": {
      "uischema": {
        "type": "Group",
        "label": "Fallback",
        "options": {
          "collapsible": true
        },
        "elements": [
          {
            "type": "VerticalLayout",
            "slot": "header",
            "rule": {
              "effect": "SHOW",
              "condition": {
                "scope": "#/properties/showHeader",
                "schema": {
                  "const": true
                }
              }
            },
            "elements": [
              {
                "type": "Label",
                "text": "Custom heading"
              }
            ]
          },
          {
            "type": "Control",
            "scope": "#/properties/notes"
          }
        ]
      },
      "actions": [
        "focus notes and select text",
        "hide header through external data update",
        "show header again",
        "collapse Group"
      ]
    },
    "expected": {
      "hiddenHeaderNeverBecomesBody": true,
      "hiddenHeaderUsesGroupLabel": true,
      "visibleHeaderUsesResolvedLabel": true,
      "bodyFocusSelectionDraftAndPendingWriteRetained": true,
      "collapseKeepsHeaderVisibleAndHidesBodyAndFooter": true,
      "dataUnchangedByPlacementOrCollapse": true
    }
  },
  {
    "id": "debounced-noop-pending-settlement",
    "section": "18.4",
    "input": {
      "schema": {
        "type": "string"
      },
      "data": "x",
      "actions": [
        "type xy then x before the debounce expires",
        "deliver by timer without changing the model value",
        "repeat with explicit flush before the timer expires",
        "repeat after a committed model update",
        "acknowledge an earlier write while a newer draft is queued"
      ]
    },
    "expected": {
      "dataAfterNoOp": "x",
      "completedEditPending": false,
      "cleanCurrentModelValidAfterSettlement": true,
      "dataChangeEventRequired": false,
      "newerDraftRemainsPendingUntilResolved": true,
      "independentPendingValidationPreserved": true
    }
  },
  {
    "id": "manual-custom-element-registration",
    "section": "Host integration (optional manual registration)",
    "input": {
      "when": "the host exposes explicit custom element registration",
      "defaultTag": "jsonforms-framework-family",
      "customTag": "json-forms",
      "defaults": {
        "locale": "bg",
        "readonly": true,
        "data": {
          "name": "Ada"
        }
      },
      "actions": [
        "import only the manual browser entry",
        "assign data to an unregistered custom element before upgrade",
        "register the custom tag with defaults",
        "register a second tag using the same renderer",
        "repeat registration of the first tag with different defaults",
        "supply instance property and attribute overrides, including false and null",
        "remove an attribute override and assign undefined to a property",
        "mutate the original defaults and one instance data/config object",
        "render, edit, use slots, and listen to host events on the custom tag"
      ]
    },
    "expected": {
      "manualImportDefinesNoTags": true,
      "requestedTagsHaveDistinctConstructors": true,
      "defaultTagRemainsUndefined": true,
      "firstDefinitionAndDefaultsWin": true,
      "preUpgradeInputsRetained": true,
      "explicitInputsOverrideDefaults": true,
      "removedOrUndefinedOverridesRestoreDefaults": true,
      "wholePropertyReplacementWithoutImplicitConfigMerge": true,
      "mutableDefaultsSnapshottedAndIsolated": true,
      "callbackCapabilityAndServiceIdentitiesRetained": true,
      "propertiesAttributesEventsSlotsAndStylesPreserved": true
    }
  },
  {
    "id": "cel-url-component-encoding",
    "section": "9.3a",
    "input": {
      "fixture": "conformance/cel-helpers.json",
      "message": "[{name}](#/users/{encodeUriComponent(id)})",
      "name": "A **literal** name",
      "ids": [
        "a/b?x=1&y=#frag",
        "Име 😀",
        "a(b)!*'~-_.",
        "a%2Fb"
      ],
      "profiles": [
        "basic",
        "extended"
      ]
    },
    "expected": {
      "allEncodingVectorsMatch": true,
      "oneLinkWithLiteralName": true,
      "componentDoesNotIntroducePathQueryOrFragmentDelimiters": true,
      "markupEscapingAndUrlPolicyStillApply": true,
      "expressionFailuresUseExistingPolicy": true
    }
  },
  {
    "id": "cel-date-time-formatting",
    "section": "9.3a",
    "input": {
      "expressions": [
        "dateTime(value)"
      ],
      "values": [
        "2026-10-01T14:30:00+02:00",
        "2026-10-01T12:30:00Z",
        "not-a-date"
      ],
      "locales": [
        "en",
        "bg"
      ],
      "viewerTimeZones": [
        "UTC",
        "America/New_York"
      ]
    },
    "expected": {
      "equivalentInstantsRenderIdentically": true,
      "activeLocaleAndViewerZoneUsed": true,
      "mediumDateAndShortTime": true,
      "unparseableValueContributesExpressionFailure": true
    }
  },
  {
    "id": "cel-numeric-and-timestamp-overloads",
    "section": "9.3",
    "input": {
      "fixture": "conformance/cel-helpers.json",
      "numericCasesKey": "numericCases",
      "timestampCasesKey": "timestampCases",
      "locales": [
        "en",
        "de",
        "bg"
      ],
      "viewerTimeZones": [
        "UTC",
        "America/New_York"
      ],
      "timestamp": "2026-10-01T12:30:00Z"
    },
    "expected": {
      "intAndDoubleNumericOverloadsAvailable": true,
      "fixedFractionDigitsAppliedToIntAndDouble": true,
      "largeIntegerDigitsRetained": true,
      "dateTimeAndClockAcceptNativeCelTimestamps": true,
      "hostDateAndCelTimestampAgreeWithStringInstant": true,
      "numericEpochValuesAreNotInferred": true,
      "malformedInputsUseExpressionFailurePolicy": true
    }
  },
  {
    "id": "template-literal-child-names",
    "section": "13.5",
    "input": {
      "childNames": [
        "__proto__",
        "constructor",
        "toString",
        "hasOwnProperty",
        "ordinary",
        "slot\"{{data.selected}}%",
        "a[[data.selected]]b",
        "a[[[data.selected]]]b",
        "p[0]"
      ],
      "referenceModes": [
        "static",
        "dynamic",
        "iteration"
      ],
      "missingNames": [
        "__proto__",
        "constructor",
        "toString",
        "hasOwnProperty"
      ],
      "bindingUpdates": [
        "initial",
        "replacement"
      ]
    },
    "expected": {
      "allNamesAddressable": true,
      "namesEnumerateAsOwnKeys": true,
      "missingNamesUseProfileFallbackAndDiagnostics": true,
      "inactiveNamesStayEmptyWithoutFallback": true,
      "placeholderNamesRemainLiteral": true,
      "retainedEditorNodesFocusAndDraftsPreserved": true,
      "hostEngineRegistryUnchanged": true
    }
  }
]
