|
| 1 | +{ |
| 2 | + "schema": "blocks-engine/php-transformer/parity-fixture/v1", |
| 3 | + "name": "html-presentational-data-attributes-native", |
| 4 | + "description": "Presentation-only animation data attributes such as data-reveal/data-delay do not force editable text and generic groups into core/html runtime preservation when callers provide matching runtime_dom_selectors.", |
| 5 | + "source_reference": { |
| 6 | + "repo": "php-transformer", |
| 7 | + "path": "tests/fixtures/parity/html-presentational-data-attributes-native.json", |
| 8 | + "notes": "Generic regression for static marketing sections that use data-* reveal hooks on labels, headings, paragraphs, and wrappers." |
| 9 | + }, |
| 10 | + "legacy_comparison": { |
| 11 | + "skip": true, |
| 12 | + "reason": "Covers current PHP transformer generic data-attribute runtime selector behavior; no downstream legacy comparison." |
| 13 | + }, |
| 14 | + "operation": "html_transformer.transform", |
| 15 | + "input": { |
| 16 | + "content": "<section class=\"feature-section\" aria-label=\"Feature\"><div class=\"feature-header\" data-reveal><span class=\"section-label\" data-reveal>Feature Label</span><h2 class=\"feature-heading\" data-reveal data-delay=\"1\">Built on <em>care</em><br>and craft</h2><p class=\"feature-sub\" data-reveal data-delay=\"2\">Readable source copy.</p></div></section>", |
| 17 | + "options": { |
| 18 | + "runtime_dom_selectors": ["[data-reveal]", "[data-delay]"] |
| 19 | + } |
| 20 | + }, |
| 21 | + "expected_blocks": [ |
| 22 | + { "path": "blocks.0", "name": "core/group", "attrs": { "className": "feature-section", "tagName": "section" } }, |
| 23 | + { "path": "blocks.0.innerBlocks.0", "name": "core/group", "attrs": { "className": "feature-header" } }, |
| 24 | + { "path": "blocks.0.innerBlocks.0.innerBlocks.0", "name": "core/paragraph", "attrs": { "content": "<span class=\"section-label\" data-reveal>Feature Label</span>" } }, |
| 25 | + { "path": "blocks.0.innerBlocks.0.innerBlocks.1", "name": "core/heading", "attrs": { "content": "Built on <em>care</em><br>and craft", "level": 2, "className": "feature-heading" } }, |
| 26 | + { "path": "blocks.0.innerBlocks.0.innerBlocks.2", "name": "core/paragraph", "attrs": { "content": "Readable source copy.", "className": "feature-sub" } } |
| 27 | + ], |
| 28 | + "expected_fallbacks": [], |
| 29 | + "expect": [ |
| 30 | + { "path": "status", "assert": "equals", "value": "success" }, |
| 31 | + { "path": "blocks", "assert": "count", "count": 1 }, |
| 32 | + { "path": "fallbacks", "assert": "count", "count": 0 }, |
| 33 | + { "path": "coverage.0.fallback_count", "assert": "equals", "value": 0 }, |
| 34 | + { "path": "serialized_blocks", "assert": "not_contains", "value": "<!-- wp:html" }, |
| 35 | + { "path": "serialized_blocks", "assert": "contains", "value": "<!-- wp:heading" }, |
| 36 | + { "path": "serialized_blocks", "assert": "contains", "value": "<!-- wp:paragraph" } |
| 37 | + ] |
| 38 | +} |
0 commit comments