Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing: Trim block fixture HTML when generating other test fixture files #30981

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "<!-- wp:core/4-invalid /-->\n",
"innerContent": [ "<!-- wp:core/4-invalid /-->\n" ]
"innerHTML": "<!-- wp:core/4-invalid /-->",
"innerContent": [
"<!-- wp:core/4-invalid /-->"
]
}
]
7 changes: 0 additions & 7 deletions packages/e2e-tests/fixtures/blocks/core__audio.parsed.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,5 @@
"innerContent": [
"\n<figure class=\"wp-block-audio alignright\">\n <audio controls=\"\" src=\"data:audio/mpeg;base64,/+MYxAAAAANIAAAAAExBTUUzLjk4LjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"></audio>\n</figure>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,5 @@
"innerContent": [
"\n<figure class=\"wp-block-audio\"><audio controls></audio></figure>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
7 changes: 0 additions & 7 deletions packages/e2e-tests/fixtures/blocks/core__block.parsed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,5 @@
"innerBlocks": [],
"innerHTML": "",
"innerContent": []
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"attrs": {},
"innerBlocks": [],
"innerHTML": "</div>",
"innerContent": [ "</div>" ]
"innerContent": [
"</div>"
]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,5 @@
"innerContent": [
"\n<div class=\"wp-block-button aligncenter\"><a class=\"wp-block-button__link\" href=\"https://github.com/WordPress/gutenberg\">Help build Gutenberg</a></div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,5 @@
"innerContent": [
"\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link no-border-radius has-text-color has-background\" style=\"background-color:#aa5a20;color:#1b9b6c\">My button</a></div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,5 @@
null,
"\n</div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,5 @@
null,
"\n</div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,5 @@
"innerBlocks": [],
"innerHTML": "",
"innerContent": []
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,5 @@
"innerBlocks": [],
"innerHTML": "",
"innerContent": []
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
7 changes: 0 additions & 7 deletions packages/e2e-tests/fixtures/blocks/core__code.parsed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,5 @@
"innerContent": [
"\n<pre class=\"wp-block-code\"><code>export default function MyButton() {\n\treturn &lt;Button&gt;Click Me!&lt;/Button&gt;;\n}</code></pre>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
15 changes: 6 additions & 9 deletions packages/e2e-tests/fixtures/blocks/core__column.parsed.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n\t<p>Column One, Paragraph One</p>\n\t",
"innerContent": [ "\n\t<p>Column One, Paragraph One</p>\n\t" ]
"innerContent": [
"\n\t<p>Column One, Paragraph One</p>\n\t"
]
},
{
"blockName": "core/paragraph",
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n\t<p>Column One, Paragraph Two</p>\n\t",
"innerContent": [ "\n\t<p>Column One, Paragraph Two</p>\n\t" ]
"innerContent": [
"\n\t<p>Column One, Paragraph Two</p>\n\t"
]
}
],
"innerHTML": "\n<div class=\"wp-block-column\">\n\t\n\t\n</div>\n",
Expand All @@ -26,12 +30,5 @@
null,
"\n</div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n\t<p>Column One, Paragraph One</p>\n\t",
"innerContent": [ "\n\t<p>Column One, Paragraph One</p>\n\t" ]
"innerContent": [
"\n\t<p>Column One, Paragraph One</p>\n\t"
]
},
{
"blockName": "core/paragraph",
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n\t<p>Column One, Paragraph Two</p>\n\t",
"innerContent": [ "\n\t<p>Column One, Paragraph Two</p>\n\t" ]
"innerContent": [
"\n\t<p>Column One, Paragraph Two</p>\n\t"
]
}
],
"innerHTML": "\n<div class=\"wp-block-column\" style=\"flex-basis:33.33%\">\n\t\n\t\n</div>\n",
Expand All @@ -28,12 +32,5 @@
null,
"\n</div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,5 @@
null,
"\n</div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,5 @@
null,
"\n</div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
7 changes: 0 additions & 7 deletions packages/e2e-tests/fixtures/blocks/core__cover.parsed.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,5 @@
null,
"\n\t</div>\n</div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,5 @@
"innerContent": [
"\n<section class=\"wp-block-cover-image has-background-dim\" style=\"background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==)\"><h2><strong>Cover Image</strong></h2></section>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,5 @@
"innerContent": [
"\n<div class=\"wp-block-cover-image has-background-dim\" style=\"background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==)\"><p class=\"wp-block-cover-image-text\"><strong>Cover Block</strong></p></div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,5 @@
"innerContent": [
"\n<div class=\"wp-block-cover has-background-dim\" style=\"background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==)\"><p class=\"wp-block-cover-text\"><strong>Cover Block</strong></p></div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,5 @@
null,
"\n\t</div>\n</div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,5 @@
null,
"\n\t</div>\n</div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
"innerContent": [
"\n"
]
},
{
"blockName": "core/cover",
Expand All @@ -54,7 +56,9 @@
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n\t\t<p></p>\n\t\t",
"innerContent": [ "\n\t\t<p></p>\n\t\t" ]
"innerContent": [
"\n\t\t<p></p>\n\t\t"
]
}
],
"innerHTML": "\n<div\n\tclass=\"wp-block-cover alignfull\"\n\tstyle=\"background-image: url( https://example.com/some-background-image.png ); min-height: 48vw; background-position: 50% 40%;\"\n>\n\t<div class=\"wp-block-cover__inner-container\">\n\t\t\n\t</div>\n</div>\n",
Expand All @@ -69,7 +73,9 @@
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
"innerContent": [
"\n"
]
},
{
"blockName": "core/cover",
Expand Down Expand Up @@ -99,12 +105,5 @@
null,
"\n\t</div>\n</div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,5 @@
null,
"\n\t</div>\n</div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,5 @@
null,
"\n\t</div>\n</div>\n"
]
},
{
"blockName": null,
"attrs": {},
"innerBlocks": [],
"innerHTML": "\n",
"innerContent": [ "\n" ]
}
]
Loading